Help on proving that every natural number co-prime with 10 is a factor of a repunit [duplicate]

Possible Duplicate:
Proof that a natural number multiplied by some integer results in a number with only one and zero as digits
Why (directly!) does every number divide 9, 99, 999, … or 10, 100, 1000, …, or their product?

Let $n$ be a natural number co-prime with 10, and $m$, another natural number consisting entirely of $1$'s. How do you show that that for every $n$, there exists an $m$ such that $n$ divides $m$?


Solution 1:

Consider the fraction $\frac{1}{n}$. Since $n$ is coprime to $10$, the fraction is a purely repeating fraction with period $k$. Denote the repeating block by $r$. Then taking $9$ copies of $r$ appended with itself (i.e. $x=\underbrace{rr\cdots r}_{9\ \text{times}}$) we have that $x$ is necessarily divisible by $9$. Therefore $$\frac{1}{n} = 0.x\overline{x} \implies \frac{10^{9k}}{n} - x = \frac{1}{n}$$ This then gives $$10^{9k} - 1 = xn \implies \frac{10^{9k} - 1}{9} = \frac{x}{9}n$$