The length of the repetend of $\frac{1}{p}$ is equal to the order of $10$ modulo $p$.

548 Views Asked by At

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.

2

There are 2 best solutions below

1
On BEST ANSWER

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$$

3
On

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$).