[Math] How many numbers between 1 and 10000, inclusive, are multiples of 12 or 20

discrete mathematicslinear algebra

I calculated the multiples of 12 and multiples of 20, 833 and 500 respectively.

Now I calculated the multiples of 12 * 20 = 240,and as a result have 41.

The solution would be 833 + 500-41 = 1292

But the solutions given the choice between:

a) 1167
b) 1333
c) 1660
d) 2500

Is my right answer?

Best Answer

No: The number of numbers divisible by $12$ or $20$ is equal to the number that are divisible by $12$, plus the number that are divisible by $20$, minus the number that are divisible by both (i.e., divisible by their lowest common multiple, which is $60$). Otherwise, the last group is counted twice, when you only want to count them once. (I see that you realize this, but it's useful for future readers.)

That is $\lfloor 10000/12 \rfloor + \lfloor 10000/20 \rfloor - \lfloor 10000/60 \rfloor = 833+500-166 = 1167$.