[Math] How many natural numbers less than 1000 are divisible by 2, 3, or 5

discrete mathematicsinclusion-exclusion

For the purposes of this problem, 0 is an natural number, and 0 is divisible by all natural numbers.

I think that this is the answer but I'm not sure.

Natural numbers divisible by $2 = 1000/2 =500$

natural numbers divisible by $3 = 1000/3=333$

natural numbers divisible by $5 = 1000/5=200$

natural numbers divisble by 2 and $3 =1000/(2*3)=166$

natural numbers divisible by 2 and $5 = 1000/(2*5)=100$

natural numbers divisble by 3 and $5 = 1000/(3*5)=66$

natural numbers divisble by 2 , 3 or $5 = 1000/(2*3*5)=33 + 1$(if we include 0)

Natural number less than 1000 divisible by 2, 3 or $5 500+333+200 – (166 +100 + 66) + 34= 735$

I'm a little confused, since the question says how many natural numbers less than 1000 are divisible by 2,3, or 5. But I counted 1000 as a number divisible by 2, even though the question states that the number being divided must be less 1000, similarly $1000/10$ and $1000/5$ should I include these numbers as dividends?
Also should I include 0 since it is a number that is divisible by 2,3, or 5.

Best Answer

Who needs a computer?

Numbers not divisible by any of 2, 3, or 5 are those whose residues modulo 30 are not so divisible. The relevant residues are 1, 7, 11, 13, 17, 19, 23 and 29 (eight of them). We count 8×33=264 nonnegative whole numbers $<990 $ having these residues, and two more for 991 and 997, leaving 734 with factors of 2, 3, or 5. I do not include 1000 because "less than 1000" seems to suggest not including the equality case.