Ma · Mathematics

Why Is the Decimal Expansion of 1/7 Cyclical?

Published By the 9to5Science editorial team

At a glance

  1. 1. Track the remainders

    In long division, each next remainder is ten times the previous remainder modulo seven.

  2. 2. Follow the cycle

    The remainders return to their starting value after six steps, producing the repeating digits 142857.

  3. 3. Start elsewhere

    Dividing numerators two through six by seven starts at different points in the same remainder cycle.

  4. 4. Connect the rotations

    Those different starting points explain why the first six multiples of 142857 are rotations of its digits.

Advertisement

The decimal expansion of 1/71/7 is 0.142857142857…0.142857142857\ldots, with the six-digit block 142857142857 repeating forever. It is called cyclical because the same digits appear in a loop, and because the first six multiples of 142857142857 are rotations of that block.

The reason is visible in the steps of long division. At each step, the next decimal digit is determined by the current remainder. For division by 7, the remainders cycle through all six possible nonzero remainders and then return to the start.

How long division creates the cycle

Suppose the current remainder is rr. To find the next decimal digit, multiply rr by 10, divide by 7, and keep the new remainder. In modular notation, the next remainder is 10r mod 710r \bmod 7.

Starting with remainder 1, the calculation is:

Current remainderMultiply by 10Next digitNew remainder
110 = 1 × 7 + 313
330 = 4 × 7 + 242
220 = 2 × 7 + 626
660 = 8 × 7 + 484
440 = 5 × 7 + 555
550 = 7 × 7 + 171

The digits in the third column give 142857142857. The last remainder is 1 again, so the next long-division step repeats exactly: it produces another 1 and returns to remainder 3. That is why the digits repeat in the same order.

In modular arithmetic, the remainders are generated by repeatedly multiplying by 10 modulo 7. Since 10≡3(mod7)10 \equiv 3 \pmod 7, the sequence is

1, 3, 2, 6, 4, 5, 1,…1,\ 3,\ 2,\ 6,\ 4,\ 5,\ 1,\ldots

It takes six steps to return to 1. In fact, 106≡1(mod7)10^6 \equiv 1 \pmod 7, and no smaller positive power of 10 is congruent to 1 modulo 7. So the repeating block has length 6, not merely a length that divides 6.

Why the other fractions give rotations

For n/7n/7, where nn is one of 1,2,…,61,2,\ldots,6, long division starts with remainder nn instead of 1. Those starting remainders are all in the same six-remainder loop. Starting at a different point in the loop gives the same repeating digits, shifted to a different starting position:

FractionDecimal expansion
1/71/70.142857‾0.\overline{142857}
2/72/70.285714‾0.\overline{285714}
3/73/70.428571‾0.\overline{428571}
4/74/70.571428‾0.\overline{571428}
5/75/70.714285‾0.\overline{714285}
6/76/70.857142‾0.\overline{857142}

For example, the remainder cycle for 2/72/7 begins at 2. The digits therefore begin at the third digit of the cycle for 1/71/7: 2,8,5,7,1,42,8,5,7,1,4. This produces 0.285714‾0.\overline{285714}, a rotation of 0.142857‾0.\overline{142857}.

The corresponding six-digit integer has the same pattern in its multiples:

142857×1=142857,142857×2=285714,142857×3=428571,142857×4=571428,142857×5=714285,142857×6=857142.\begin{aligned} 142857 \times 1 &= 142857,\\ 142857 \times 2 &= 285714,\\ 142857 \times 3 &= 428571,\\ 142857 \times 4 &= 571428,\\ 142857 \times 5 &= 714285,\\ 142857 \times 6 &= 857142. \end{aligned}

This is the familiar cyclic-number property. It also follows from the exact equality

17=142857999999,\frac{1}{7}=\frac{142857}{999999},

which holds because 7×142857=9999997 \times 142857=999999. Multiplying the numerator by 2,3,…,62,3,\ldots,6 gives the rotations shown above.

Common mistakes

  • Thinking the digits repeat because 7 is prime. Primality alone does not determine the length of a decimal repetend. The length depends on how quickly powers of 10 return to 1 modulo the denominator.
  • Confusing a repeating decimal with an infinite nonrepeating one. A rational number such as 1/71/7 must have a decimal expansion that terminates or eventually repeats. Here it repeats from the first digit because the long-division remainders return to 1 immediately after the cycle.
  • Assuming every denominator gives rotations of this kind. The rotations occur here because the remainders for 1/71/7 run through every nonzero residue modulo 7. Other denominators can produce shorter cycles or cycles that do not include every possible nonzero remainder.

The key mechanism is the remainder loop: multiplying by 10 modulo 7 visits all six nonzero remainders before returning to the start. The repeating digits record that loop, and the rotations come from entering it at different remainders.

References

  1. Elementary Number Theory

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.