2

The length of the repetend (period of the repeating decimal segment) of $\frac{1}{p}$ is equal to the order of 10 modulo p.

This result seems interesting, but I don't have a good number theory theory background; I wish to see a proof of this elegant result.

Please suggest me where to find it.

J. W. Tanner
  • 60,406
Cloud JR K
  • 2,466

2 Answers2

3

Imagine computing $1/p$ in decimal using long division.

At each step you have a remainder from the previous digit, and then you do:

  1. append a digit from the dividend -- this is always $0$ in this case, so the effect is to multiply by ten.

  2. subtract as large a multiple of $p$ as you can without going negative. The effect of this is taking the remainder by $p$.

The combined effect of these two steps is that the remainder in each step undergoes exactly multiplication by $10$, modulo $p$. The number of steps until this repeats is by definition "the order of 10 modulo $p$".

(This assumes that $10$ is coprime to $p$; otherwise the order of 10 is not even well defined. However, when $10$ is coprime to $p$ we can reverse the "multiply by 10" step, so we can see that the only way for the sequence of remainders to repeat (and repeat it must because there are only $p$ possibilities) is to get back to $1$).

  • The number of steps until this repeats is by definition "the order of 10 modulo p". Order of 10 mod p is the smallest n such that $10^n=1mod p $. Could you explain a little – Cloud JR K Jun 25 '19 at 13:31
  • @CloudJR: Indeed. And when you start with $1$ and repeat "multiply by $10$" $n$ times, what you get is exactly $10^n$. So $10^n\bmod p$ is the remainder after $n$ steps of the long division algorithm. – hmakholm left over Monica Jun 25 '19 at 13:32
  • I will wait for sometime , if someone post answer with different approach, and i will accept your answer later, thanks – Cloud JR K Jun 25 '19 at 13:40
2

Hint:

$$\dfrac{10^n-1}p\dfrac1{10^n}+\dfrac{10^n-1}p\dfrac1{10^{2n}}+\dfrac{10^n-1}p\dfrac1{10^{3n}}+...$$

$$=\dfrac{10^n-1}p\left(\dfrac1{10^n}+\dfrac1{10^{2n}}+\dfrac1{10^{3n}}...\right)$$

$$=\dfrac{10^n-1}p\dfrac1{10^n}\dfrac1{1-\dfrac1{10^n}}=\dfrac1p$$

J. W. Tanner
  • 60,406