# Recurring Decimals

Came across a funny little problem last week. Explain the following:

For primes $p \ge 7$ , the decimal expansion of $\frac{1}{p}$ is non-terminating. Is there a formula for the number of repeating digits?

$\frac{1}{7} = 0.\overline{142857}$ 6 digits

$\frac{1}{11} = 0.\overline{09}$ 2 digits

$\frac{1}{13} = 0.\overline{076923}$ 6 digits

$\frac{1}{17} = 0.\overline{0588235294117647}$ 16 digits

and my favourite twin primes

$\frac{1}{41} = 0.\overline{02439}$ 5 digits

$\frac{1}{43} = 0.\overline{023255813953488372093}$ 21 digits

This entry was posted in Number Theory, Problems. Bookmark the permalink.

### 2 Responses to Recurring Decimals

1. Steve says:

Yes there is – Theorem 135 from Hardy & Wright (4th edition) looks at the decimal for any rational. In the case of 1/p it says that:
a) there are no non-recurring digits
b) there are v recurring digits where v is the order of 10 mod p ie the smallest solution of 10^v=1 mod p

2. tpc says:

Yes, that’s the answer but I didn’t know that it appeared in Hardy & Wright. Thanks for the reference. I really have to get a copy of that book. Although, I remember vaguely that someone is working on a new version of that classic, so I’m waiting.