<s>[INST] Prove that for integer n greater than 2 and is coprime to 10, the decimal expansion of $\frac{1}{n}$ repeats with period of ${e_n(10)}$ Prove that for integer n greater than 2 and is coprime to 10, the decimal expansion of $\frac{1}{n}$ repeats with period of ${e_n(10)}$ (the order of 10 mod n). I tried computing $\frac{1}{10^{e_n(10)}-1}$ but got stuck. Any insights?
 [/INST] Note: $\frac 1{a-1} = \frac a{a(a-1)} = \frac {a-1}{a(a-1)} + \frac 1{a(a-1)} = \frac 1a + \frac1{a(a-1)}=\frac 1a + \frac 1a(\frac 1a + \frac 1{a(a-1)})=\frac 1a + \frac 1{a^2} + \frac 1{a^2(a-1)}=....$.
And by induction $\frac 1{a-1} = \frac 1a + \frac 1{a^2} + \frac 1{a^3} + ....$ 
So $\frac 1{10^m -1} = \frac 1{10^m} + \frac 1{10^m(10^m-1)}$.
ANd by induction:
$\frac 1{10^m-1} = \frac 1{10^m} + \frac 1{10^{2m}} + \frac 1{10^{3m}} + ....=$
$\sum\limits_{k=1}^\infty \frac 1{10^{mk}}$.
So...
$10^{e(n)} \equiv 1 \pmod n$ so
$10^{e(n)} = 1 + Kn$ for some $K$.  (And obviously $K < 10^{e(n)}$)
So $\frac 1n = K\frac 1{10^{e(n)} -1}=$
$K\sum\limits_{k=1}^\infty \frac 1{10^{e(n)k}}=\sum\limits_{k=1}^\infty \frac K{10^{e(n)k}}$
And as $K$ has $10^{e(n)}$ digits or fewer this is a repeating decimal with a period of $e(n)$.
</s>