6

Consider the decimal expansion of $\frac{1}{p}$ (where $p$ is an odd prime).

Let $F(p)$ be the period of this decimal expansion.

For instance, $F(3) = 1$ (as $\frac{1}{3} = 0.3333$, which has period $1$)

$F(7) = 6$

$F(11) = 2$

$F(13) = 6$

Now consider the function $G(x)$, defined as the number of different primes for which $F(p)=x$.

For instance, $G(1) = 1$. (There is only one prime $(3)$ which results in a decimal expansion of period $1$.)

$G(2) = 1$. (There also seems to be only one prime $(11)$ which results in an expansion of period $2$.)

How does this function behave? Are there any values of $x$ for which $G(x) = 0$. (That is, is there a length of period that never occurs?)

1 Answers1

2

For $p\ge 7$, you need the order of $10$ modulo $p$, the smallest number $u>0$ with $10^u\equiv 1\mod p$. Because of $10^{p-1}\equiv 1\mod p$, we have $u|p-1$. Then, $u$ is the length of the period in the decimal expansion of $\frac{1}{p}$.

To find the primes $p$ with a given length $L$, just factorize $10^L-1$. Then, for every prime $q$ dividing $L$ remove the prime factors of $10^{L/q}-1$. Then, the remaining primes will produce the desired length.

I am not sure, but there should always be at least one prime remaining. Maybe someone can approve this and show a proof , if it is the case.

Peter
  • 84,454
  • Thanks Peter, great answer. I have a feeling you're correct, but don't know how to prove it. As I understand, this means that G(x) = 1, from x = 1 through to 6. – Thomas Delaney Jan 15 '18 at 04:33