M1. Consider the sequence $5,55,555,5555,55555, \ldots$
Are any of the numbers in this sequence divisible by 495 ; if so, what is the smallest such number?
Solution
Note that $495=5 \times 9 \times 11$, so that a number is divisible by 495 if it is divisible by all of 5, 9 and 11, and not otherwise.
Every number in the sequence has 'units' digit 5 , so is divisible by 5 .
Each even term of the sequence is divisible by 11 , but each odd term is not, since it has a remainder of 5 when divided by 11 .
It is therefore enough to find the first even term which is divisible by 9 .
Suppose a term has $2 k$ digits; then its digit sum is $10 k$. But a number is divisible by 9 when its digit sum is divisible by 9 , and not otherwise. So the first even term divisible by 9 is the one for which $k=9$.
Therefore the first term divisible by 495 is the 18 th term
$$
555555555555555555 \text {, }
$$
which consists of 18 digits 5 .