1

So I stumbled on this by accident. Turns out that for example 1/17 has a period of 16 decimals, 1/19 has 18, 1/23 has 22 and lastly 1/97 has 96. So is it a general rule that for 1/n, if n is prime then the length of the period is n-1? If so why? It also works for 1/7 which is 6 repeating decimals. Thank you so much!

1 Answers1

1

$\frac1{11}$ repeats with period only $2$ in base $10$. The correct formula for the repeat length of $\frac1p$ is the order of $10$ modulo $p$, i.e. the least $k$ with $10^k\equiv1\bmod p$. This is equal to $p-1$ precisely when $10$ is a primitive root modulo $p$.

Parcly Taxel
  • 103,344