# Maximum Period of Reciprocal of Prime

## Theorem

Let $p$ be a prime number such that $p$ is not a divisor of $10$.

The period of recurrence of the reciprocal of $p$ when expressed in decimal notation is less than or equal to $p - 1$.

## Proof

When $p \divides 10$, $\dfrac 1 p$ expressed in decimal notation is a terminating fraction:

\(\ds \dfrac 1 2\) | \(=\) | \(\ds 0 \cdotp 5\) | ||||||||||||

\(\ds \dfrac 1 5\) | \(=\) | \(\ds 0 \cdotp 2\) |

So let $p$ be such that $p \nmid 10$.

From Period of Reciprocal of Prime, the period of recurrence is the order of $10$ modulo $p$.

That is, it is the smallest integer $d$ such that:

- $10^d \equiv 1 \pmod p$

From Fermat's Little Theorem:

- $10^{p - 1} \equiv 1 \pmod p$

Hence the maximum period of recurrence occurs when the order of $10$ modulo $p$ is $p - 1$.

To demonstrate that the maximum period of recurrence occurs for at least one prime number, we take $7$ as an example.

$7$ is a prime number which is not a divisor of $10$.

From Period of Reciprocal of 7 is of Maximal Length:

- $\dfrac 1 7 = 0 \cdotp \dot 14285 \dot 7$

recurring with period $7 - 1 = 6$.

$\blacksquare$