On this page
Type 1 ÷ 7 into a calculator and you get 0.142857142857... This comes from the remainders in long division, and once you see how, you can write down every seventh without dividing again.
What happens when you divide 1 by 7 by long division?
Write 1 as 1.000000... and divide by 7. Each time you bring down a zero, you are really dividing 10 times the last remainder by 7.
10 ÷ 7 = 1, remainder 3
30 ÷ 7 = 4, remainder 2
20 ÷ 7 = 2, remainder 6
60 ÷ 7 = 8, remainder 4
40 ÷ 7 = 5, remainder 5
50 ÷ 7 = 7, remainder 1
After step 6 the remainder is 1 again, exactly where you started. So step 7 copies step 1, step 8 copies step 2, and the digits 1, 4, 2, 8, 5, 7 come round again and again: 1/7 = 0.142857 recurring. The diagram at the top draws this list as a loop.
Why must the remainders repeat within 6 steps?
When you divide by 7, the remainder can only be 0, 1, 2, 3, 4, 5 or 6. A remainder of 0 would mean the decimal stops, and that never happens for 7. A decimal that ended after k places would mean 7 divides 10 to the power k, but the only prime factors of a power of 10 are 2 and 5. So every remainder is one of just six numbers, 1 to 6.
Counting the starting remainder 1, six steps give seven remainders but only six values exist, so one must repeat within six steps (the pigeonhole principle). Each step depends only on the current remainder, so from that point the division repeats itself, as the Wikipedia article on repeating decimals explains.
So the block can be at most 6 digits long, and 1/7 reaches that ceiling because its remainders visit all six values before returning to 1.
Why do 2/7 and 3/7 use the same six digits?
Look at the remainders above: 3, 2, 6, 4, 5, 1. Every non-zero remainder sits on one loop. Dividing 2 by 7 simply starts that loop at remainder 2 instead of 1: 20 ÷ 7 = 2 remainder 6, then 60 ÷ 7 = 8 remainder 4, and the familiar digits follow. So 2/7 = 0.285714 recurring, the same six digits rotated.
In the same way, 3/7 = 0.428571... and 6/7 = 0.857142..., as the repeating decimal article lists. That is why 142857 is called a cyclic number: 142857 × 2 = 285714, 142857 × 3 = 428571, and so on up to 142857 × 6 = 857142, each a rotation of the same digits (Wikipedia: Cyclic number).
How can you write any n/7 without dividing?
Find the first digit: divide 10n by 7 and ignore the remainder. For 5/7, 50 ÷ 7 gives 7.
Find that digit in the loop 1, 4, 2, 8, 5, 7.
Read six digits from there, wrapping round. So 5/7 = 0.714285 recurring.
Check yourself: for 4/7, 40 ÷ 7 gives 5, so 4/7 = 0.571428 recurring.
Does every 1/p have a repeating block of length p − 1?
No. A prime whose reciprocal has the longest possible block, p − 1 digits, is called a full reptend prime, and Wolfram MathWorld lists the first few as 7, 17, 19, 23 and 29. Many primes fall short. The OEIS sequence A002371, which gives the period of 1/p for each prime p, shows a period of 1 for 1/3, 2 for 1/11 and 6 for 1/13, even though 13 allows up to 12 remainders.
When the period is shorter, the remainders split into separate loops: 1/13 = 0.076923 recurring, but 2/13 = 0.153846 recurring uses a different loop. Even so, for every prime p other than 2 and 5, the period of 1/p divides p − 1, which follows from Fermat's little theorem (Wikipedia: Repeating decimal). For 13, 6 divides 12; for 11, 2 divides 10.
How can you practise this in 20 minutes?
Do 1 ÷ 7 by hand, writing each remainder in a column beside the quotient digit. Stop when a remainder repeats.
Write 2/7 to 6/7 using the shortcut, then check two on a calculator.
Do 1 ÷ 13 and 2 ÷ 13 the same way and compare their remainder loops.
Go backwards: turn 0.142857 recurring into a fraction with the subtraction method for recurring decimals.
Stretch: "multiply the remainder by 10, divide by 7, keep the remainder" is modular arithmetic; see how to find remainders of large powers for JEE.
If a long division goes wrong and you can't see where, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. For the ideas underneath, remainders, rational numbers and modular arithmetic, the Fermi Concept Library gives each concept its own lesson and its place in the map.
Next time you see 142857, read it as six remainders chasing each other round a loop.



