Answer:
Step-by-step explanation:
Let n=2α⋅5β⋅m , where gcd(m,10)=1 . Then, the decimal expansion of 1n is of the form
0.a1…akak+1…ak+ℓ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯(1) ,
where k=max{α,β} and ℓ is the least positive integer for which m∣(10ℓ−1) . In other words, ℓ is the order of 10 in the multiplicative group of units modulo m . So ℓ∣ϕ(m) by Lagrange's theorem.
In particular, if gcd(n,10)=1 , then α=β=k=0 , m=n , and
1n=0.a1…aℓ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯(2)
Therefore, we know that
117=0.a1…aℓ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯(3)
Here ℓ is the least positive integer for which 17 divides 9…9ℓtimes , and we know that ℓ divides ϕ(17)=16 .
Successively squaring 10 modulo 17 gives
102≡−2(mod17),104≡4(mod17),108≡−1(mod17),1016≡1(mod17) .
So ℓ=16 in expansion (3) .
In fact,
a1…a16×17=1016–1.
a1…a8+a9…a16=108−1 .
The first fact has nothing to do with the denominator n being prime. The second fact has everything to do with n being prime, and was discovered by E. Midy in 1836 .