# How many natural numbers less than 1000 are divisible by 2, 3, or 5?

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.

• If you are taking $0$ as a natural number, then add 3 to the count. Since the problem asks for the numbers less than $1000$, subtract off $2$ from the count since $1000$ is divisible by $2$ and $5$ but not $3$. – infinitylord May 28 '17 at 2:49
• Including $0$ and excluding $1000$ computer listing gives this decomposition : $734 = 500 + 334 + 200 - 167 - 100 - 67 + 34$ – zwim May 28 '17 at 3:21
• Excluding $0$ and including $1000$ computer listing gives your decomposition : $734 = 500 + 333 + 200 - 166 - 100 - 66 + 33$ – zwim May 28 '17 at 3:26
• Thanks, I realized that after posting that including or excluding 0 gives me the same answer although the process is a little different. – Squanchinator May 28 '17 at 3:49

## 1 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.