# 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.

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)=?$

• But how do you know that is true? I wanted to say that but I don't know why that is true. – jbbrsh1494 Nov 22 '14 at 22:03