Let A,B and C denote the sets of positive integers that are divisible by 2, 3 and 5 respectively and less or equal to 100.
Then ∣A∣=⌊2100⌋=50,∣B∣=⌊3100⌋=33, and ∣C∣=⌊5100⌋=20.
If m and n are relatively prime then a a is divisible by m and n iff it is divisible by mn.
It follows that ∣A∩B∣=⌊6100⌋=16,∣A∩C∣=⌊10100⌋=10,∣B∩C∣=⌊15100⌋=6, and ∣A∩B∩C∣=⌊30100⌋=3.
Therefore, by Inclusion-exclusion principle, the number of positive integers that are divisible by 2 or 3 or 5 and less or equal to 100 is equal to
∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣A∩C∣−∣B∩C∣+∣A∩B∩C∣=50+33+20−16−10−6+3=74.
We conclude that the number of integers that are not divisible by 2 or 3 or 5 is equal to 100−74=26.
Comments