Reciprocals of primes

Here’s an interesting little tidbit:

For any prime p except 2 and 5, the decimal expansion of 1/p repeats with a period that divides p − 1.

The period could be as large as p − 1, but no larger. If it’s less than p − 1, then it’s a divisor of p − 1.

Here are a few examples.

1/3 = 0.33…
1/7 = 0.142857142857…
1/11= 0.0909…
1/13 = 0.076923076923…
1/17 = 0.05882352941176470588235294117647…
1/19 = 0.052631578947368421052631578947368421…
1/23 = 0.04347826086956521739130434782608695652173913…

Here’s a table summarizing the periods above.

|-------+--------|
| prime | period |
|-------+--------|
|     3 |      1 |
|     7 |      6 |
|    11 |      2 |
|    13 |      6 |
|    17 |     16 |
|    19 |     18 |
|    23 |     22 |
|-------+--------|

For a proof of the claims above, and more general results, see Periods of Fractions.

4 thoughts on “Reciprocals of primes

  1. There are a few more properties which I almost understand just enough to ask a question:
    What’s going on with integer multiples of reciprocals of primes?
    Take the fraction portion of n/7 (base 10) for all integers n. They are all the same sequence of digits in the same order, just offset. The same is true for (many) other bases. N/7 is trivial in base 7, 14, et cetera. The same happens for other primes (even 2 and 3) you just may have to view them in larger bases to see it. Why?

  2. Late to the party, but if you think of multiplying by 10s, you can look at the stuff after the decimal. Again, as the trivial but it works for everything, if you multiply 7 by 10, you get 1 and 3/7ths. You just moved the decimal point one place over though, so the repeating pattern just repeats on a different starting point

    1/7= .1428571…
    10/7=1.428571…
    10/7=1+3/7
    3/7=.428571…

    Then because these are prime, you can find a multiplier of 10 that will give you each missing fraction (going back to 7, you can find:
    1/7 from 1/7
    3/7 from 10/7
    2/7 from 100/7
    6/7 from 1000/7
    4/7 from 10,000/7
    5/7 from 100,000/7
    1/7 again from 1,000,000
    All in a cute pattern of mod 7 (30mod7 is 2, 20 mod 7 is 6 etc.)
    This works for all prime numbers, but it can get cumbersome at higher primes (the only casual calculator I’ve found which reads all of 1/29 is wolfram alpha)

  3. primeStrength[i_Integer] := {i,
    Length[Last[
    FindTransientRepeat[
    First[ RealDigits[1/Prime[i], 10, Prime[i]*3]], 2]]], Prime[i]}

    strongPrimes[n_Integer, p_Integer] :=
    Select[Table[primeStrength[i], {i, n, p}], #[[2]] + 1 == #[[3]] &]

    That’s the way I made lists of sequences that have p-1 terms

  4. I would like to add some properties of the reciprocals of the primes
    Let k and j are primes, n is positive integer, m is prime, lp is the lenght of period.
    A) Lp of 1/k^n = (lp of 1/k)*k^(n-1)
    B) if lp of 1/k = k-1
    then lp of 1/k^n = k^n – k^(n-1)
    C) Lp of j/k^n = lp of j^m/k^n = lp of 1/k^n

Comments are closed.