Originally Posted by

**DivideByZero**
When counting by 5s what ratio of numbers are divisible by 2 and 3?

5, **10**, **15**, **20**, 25, **30**, 35, **40**, **45**, **50**, 55, **60**, 65, **70**, **75**, **80**...

Be careful with your language. The numbers in the list above divisible by 2

**and** 3 are the multiples of 30. The numbers you put in bold are those divisible by 2

**or** 3.

Let a and b be integers. A number n is divisible by a and b if and only if it is divisible by their least common multiple (lcm), which I denote [a,b]. So if I list out the multiples of a (i.e., if I count by a) and ask which ones are divisible by b, I obtain the multiples of [a,b]. Now it shouldn't be too hard to see that the ratio of multiples of [a,b] to multiples of a is a/[a,b].

We can extend this further. For example, for three integers a, b, and c, let's list out the multiples of a. Which ones are also divisible by b and c? Precisely the ones divisible by [b,c]. So then the ones divisible by a, b, and c are the multiples of [a,[b,c]] = [a,b,c], the least common multiple of a, b, and c. Then the ratio of numbers divisible by a, b, and c to those divisible by a is a/[a,b,c].

We can also answer the question: given the multiples of a, which ones are also divisible by b or c (or both)? Well, we know that a/[a,b] of them are divisible by a and b and a/[a,c] of them are divisible by a and c. If I add these numbers together, I count some numbers too many times. To be precise:

-if m is divisible by a and b but not c, it's only counted in a/[a,b]

-if m is divisible by a and c but not b, it's only counted in a/[a,c]

-if m is divisible by a, b, and c, it's counted in both a/[a,b] and a/[a,c]--i.e., it's counted twice

So to get the right answer, we have to subtract the numbers divisible by a, b, and c to account for them being counted twice. But we just figured this out. So our answer is:

a/[a,b]+a/[a,c]-a/[a,b,c]

I just realized--this means your 1/3 is wrong. If we count just numbers divisible by 2 and 3 out of those divisible by 5, we should get 5/[2,3,5] = 5/30 = 1/6. If we count numbers divisible by 2 or 3 out of those divisible by 5, we get:

5/[2,5]+5/[3,5]-5/[2,3,5] = 5/10+5/15-5/30 = 1/2+1/3-1/6 = 2/3

and this matches up with your list.