How many numbers between 1 and 1000 are divisible by 2, 3, 5 or 7?
My try:
Let $A_2, A_3, A_5, A_7$ be the set of numbers between 1 and 1,000 that are divisible by 2, 3, 5, and 7 respectively. I used the inclusion-exclusion formula for $|A_2\cup A_3\cup A_5\cup A_7|= |A_2|+|A_3|+|A_5|+|A_7|-|A_2\cap A_3|-|A_2\cap A_5|-|A_2\cap A_7|-|A_3\cap A_5|-|A_3\cap A_7|-|A_5\cap A_7|+|A_2\cap A_3\cap A_5|+|A_2\cap A_3\cap A_7|+|A_2\cap A_5\cap A_7|+|A_3\cap A_5\cap A_7|-|A_2\cap A_3\cap A_5\cap A_7| = 500+333+200+142-166-100-71-66-47-28+33+23+14+9-4 = 772 $
And the result I received was - 772.
I would appreciate if you could confirm my method and result, and I'd be happy to see a different, more elegant approach.
As the phrasing of the question goes, you require numbers between 1 and 1000, divisible by 2, 3, 5, AND 7, which means divisible by 2*3*5*7=210. Hence your answer is 4. (210, 420, 630, and 840)