# Let $n$ be a positive integer which is not divisible by $2$ and $5.$ Prove that there is a multiple of $n$ consisting entirely of ones. [duplicate]

Let $n$ be a positive integer which is not divisible by $2$ and $5.$ Prove that there is a multiple of $n$ consisting entirely of ones.

This problem possibly is a duplicate, and I am using the android app in which I don't know how to find existing questions.

I think this can be solved by using Fermat's Little Theorem.

Any help will be appreciated

## marked as duplicate by Shailesh, S.C.B., Behrouz Maleki, naslundx, HenrikSep 3 '16 at 19:25

• Hint: prove that there is a multiple of $n$ consisting entirely of nines. – PM 2Ring Sep 3 '16 at 14:50
Note that $n$ is coprime to $10$.
By Euler's theorem, we have that $$10^{\phi(n)}-1 \equiv 0 \pmod {n}$$
If $n$ is a coprime to $9$, we have that $$\frac{10^{\phi(n)}-1}{9} \equiv 0 \pmod {n}$$ Note $\frac{10^{\phi(n)}-1}{9}$ consisted only of $1$s.