1
$\begingroup$

How can I count the number of numbers divisible by both 5 and 6?

For example let's take only tree-digit numbers, how many of them are divisible by both 5 and 6?

I know how to do it just for 5 or just for 6, using the arithmetic sequence

an = a1 + (n-1)*d 

So for just for 5:

995 = 100 + (n-1)*5 n = 180 

And just for 6:

996 = 102 + (n-1)*6 n = 150 

But how can I count the numbers divisible by both 5 and 6? I know that the answer is 30, but I don't know how to calculate it.

  • 0
    $5|x$ and $6|x$ if and only if $30|x$ (and someone correct me if I'm wrong...)2012-04-12

3 Answers 3

4

If $n$ is divisible by 5 and by 6, then it is divisible by 30, and conversely; so just apply your method with $d = 30$ and you're done.

(A much more challenging, and fun, question is to count three-digit numbers divisible by 5 or 6.)

  • 1
    This answer could be a comment!2012-04-12
1

If n is divisible by m1 and by m1, then it is divisible by LCM of m1 and m2. you can apply your method with d= LCM of 5 and 6 =30.

1

Hint $\:$ Note $\rm\ \ \ 5,\:\!6\ |\ n\ \Rightarrow\ 30\ |\ n\ \ \ since\ \ \displaystyle \frac{n}{5},\; \frac{n}{6}\in\mathbb{Z} \;\;\Rightarrow\;\; \frac{n}{5} - \frac{n}{6} \; = \;\frac{n}{30} \in \mathbb Z$

Or: $\rm \ \ a,\:\!a\!+\!1\ |\ n\ \Rightarrow\ a(a\!+\!1)\ |\ n\ \ \ by\ \ \displaystyle \frac{n}{a},\; \frac{n}{a\!+\!1}\in\mathbb{Z} \;\;\Rightarrow\;\; \frac{n}{a} - \frac{n}{a\!+\!1} \; = \;\frac{n}{a(a\!+\!1)} \in \mathbb Z$

Generally $\rm\ a,b\ |\ n\iff lcm(a,b)\ |\ n.\:$ See this post for much more on related matters.