← All projects / Holy 1010
It started with a count. Two families of binary numbers, 0101 and 1010, and the question of which decimal digits each one favours. Then I sorted the digits into god (1), evil (0 4 2), good (3 6 9), best (7) and neutral (5). Here's the count, the structure under those groups, and where 8 lands.
There are two families of alternating-bit numbers. Build each one by starting with a single bit and adding the opposite bit on the left, over and over. Start from 1 and you get 1, 5, 21, 85, 341 (binary 1, 101, 10101...). That's the 0101 family, and it always ends in 1. Start from 0 and you get 2, 10, 42, 170, 682 (binary 10, 1010, 101010...). That's the 1010 family, and it always ends in 0.
Write the numbers out and tally every digit you see. 170 adds one 1, one 7 and one 0. The chart is that tally: how often each digit from 0 to 9 has turned up so far.
You can tally both families together, one family at a time, or see the difference between the two.
The Colour setting repaints every digit on this page, not just this chart. The number on the right is how many times that digit turned up. Sizes above 10,000 were counted ahead of time, because 100,000 numbers is three billion digits a family.
Every 0101 number ends in 1 or 5. Every 1010 number ends in 2 or 0. So doubling takes away a 1 or a 5 and hands back a 2 or a 0, once per number. Pick difference and last digit only and it's exact at every size: plus or minus half the count. With whole numbers it's only a push. The other digits wobble by about as much, so 2 and 1 sometimes land on the wrong side. At 1,000 numbers, 2 is slightly negative.
Pick both families and last digit only. Four digits get a quarter each: 0, 1, 2 and 5. Those are the numbers that divide 10 evenly: 1, 2, 5 and 10 itself, which shows up as a last digit of 0. The 0101 family flips between 1 and 5. Every 1010 number is double its partner, so it flips between 2 and 0. Money uses the same trio to split tens cleanly: 10c, 20c, 50c, $1, $2, $5. It only holds for the last digit, and only in base 10.
In the difference view, at 50 numbers of each family, they're the two biggest movers, in opposite directions, and the last digit doesn't explain either. They're also the pair that swap under doubling on the dial below. Tempting. But drag the slider up. By 400 numbers 6 has flipped to a small plus and 3 is back near zero. By 1,000 it's 6 that is well up. Each digit takes a turn at the extremes, which is what a lucky streak looks like.
No number starts with 0, and about 30% of them start with 1. Then 17.6% with 2, 12.5% with 3, and down to 4.6% with 9. That's Benford's law. Switch to first digit only and it looks the same at 1,000 numbers as at 100,000.
Take off the first and last digit and count middle digits only. I ran it out to 100,000 numbers. The order of the digits reshuffles at every size, and every digit ends up between 9.999% and 10.001%. It behaves like dice.
The raw gaps between the two families don't: go out to 5,000 numbers and they're in the thousands. As a share of all the digits counted, it does. The biggest gap is about 5% at 50 numbers, 0.4% at 400 and 0.03% at 5,000. The counts look like they're heading for an even split. Slide up in any view and every digit closes in on 10%. Tick Zoom in to see the gaps that are left.
In the difference view at 50 numbers, the groups don't split into plus and minus. Good holds both the biggest rise (3) and the biggest drop (6). Evil has 2 going up while 4 goes down, and god (1) drops too. Best (7) and the unplaced 8 both rise a little, and neutral 5 drops. The families further down come from a different place: what doubling does to digital roots.
Each row is one place in the number: the last digit, the one before it, and so on. Each cell is how often that digit lands there, as a percentage. An even split is 10 in every cell.
These are exact, not estimates. The last five digits of each family run in a cycle, so tallying whole cycles gives the true long-run split.
The gap between the most and least common digit at each place, in percentage points. 0 means that place is perfectly even.
It never quite stops, but it shrinks fast. The 1010 family echoes at every second place: 50, then 4, then 0.16, then 0.0064. Each echo is 25 times weaker than the one before. The 0101 family does the same on the places in between: 20, then 0.8, then 0.032. By the 9th place the gap is under a thousandth of a percentage point.
One trick runs this whole page. Add up a number's digits until a single digit is left: 85 gives 8 + 5 = 13, then 1 + 3 = 4. That last digit is the number's digital root.
Top row is the real number, the circle under it is its digital root. Click any digit on the dial to start from it.
Adding up digits is a shortcut for one thing: the remainder after dividing by 9, with 9 standing in for 0. It works because 10 is one more than 9.
9 is 3 × 3. The digits 3, 6 and 9 share that factor of 3. The other six share nothing with 9. Doubling can't add a factor of 3 and can't take one away, so a digit never changes sides.
That makes 3 6 9 a fact about counting in tens. Count in a different base and the cut-off group changes with it.
Filled circles are the cut-off group: digits that share a factor with (base − 1). Arrows show doubling.
Pair each digit with the one that tops it up to 9.
My labels line up with this. The mirror images of evil 4 and 2 are 5 and 7: my neutral and my best. The mirror of 1, which I call god, is 8, the one I hadn't placed. Good pairs with good.
Now write the doubling loop in two rows of three.
The second half of the loop is the first half reflected. 8 is where the flip happens. It sits one short of 9, so in digital roots it behaves like −1: multiply by 8 and every digit swaps with its mirror partner.
7 and 5 are also powers of two in disguise. 16 gives 1 + 6 = 7, and 32 gives 3 + 2 = 5. On the dial, tick Show mirror pairs and you'll see partners sit level with each other, left and right.
Take any whole number. If it's even, halve it. If it's odd, triple it and add 1. Keep going.
Every number anyone has tried ends up circling 4, 2, 1 forever. Nobody has proved it has to. Computers have checked every start up to about 295 quintillion. It's called the Collatz problem.
Outlined numbers are Holy 0101 numbers. The coloured tail is the way in: 8, then 4 2 1.
Work backwards. The only number that leads to 1 is 2. The only number that leads to 2 is 4. The only numbers that lead to 4 are 8 and 1. So every path from outside enters the loop through 8.
Triple any 0101 number (5, 21, 85, 341...) and add 1, and you land exactly on a power of two. From there it's halving all the way down. The 1010 numbers (10, 42, 170...) are their doubles, one halving behind.
85 = 1010101 85 × 3 = 11111111 + 1 = 100000000 (256)
That makes them the fastest odd numbers there are. 85 reaches 1 in 9 steps. Its odd neighbours 83 and 87 take 110 and 30. No odd number with the same number of bits can beat a Holy number.
And the last odd number on any path is always one of them. Most paths come in through 5.
Every dot is a number. The further right, the bigger the number. The higher up, the more steps it needs to reach 1. The Holy numbers run along the bottom: no odd number gets there faster.
Numbers are spaced by size, so each mark along the bottom is ten times bigger than the last. The dotted line is the floor: halving all the way down, which only a power of two can do.
Six ways to sort the digits, and where 8 lands in each.
By blood, 8 is on the 4 2 1 side. It's the next power of two after 4, it runs in the same doubling loop, and it's the one door into the trap.
By behaviour, it's the opposite of 1. They add to 9, and 8 is the exact point where the loop turns from 1 2 4 into 7 and 5.
So it doesn't sit cleanly in evil, best or neutral. It's the hinge between them, which is a category of its own.