15.10. Inclusion-Exclusion 475
We’ll be able to find the size of this union using Inclusion-Exclusion because the
intersections of theCp’s are easy to count. For example,Cp\Cq\Cris the set
of nonnegative integers less thannthat are divisible by each ofp,qandr. But
since thep;q;rare distinct primes, being divisible by each of them is the same
as being divisible by their product. Now observe that ifkis a positive divisor of
n, then exactlyn=knonnegative integers less thannare divisible byk, namely,
0;k;2k;:::;..n=k/ 1/k. So exactlyn=pqrnonnegative integers less thannare
divisible by all three primesp,q,r. In other words,
jCp\Cq\CrjD
n
pqr:
Reasoning this way about all the intersections among theCp’s and applying
Inclusion-Exclusion, we get
jSjD
ˇˇ
ˇˇ
ˇ
[miD 1Cpiˇˇ
ˇˇ
ˇ
D
XmiD 1ˇ
ˇCpiˇ
ˇ
X
1 i<jmˇ
ˇCpi\Cpjˇ
ˇ
C
X
1 i<j<kmˇ
ˇCpi\Cpj\Cpkˇ
ˇ C. 1/m ^1ˇˇ
ˇˇ
ˇ
\miD 1Cpiˇˇ
ˇˇ
ˇ
D
XmiD 1n
pi