# Show that for any integer not divisible by 2 or 5, there is a multiple of it which is a string of 1s. [duplicate]

Given that a number $n \equiv\{1,3,7,9\} \pmod{10}$ show that there is a multiple of $n$, $q$ that is a string of consectutive $1$s.

## marked as duplicate by Micah, ajotatxe, mfl, hardmath, Joel Reyes NocheNov 22 '14 at 22:08

Hint : A string containing of $k$ $1's$ has the form $\frac{10^k-1}{9}$ , so you have to solve the equation $10^k\equiv 1\ (\ mod\ n\ )$
As a first approximation to an answer: If $\frac1n=0.\overline{a_1\ldots a_d}$, then $n\times(a_1\ldots a_d)=?$