How 1 ÷ 7 Becomes a Whole Number in 10-Adics
Resumen
Pixel's announcement introduces 10-adic numbers, a century-old number system where digits extend infinitely to the left. It uses repeated squaring, twin number endings that multiply to zero, and powers of ten divided by seven to show how 1 ÷ 7 can be a whole number in this system. The examples make an unusual mathematical idea approachable and spark curiosity about number systems.
DEV Community
1/7 is a whole number. Your number system just hasn't heard yet.
People invented numbers, and the rules you learned in school are one choice. Change a single rule and you get a different number system, just as solid, that mathematicians have used for over a century. In that one, 1 ÷ 7 is a whole number. Grab a calculator. This takes two minutes, and you'll see it happen. 1. Square 5. Then keep going. 5 × 5 = 25
25 × 25 = 625
625 × 625 = 390625
390625 × 390625 = 152587890625
Look at the end of each answer. It stops changing. …625 shows up and never leaves, then …90625, then …890625. Each step locks in at least one more digit on the right, sometimes several at once. Keep squaring forever and the ending freezes into one endless number that runs off to the left: …918212890625
and here's the weird part: that number is its own square. Check the last few digits yourself: 90625 × 90625 = 8212890625 ← ends in 90625 again
2. It has a twin There's exactly one other ending like that (besides 0 and 1). It starts from 6: 9376 × 9376 = 87909376 ← ends in 9376 again
Now add the two endings: 90625 + 9376 = 100001
Carry that on forever and the twins …918212890625 and …081787109376 add up to exactly 1. Multiply them and you get exactly 0. Two numbers, neither of them zero, that multiply to zero. 3. Now 1 ÷ 7 Everyone knows this one: 1 ÷ 7 = 0.142857142857…
The digits 142857 repeat to the right, forever. Now divide these by 7: 1001 ÷ 7 = 143
1000000001 ÷ 7 = 142857143
1000000000000001 ÷ 7 = 142857142857143
Same digits. Except now they grow to the left. Carry it on forever and you get …142857142857143, a number with no decimal point that, times 7, is exactly 1. In the world where digits run left forever, 1 ÷ 7 is a whole number. (Try 1001 ÷ 11 and 1000000001 ÷ 13 against 1 ÷ 11 and 1 ÷ 13. Same trick.) This isn't crank maths. It's 129 years old. These are the 10-adic numbers, the base-10 cousin of the p-adic numbers Kurt Hensel introduced in 1897. One rule changes: two numbers count as close when their endings match. In that world, …999999 is -1, …666667 is 1/3, and …890625 is a perfectly good number that equals its own square (it's called an automorphic number). Your calculator can only ever see the last few digits, so it can't play here. So I built something that can. Past Forever: infinite loops that finish Past Forever is a tiny language where you write the loop that never ends, and it hands you the answer after forever. Then your program keeps going. x = 5
forever: x = x × x
show x
show x × x = x
…918212890625
yes (proved)
x = 1 / 7
show x
show x × 7
…857142857143 (this is 1/7)
1
x = 0 step = 9
forever: x = x + step step = step × 10
show x
show x + 1
…999999999999 (this is -1)
0
It never stores infinitely many digits. It finds the pattern and proves where it goes. That's why your calculator rounds, and Past Forever doesn't. It's allowed to say "I don't know" Every forever loop ends in one of three honest answers: answer example what it prints a number, with proof square 5 forever …918212890625 never settles, with proof square 6 forever never settles (the last two digits go 36, 96, 16, 56 forever) can't see the end 196, reverse and add forever can't see the end Searches over infinitely many numbers work too: found = no n = 0
forever: n = n + 1 if n × n ends in 7: found = yes
show found
no (proved)
That checked every square there is. Ask why found and it shows its work: the last digit of a square repeats every 10 steps, so 10 cases cover forever, and none of them ends in 7. Hunting liars Point it at a whole range at once: hunt c from 0 to 99:
x = 0
forever: x = x × x + c
show x
hunt c from 0 to 99: tried 100 numbers, 5 kinds of answer
settles 10 0, 10, 20, 30, 40, 50, 60, 70, …
ring of 6 10 1, 11, 21, 31, 41, 51, 61, 71, …
goes wild 40 2, 3, 7, 8, 12, 13, 17, 18, …
ring of 2 30 4, 5, 9, 14, 15, 19, 24, 25, …
ring of 3 10 6, 16, 26, 36, 46, 56, 66, 76, …
Some of the wild...

Powered by Readybot.io