# Mötley Vüe

Here’s the Fibonacci sequence, where each term (after the first two) is created by adding the two previous numbers:

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765...

In “Fib and Let Tri”, I described how my eye was caught by 55, which is a palindrome, reading the same backwards and forwards. “Were there any other Fibonacci palindromes?” I wondered. So I looked to see. Now my eye has been caught by 55 again, but for another reason. It should be easy to spot another interesting aspect to 55 when the Fibonacci numbers are set out like this:

fib(1) = 1
fib(2) = 1
fib(3) = 2
fib(4) = 3
fib(5) = 5
fib(6) = 8
fib(7) = 13
fib(8) = 21
fib(9) = 34
fib(10) = 55
fib(11) = 89
fib(12) = 144
fib(13) = 233
fib(14) = 377
fib(15) = 610
fib(16) = 987
fib(17) = 1597
fib(18) = 2584
fib(19) = 4181
fib(20) = 6765
[...]

55 is fib(10), the 10th Fibonacci number, and 5+5 = 10. That is, digsum(fib(10)) = 10. What other Fibonacci numbers work like that? I soon found some and confirmed my answer at the Online Encyclopedia of Integer Sequences:

1, 5, 10, 31, 35, 62, 72, 175, 180, 216, 251, 252, 360, 494, 504, 540, 946, 1188, 2222 — A020995 at OEIS

And that seems to be the lot, according to the OEIS. In base 10, at least, but why stop at base 10? When I looked at base 11, the numbers of digsum(fib(k)) = k didn’t stop coming, because I couldn’t take the Fibonacci numbers very high on my computer. But the OEIS gives a much longer list, starting like this:

1, 5, 13, 41, 53, 55, 60, 61, 90, 97, 169, 185, 193, 215, 265, 269, 353, 355, 385, 397, 437, 481, 493, 617, 629, 630, 653, 713, 750, 769, 780, 889, 905, 960, 1013, 1025, 1045, 1205, 1320, 1405, 1435, 1501, 1620, 1650, 1657, 1705, 1735, 1769, 1793, 1913, 1981, 2125, 2153, 2280, 2297, 2389, 2413, 2460, 2465, 2509, 2533, 2549, 2609, 2610, 2633, 2730, 2749, 2845, 2893, 2915, 3041, 3055, 3155, 3209, 3360, 3475, 3485, 3521, 3641, 3721, 3749, 3757, 3761, 3840, 3865, 3929, 3941, 4075, 4273, 4301, 4650, 4937, 5195, 5209, 5435, 5489, 5490, 5700, 5917, 6169, 6253, 6335, 6361, 6373, 6401, 6581, 6593, 6701, 6750, 6941, 7021, 7349, 7577, 7595, 7693, 7740, 7805, 7873, 8009, 8017, 8215, 8341, 8495, 8737, 8861, 8970, 8995, 9120, 9133, 9181, 9269, 9277, 9535, 9541, 9737, 9935, 9953, 10297, 10609, 10789, 10855, 11317, 11809, 12029, 12175... — A020995 at OEIS

The list ends with 1636597 = A18666[b11] and the OEIS says that 1636597 almost certainly completes the list. According to David C. Terr’s paper “On the Sums of Fibonacci Numbers” (pdf), published in the Fibonacci Quarterly in 1996, the estimated digit-sum for the k-th Fibonacci number in base b is given by the formula (b-1)/2 * k * log(b,φ), where log(b,φ) is the logarithm in base b of the golden ratio, 1·61803398874… Terr then notes that the simplified formula (b-1)/2 * log(b,φ) gives the estimated average ratio digsum(fib(k)) / k in base b. Here are the estimates for bases 2 to 20:

b02 = 0.3471209568153086...
b03 = 0.4380178794859424...
b04 = 0.5206814352229629...
b05 = 0.5979874356654401...
b06 = 0.6714235829697111...
b07 = 0.7418818776805580...
b08 = 0.8099488992357201...
b09 = 0.8760357589718848...
b10 = 0.9404443811249043...
b11 = 1.0034045909311624...
b12 = 1.0650963641043091...
b13 = 1.1256639207937723...
b14 = 1.1852250528196852...
b15 = 1.2438775226715552...
b16 = 1.3017035880574074...
b17 = 1.3587732842474014...
b18 = 1.4151468584732730...
b19 = 1.4708766105122322...
b20 = 1.5260083080264088...

In base 2, you can expect digsum(fib(k)) to be much smaller than k; in base 20, you can expect digsum(fib(k)) to be much larger. But as you can see, the estimate for base 11, 1.0034045909311624…, is very nearly 1. That’s why base 11 produces so many results for digsum(fib(k)) = k, because only a slight deviation from the estimate might create a perfect ratio of 1 for digsum(fib(k)) / k, i.e. digsum(fib(k)) = k. But in the end the results run out in base 11 too, because as k gets higher and fib(k) gets bigger, the estimate becomes more and more accurate and digsum(fib(k)) > k. With lower k, digsum(fib(k)) can easily fall below k or match k. That happens in other bases, but because their estimates are further from 1, results for digsum(fib(k)) = k run out much more quickly.

To see this base behavior represented visually, I’ve created Ulam-like spirals for k using three colors: blue for digsum(fib(k)) < k, yellow for digsum(fib(k)) > k, and red for digsum(fib(k)) = k (with the green square at the center representing fib(1) = 1). As you can see below, the spiral for base 11 immediately stands out. It’s motley, not dominated by blue or yellow like the other spirals:

Spiral for digsum(fib(k)) in base 9
(blue for digsum(fib(k)) < k, yellow for digsum(fib(k)) > k, red for digsum(fib(k)) = k, green for fib(1))

Spiral for digsum(fib(k)) in base 10

Spiral for digsum(fib(k)) in base 11 — a motley view of blue, yellow and red

Spiral for digsum(fib(k)) in base 12

Spiral for digsum(fib(k)) in base 13

Finally, here are spirals at higher and higher resolution for digsum(fib(k)) = k in base 11:

digsum(fib(k)) = k in base 11 (low resolution)
(green square is fib(1))

digsum(fib(k)) = k in base 11 (x2 resolution)

digsum(fib(k)) = k in base 11 (x4)

digsum(fib(k)) = k in base 11 (x8)

digsum(fib(k)) = k in base 11 (x16)

digsum(fib(k)) = k in base 11 (x32)

digsum(fib(k)) = k in base 11 (x64)

digsum(fib(k)) = k in base 11 (x128)

digsum(fib(k)) = k in base 11 (animated)

# Spiral Artefact

What’s the next number in this sequence of integers?

5, 14, 19, 23, 28, 32, 37, 41, 46, 50, 55... (A227793 at the OEIS)

It shouldn’t be hard to work out that it’s 64 — the sum-of-digits of n is divisible by 5, i.e., digsum(n) mod 5 = 0. Now try summing the numbers in that sequence:

5 + 14 = 19
19 + 19 = 38
38 + 23 = 61
61 + 28 = 89
89 + 32 = 121
121 + 37 = 158
158 + 41 = 199
199 + 46 = 245
[...]

Here are the cumulative sums as another sequence:

5, 19, 38, 61, 89, 121, 158, 199, 245, 295, 350, 414, 483, 556, 634, 716, 803, 894, 990, 1094, 1203, 1316, 1434, 1556, 1683, 1814, 1950, 2090, 2235, 2389, 2548, 2711, 2879, 3051, 3228, 3409, 3595, 3785, 3980, 4183, 4391, 4603, 4820, 5041, 5267, 5497, 5732, 5976, 6225...

And there’s that cumulative-sum sequence represented as a spiral:

Spiral for cumulative sum of n where digsum(n) mod 5 = 0

You can see how the spiral is created by following 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E… from the center:

ZYXWVU
GFEDCT
H432BS
I501AR
J6789Q
KLMNOP

What about other values for the cumulative sums of digsum(n) mod m = 0? Here’s m = 2,3,4,5,6,7:

Spiral for cumulative sum of n where digsum(n) mod 2 = 0
s1 = 2, 4, 6, 8, 11, 13, 15, 17, 19, 20, 22…
s2 = 2, 6, 12, 20, 31, 44, 59, 76, 95, 115… (cumulative sum of s1)

sum of digsum(n) mod 3 = 0
s1 = 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33…
s2 = 3, 9, 18, 30, 45, 63, 84, 108, 135, 165…

sum of digsum(n) mod 4 = 0
s1 = 4, 8, 13, 17, 22, 26, 31, 35, 39, 40, 44…
s2 = 4, 12, 25, 42, 64, 90, 121, 156, 195, 235…

sum of digsum(n) mod 5 = 0
s1 = 5, 14, 19, 23, 28, 32, 37, 41, 46, 50, 55…
s2 = 5, 19, 38, 61, 89, 121, 158, 199, 245, 295…

sum of digsum(n) mod 6 = 0
s1 = 6, 15, 24, 33, 39, 42, 48, 51, 57, 60, 66…
s2 = 6, 21, 45, 78, 117, 159, 207, 258, 315, 375…

sum of digsum(n) mod 7 = 0
s1 = 7, 16, 25, 34, 43, 52, 59, 61, 68, 70, 77…
s2 = 7, 23, 48, 82, 125, 177, 236, 297, 365, 435…

The spiral for m = 2 is strange, but the spirals are similar after that. Until m = 8, when something strange happens again:

sum of digsum(n) mod 8 = 0
s1 = 8, 17, 26, 35, 44, 53, 62, 71, 79, 80, 88…
s2 = 8, 25, 51, 86, 130, 183, 245, 316, 395, 475…

sum of digsum(n) mod 9 = 0
s1 = 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99…
s2 = 9, 27, 54, 90, 135, 189, 252, 324, 405, 495…

sum of digsum(n) mod 10 = 0
s1 = 19, 28, 37, 46, 55, 64, 73, 82, 91, 109, 118…
s2 = 19, 47, 84, 130, 185, 249, 322, 404, 495, 604…

Here’s an animated gif of m = 8 at higher and higher resolution:

sum of digsum(n) mod 8 = 0 (animated gif)

You might think this strange behavior is dependant on the base in which the dig-sum is calculated. It isn’t. Here’s an animated gif for other bases in which the mod-8 spiral behaves strangely:

sum of digsum(n) mod 8 = 0 in base b = 5, 6, 7, 9, 11, 12, 13 (animated gif)

But the mod-8 spiral stops behaving strangely when the spiral is like this, as a diamond:

W
XIV
YJ8HU
ZK927GT
LA3016FS
MB45ER
NCDQ
OP

Now the mod-8 spiral looks like this:

sum of digsum(n) mod 8 = 0 (diamond spiral)

But the mod-4 and mod-9 spirals look like this:

sum of digsum(n) mod 4 = 0 (diamond spiral)

sum of digsum(n) mod 9 = 0 (diamond spiral)

You can also construct the spirals as a triangle, like this:

U
VCT
WD2CS
XE301AR
YF456789Q
ZGHIJKLMNOP

Here’s the beginning of the mod-5 triangular spiral:

sum of digsum(n) mod 5 = 0 (triangular spiral) (open in new window for full size)

And the beginning of the mod-8 triangular spiral:

sum of digsum(n) mod 8 = 0 (triangular spiral) (open in new window for full size)

The mod-8 spiral is behaving strangely again. So the strangeness is partly an artefact of the way the spirals are constructed.

Post-Performative Post-Scriptum

“Spiral Artefact”, the title of this incendiary intervention, is of course a tip-of-the-hat to core Black-Sabbath track “Spiral Architect”, off core Black-Sabbath album Sabbath Bloody Sabbath, issued in core Black-Sabbath success-period of 1973.

# Z-Fall

Do you want a haunting literary image? You’ll find one of the strangest and strongest in Borges’ “La Biblioteca de Babel” (1941), which is narrated by a librarian in an infinite library. The librarian anticipates the end of his life:

Muerto, no faltarán manos piadosas que me tiren por la baranda; mi sepultura será el aire insondable; mi cuerpo se hundirá largamente y se corromperá y disolverá en el viento engenerado por la caída, que es infinita. — “La Biblioteca de Babel

When I am dead, compassionate hands will throw me over the railing; my tomb will be the unfathomable air, my body will sink for ages, and will decay and dissolve in the wind engendered by my fall, which shall be infinite. — “The Library of Babel” (translation by Andrew Hurley)

The infinite fall is the haunting image. Falling is powerful; falling for ever is more powerful still. But it can’t happen in reality: soon or later a fall has to end. Objects crash to earth or splash into the ocean. Of course, you could call being in orbit a kind of infinite fall, but it doesn’t have the same power.

However, there’s more kinds of falling than one and I think the arithmophile Borges would have liked one of the other kinds a lot. Numbers can fall — you sum their digits, take the sum from the original number, and repeat. That is, n = n – digsum(n). Here are some examples:

10 → 9 → 0
100 → 99 → 81 → 72 → 63 → 54 → 45 → 36 → 27 → 18 → 9 → 0
1000 → 999 → 972 → 954 → 936 → 918 → 900 → 891 → 873 → 855 → 837 → 819 → 801 → 792 → 774 → 756 → 738 → 720 → 711 → 702 → 693 → 675 → 657 → 639 → 621 → 612 → 603 → 594 → 576 → 558 → 540 → 531 → 522 → 513 → 504 → 495 → 477 → 459 → 441 → 432 → 423 → 414 → 405 → 396 → 378 → 360 → 351 → 342 → 333 → 324 → 315 → 306 → 297 → 279 → 261 → 252 → 243 → 234 → 225 → 216 → 207 → 198 → 180 → 171 → 162 → 153 → 144 → 135 → 126 → 117 → 108 → 99 → 81 → 72 → 63 → 54 → 45 → 36 → 27 → 18 → 9 → 0

The details are different in other bases, like 2 or 16, but the destination is the same. The number falls to zero and the fall stops, because digsum(0) = 0:

102 → 1 → 0 (n=2)
100 → 11 → 1 → 0 (n=4)
1000 → 111 → 100 → 11 → 1 → 0 (n=8)
10000 → 1111 → 1011 → 1000 → 111 → 100 → 11 → 1 → 0 (n=16)
100000 → 11111 → 11010 → 10111 → 10011 → 10000 → 1111 → 1011 → 1000 → 111 → 100 → 11 → 1 → 0 (n=32)
1000000 → 111111 → 111001 → 110101 → 110001 → 101110 → 101010 → 100111 → 100011 → 100000 → 11111 → 11010 → 10111 → 10011 → 10000 → 1111 → 1011 → 1000 → 111 → 100 → 11 → 1 → 0 (n=64)

1013 → C → 0 (n=13)
100 → CC → B1 → A2 → 93 → 84 → 75 → 66 → 57 → 48 → 39 → 2A → 1B → C → 0 (n=169)
1000 → CCC → CA2 → C84 → C66 → C48 → C2A → C0C → BC1 → BA3 → B85 → B67 → B49 → B2B → B10 → B01 → AC2 → AA4 → A86 → A68 → A4A → A2C → A11 → A02 → 9C3 → 9A5 → 987 → 969 → 94B → 930 → 921 → 912 → 903 → 8C4 → 8A6 → 888 → 86A → 84C → 831 → 822 → 813 → 804 → 7C5 → 7A7 → 789 → 76B → 750 → 741 → 732 → 723 → 714 → 705 → 6C6 → 6A8 → 68A → 66C → 651 → 642 → 633 → 624 → 615 → 606 → 5C7 → 5A9 → 58B → 570 → 561 → 552 → 543 → 534 → 525 → 516 → 507 → 4C8 → 4AA → 48C → 471 → 462 → 453 → 444 → 435 → 426 → 417 → 408 → 3C9 → 3AB → 390 → 381 → 372 → 363 → 354 → 345 → 336 → 327 → 318 → 309 → 2CA → 2AC → 291 → 282 → 273 → 264 → 255 → 246 → 237 → 228 → 219 → 20A → 1CB → 1B0 → 1A1 → 192 → 183 → 174 → 165 → 156 → 147 → 138 → 129 → 11A → 10B → CC → B1 → A2 → 93 → 84 → 75 → 66 → 57 → 48 → 39 → 2A → 1B → C → 0 (n=2197)

But the fall to 0 made me think of another kind of number-fall. What if you count the 0s in a number, take that count away from the original number, and repeat? You could call this a z-fall (pronounced zee-fall). But unlike free-fall, z-fall doesn’t last long:

10 → 9
100 → 98
1000 → 997
10000 → 9996

And the number always comes to rest far above the ground, as it were. In a fall using digsum(n), the number descends to 0. In a fall using zerocount(n), the number never even reaches 1. At least, never in any base higher than 2. But in base-2, you get this:

10 → 1 (n=2)
100 → 10 → 1 (n=4)
1000 → 101 → 100 → 10 → 1 (n=8)
10000 → 1100 → 1010 → 1000 → 101 → 100 → 10 → 1 (n=16)
100000 → 11011 → 11010 → 11000 → 10101 → 10011 → 10001 → 1110 → 1101 → 1100 → 1010 → 1000 → 101 → 100 → 10 → 1 (n=32)
1000000 → 111010 → 111000 → 110101 → 110011 → 110001 → 101110 → 101100 → 101001 → 100110 → 100011 → 100000 → 11011 → 11010 → 11000 → 10101 → 10011 → 10001 → 1110 → 1101 → 1100 → 1010 → 1000 → 101 → 100 → 10 → 1 (n=64)

When I saw that, I had a wonderful vision of how even the biggest numbers in base 2 could z-fall all the way to 1. Almost all binary numbers contain 0, after all. So the z-falls would get longer and longer, paying tribute to la caída infinita, the infinite fall, of the librarian in Borges’ Library of Babel. Alas, binary numbers don’t behave like that. The highest number in base 2 that z-falls to 1 is this:

1010001 → 1001101 → 1001010 → 1000110 → 1000010 → 111101 → 111100 → 111010 → 111000 → 110101 → 110011 → 110001 → 101110 → 101100 → 101001 → 100110 → 100011 → 100000 → 11011 → 11010 → 11000 → 10101 → 10011 → 10001 → 1110 → 1101 → 1100 → 1010 → 1000 → 101 → 100 → 10 → 1 (n=81)

Above that, binary numbers land on what you might call a shelf:

1010010=82 → 1001110=78 → 1001011=75 → 1001000=72 → 1000011=67 → 111111=63 (n=82)

If binary numbers are an infinite tall mountain, 1 is at the foot of the mountain. 111111 = 63 is like a shelf a little way above the foot. But I conjecture that arbitrarily large binary numbers will z-fall to 63. For example, no matter how large the power of 2, I conjecture that it will z-fall to 63:

10 → 1 : 2 → 1 (count of steps=2)
100 ... → 1 : 4 ... → 1 (c=3)
1000 ... → 1 : 8 ... → 1 (c=5)
10000 ... → 1 : 16 ... → 1 (c=8)
100000 ... → 1 : 32 ... → 1 (c=16)
1000000 ... → 1 : 64 ... → 1 (c=27)
10000000 ... → 111111 : 128 ... → 63 (c=21)
100000000 ... → 111111 : 256 ... → 63 (c=60)
1000000000 ... → 111111 : 512 ... → 63 (c=130)
10000000000 ... → 111111 : 1024 ... → 63 (c=253)
100000000000 ... → 111111 : 2048 ... → 63 (c=473)
1000000000000 ... → 111111 : 4096 ... → 63 (c=869)
10000000000000 ... → 111111 : 8192 ... → 63 (c=1586)
100000000000000 ... → 111111 : 16384 ... → 63 (c=2899)
1000000000000000 ... → 111111 : 32768 ... → 63 (c=5327)
10000000000000000 ... → 111111 : 65536 ... → 63 (c=9851)
100000000000000000 ... → 111111 : 131072 ... → 63 (c=18340)
1000000000000000000 ... → 111111 : 262144 ... → 63 (c=34331)
10000000000000000000 ... → 111111 : 524288 ... → 63 (c=64559)
100000000000000000000 ... → 111111 : 1048576 ... → 63 (c=121831)
1000000000000000000000 ... → 111111 : 2097152 ... → 63 (c=230573)
10000000000000000000000 ... → 111111 : 4194304 ... → 63 (c=437435)
100000000000000000000000 ... → 111111 : 8388608 ... → 63 (c=831722)
1000000000000000000000000 ... → 111111 : 16777216 ... → 63 (c=1584701)
10000000000000000000000000 ... → 111111 : 33554432 ... → 63 (c=3025405)
100000000000000000000000000 ... → 111111 : 67108864 ... → 63 (c=5787008)
1000000000000000000000000000 ... → 111111 : 134217728 ... → 63 (c=11089958)
10000000000000000000000000000 ... → 111111 : 268435456 ... → 63 (c=21290279)
100000000000000000000000000000 ... → 111111 : 536870912 ... → 63 (c=40942711)
1000000000000000000000000000000 ... → 111111 : 1073741824 ... → 63 (c=78864154)

So the z-falls get longer and longer. But z-falling to 63 doesn’t have the power of z-falling to 1.

# Rollercoaster Rules

n += digsum(n). It’s one of my favorite integer sequences — a rollercoaster to infinity. It works like this: you take a number, sum its digits, add the sum to the original number, and repeat:

1 → 2 → 4 → 8 → 16 → 23 → 28 → 38 → 49 → 62 → 70 → 77 → 91 → 101 → 103 → 107 → 115 → 122 → 127 → 137 → 148 → 161 → 169 → 185 → 199 → 218 → 229 → 242 → 250 → 257 → 271 → 281 → 292 → 305 → 313 → 320 → 325 → 335 → 346 → 359 → 376 → 392 → 406 → 416 → 427 → 440 → 448 → 464 → 478 → 497 → 517 → 530 → 538 → 554 → 568 → 587 → 607 → 620 → 628 → 644 → 658 → 677 → 697 → 719 → 736 → 752 → 766 → 785 → 805 → 818 → 835 → 851 → 865 → 884 → 904 → 917 → 934 → 950 → 964 → 983 → 1003 → 1007 → 1015 → 1022 → 1027 → 1037 → 1048 → 1061 → 1069 → 1085 → 1099 → 1118 → 1129 → 1142 → 1150 → 1157 → 1171 → 1181 → 1192 → 1205 → ...

I call it a rollercoaster to infinity because the digit-sum constantly rises and falls as n gets bigger and bigger. The most dramatic falls are when n gets one digit longer (except on the first occasion):

... → 8 (digit-sum=8) → 16 (digit-sum=7) → ...
... → 91 (ds=10) → 101 (ds=2) → ...
... → 983 (ds=20) → 1003 (ds=4) → ...
... → 9968 (ds=32) → 10000 (ds=1) → ...
... → 99973 (ds=37) → 100010 (ds=2) → ...
... → 999959 (ds=50) → 1000009 (ds=10) → ...
... → 9999953 (ds=53) → 10000006 (ds=7) → ...
... → 99999976 (ds=67) → 100000043 (ds=8) → ...
... → 999999980 (ds=71) → 1000000051 (ds=7) → ...
... → 9999999962 (ds=80) → 10000000042 (ds=7) → ...
... → 99999999968 (ds=95) → 100000000063 (ds=10) → ...
... → 999999999992 (ds=101) → 1000000000093 (ds=13) → ...

Look at 9968 → 10000, when the digit-sum goes from 32 to 1. That’s only the second time that digsum(n) = 1 in the sequence. Does it happen again? I don’t know.

And here’s something else I don’t know. Suppose you introduce a rule for the rollercoaster of n += digsum(n). You buy a ticket with a number on it: 1, 2, 3, 4, 5… Then you get on the rollercoaster powered by with that number. Now here’s the rule: Your ride on the rollercoaster ends when n += digsum(n) yields a rep-digit, i.e., a number whose digits are all the same. Here are the first few rides on the rollercoaster:

1 → 2 → 4 → 8 → 16 → 23 → 28 → 38 → 49 → 62 → 70 → 77
2 → 4 → 8 → 16 → 23 → 28 → 38 → 49 → 62 → 70 → 77
3 → 6 → 12 → 15 → 21 → 24 → 30 → 33
4 → 8 → 16 → 23 → 28 → 38 → 49 → 62 → 70 → 77
5 → 10 → 11
6 → 12 → 15 → 21 → 24 → 30 → 33
7 → 14 → 19 → 29 → 40 → 44
8 → 16 → 23 → 28 → 38 → 49 → 62 → 70 → 77
9 → 18 → 27 → 36 → 45 → 54 → 63 → 72 → 81 → 90 → 99
10 → 11
11 → 13 → 17 → 25 → 32 → 37 → 47 → 58 → 71 → 79 → 95 → 109 → 119 → 130 → 134 → 142 → 149 → 163 → 173 → 184 → 197 → 214 → 221 → 226 → 236 → 247 → 260 → 268 → 284 → 298 → 317 → 328 → 341 → 349 → 365 → 379 → 398 → 418 → 431 → 439 → 455 → 469 → 488 → 508 → 521 → 529 → 545 → 559 → 578 → 598 → 620 → 628 → 644 → 658 → 677 → 697 → 719 → 736 → 752 → 766 → 785 → 805 → 818 → 835 → 851 → 865 → 884 → 904 → 917 → 934 → 950 → 964 → 983 → 1003 → 1007 → 1015 → 1022 → 1027 → 1037 → 1048 → 1061 → 1069 → 1085 → 1099 → 1118 → 1129 → 1142 → 1150 → 1157 → 1171 → 1181 → 1192 → 1205 → 1213 → 1220 → 1225 → 1235 → 1246 → 1259 → 1276 → 1292 → 1306 → 1316 → 1327 → 1340 → 1348 → 1364 → 1378 → 1397 → 1417 → 1430 → 1438 → 1454 → 1468 → 1487 → 1507 → 1520 → 1528 → 1544 → 1558 → 1577 → 1597 → 1619 → 1636 → 1652 → 1666 → 1685 → 1705 → 1718 → 1735 → 1751 → 1765 → 1784 → 1804 → 1817 → 1834 → 1850 → 1864 → 1883 → 1903 → 1916 → 1933 → 1949 → 1972 → 1991 → 2011 → 2015 → 2023 → 2030 → 2035 → 2045 → 2056 → 2069 → 2086 → 2102 → 2107 → 2117 → 2128 → 2141 → 2149 → 2165 → 2179 → 2198 → 2218 → 2231 → 2239 → 2255 → 2269 → 2288 → 2308 → 2321 → 2329 → 2345 → 2359 → 2378 → 2398 → 2420 → 2428 → 2444 → 2458 → 2477 → 2497 → 2519 → 2536 → 2552 → 2566 → 2585 → 2605 → 2618 → 2635 → 2651 → 2665 → 2684 → 2704 → 2717 → 2734 → 2750 → 2764 → 2783 → 2803 → 2816 → 2833 → 2849 → 2872 → 2891 → 2911 → 2924 → 2941 → 2957 → 2980 → 2999 → 3028 → 3041 → 3049 → 3065 → 3079 → 3098 → 3118 → 3131 → 3139 → 3155 → 3169 → 3188 → 3208 → 3221 → 3229 → 3245 → 3259 → 3278 → 3298 → 3320 → 3328 → 3344 → 3358 → 3377 → 3397 → 3419 → 3436 → 3452 → 3466 → 3485 → 3505 → 3518 → 3535 → 3551 → 3565 → 3584 → 3604 → 3617 → 3634 → 3650 → 3664 → 3683 → 3703 → 3716 → 3733 → 3749 → 3772 → 3791 → 3811 → 3824 → 3841 → 3857 → 3880 → 3899 → 3928 → 3950 → 3967 → 3992 → 4015 → 4025 → 4036 → 4049 → 4066 → 4082 → 4096 → 4115 → 4126 → 4139 → 4156 → 4172 → 4186 → 4205 → 4216 → 4229 → 4246 → 4262 → 4276 → 4295 → 4315 → 4328 → 4345 → 4361 → 4375 → 4394 → 4414 → 4427 → 4444

The 11-ticket is much better value than the tickets for 1..10. Bigger numbers behave like this:

1252 → 4444
1253 → 4444
1254 → 888888
1255 → 4444
1256 → 4444
1257 → 888888
1258 → 4444
1259 → 4444
1260 → 9999
1261 → 4444
1262 → 4444
1263 → 888888
1264 → 4444
1265 → 4444
1266 → 888888
1267 → 4444
1268 → 4444
1269 → 9999
1270 → 4444
1271 → 4444
1272 → 888888
1273 → 4444
1274 → 4444

Then all at once, a number-ticket turns golden and the rollercoaster-ride doesn’t end. So far, at least. I’ve tried, but I haven’t been able to find a rep-digit for 3515 and 3529 = 3515+digsum(3515) and so on:

3509 → 4444
3510 → 9999
3511 → 4444
3512 → 4444
3513 → 888888
3514 → 4444
3515 → ?
3516 → 888888
3517 → 4444
3518 → 4444
3519 → 9999
3520 → 4444
3521 → 4444
3522 → 888888
3523 → 4444
3524 → 4444
3525 → 888888
3526 → 4444
3527 → 4444
3528 → 9999
3529 → ?
3530 → 4444
3531 → 888888
3532 → 4444

Does 3515 ever yield a rep-digit for n += digsum(n)? It’s hard to believe it doesn’t, but I’ve no idea how to prove that it does. Except by simply riding the rollercoaster. And if the ride with the 3515-ticket never reaches a rep-digit, the rollercoaster will never let you know. How could it?

But here’s an example in base 23 of how a ticket for n+1 can give you a dramatically longer ride than a ticket for n and n+2:

MI → EEE (524 → 7742)
MJ → EEE (525 → 7742)
MK → 444 (526 → 2212)
ML → 444 (527 → 2212)
MM → MMMMMM (528 → 148035888)
100 → 444 (529 → 2212)
101 → 444 (530 → 2212)
102 → EEE (531 → 7742)
103 → 444 (532 → 2212)
104 → 444 (533 → 2212)
105 → EEE (534 → 7742)
106 → EEE (535 → 7742)
107 → 444 (536 → 2212)
108 → EEE (537 → 7742)
109 → 444 (538 → 2212)
10A → MMMMMM (539 → 148035888)
10B → EEE (540 → 7742)
10C → EEE (541 → 7742)
10D → EEE (542 → 7742)
10E → EEE (543 → 7742)
10F → 444 (544 → 2212)
10G → EEE (545 → 7742)
10H → EEE (546 → 7742)
10I → EEE (547 → 7742)
10J → 444 (548 → 2212)
10K → 444 (549 → 2212)
10L → MMMMMM (550 → 148035888)
10M → EEE (551 → 7742)
110 → EEE (552 → 7742)

# Digital Dissection

As I never tire of pointing out, the three most powerful drugs in the universe are water, maths and language. And I never tire of snorting the fact that numbers can come in many different guises. You can take a trivial, everyday number like a hundred and see it transform like this:

100 = 1100100 in base 2; 10201 in base 3; 1210 in base 4; 400 in base 5; 244 in base 6; 202 in base 7; 144 in base 8; 121 in base 9; 100 in b10; 91 in b11; 84 in b12; 79 in b13; 72 in b14; 6A in b15; 64 in b16; 5F in b17; 5A in b18; 55 in b19; 50 in b20; 4G in b21; 4C in b22; 48 in b23; 44 in b24; 40 in b25; 3M in b26; 3J in b27; 3G in b28; 3D in b29; 3A in b30; 37 in b31; 34 in b32; 31 in b33; 2W in b34; 2U in b35; 2S in b36; 2Q in b37; 2O in b38; 2M in b39; 2K in b40; 2I in b41; 2G in b42; 2E in b43; 2C in b44; 2A in b45; 28 in b46; 26 in b47; 24 in b48; 22 in b49; 20 in b50; 1[49] in b51; 1[48] in b52; 1[47] in b53; 1[46] in b54; 1[45] in b55; 1[44] in b56; 1[43] in b57; 1[42] in b58; 1[41] in b59; 1[40] in b60; 1[39] in b61; 1[38] in b62; 1[37] in b63; 1[36] in b64; 1Z in b65; 1Y in b66; 1X in b67; 1W in b68; 1V in b69; 1U in b70; 1T in b71; 1S in b72; 1R in b73; 1Q in b74; 1P in b75; 1O in b76; 1N in b77; 1M in b78; 1L in b79; 1K in b80; 1J in b81; 1I in b82; 1H in b83; 1G in b84; 1F in b85; 1E in b86; 1D in b87; 1C in b88; 1B in b89; 1A in b90; 19 in b91; 18 in b92; 17 in b93; 16 in b94; 15 in b95; 14 in b96; 13 in b97; 12 in b98; 11 in b99

I like the shifts from 1100100 to 10201 to 1210 to 400 to 244 to 202 to 144 to 121. How can 1100100 and 244 be the same number? Well, they are — or they’re not, as you please. In base 2, 1100100 = 244 in base 6 = 100 in base 10. But if all those numbers are in the same base, they’re completely different and 1100100 dwarfs the other two.

But some things you can’t please yourself about. Suppose you take the different representations of 6561 in bases 2..6560 and add up the 1s, the 2s, the 3s and so on, like this:

n=6561

digsum(1,6561,b=2..6560) = 3343 (50.95% of 6561)
digsum(2,6561,b=2..6560) = 2246 (34.23% of 6561)
digsum(3,6561,b=2..6560) = 1680 (25.61% of 6561)
digsum(4,6561,b=2..6560) = 1368 (20.85% of 6561)
digsum(5,6561,b=2..6560) = 1185 (18.06% of 6561)
digsum(6,6561,b=2..6560) = 1074 (16.37% of 6561)
digsum(7,6561,b=2..6560) = 875 (13.34% of 6561)
digsum(8,6561,b=2..6560) = 768 (11.71% of 6561)
digsum(9,6561,b=2..6560) = 1080 (16.46% of 6561)
[...]
digcount(0,6561,b=2..6560) = 31

Is there a pattern in the percentages? Let’s apply the same process to some bigger numbers (and note that 0 does not behave like the other digits):

n=59049

digsum(1,59049) = 29648 (50.21%)
digsum(2,59049) = 19790 (33.51%)
digsum(3,59049) = 14901 (25.23%)
digsum(4,59049) = 11956 (20.25%)
digsum(5,59049) = 9970 (16.88%)
digsum(6,59049) = 8550 (14.48%)
digsum(7,59049) = 7539 (12.77%)
digsum(8,59049) = 6672 (11.30%)
digsum(9,59049) = 6579 (11.14%)
digcount(0,59049) = 41

n=531441

digsum(1,531441) = 266065 (50.06%)
digsum(2,531441) = 177394 (33.38%)
digsum(3,531441) = 133128 (25.05%)
digsum(4,531441) = 106532 (20.05%)
digsum(5,531441) = 88815 (16.71%)
digsum(6,531441) = 76224 (14.34%)
digsum(7,531441) = 66661 (12.54%)
digsum(8,531441) = 59320 (11.16%)
digsum(9,531441) = 53928 (10.15%)
digcount(0,531441) = 62

n=4782969

digsum(1,4782969) = 2392219 (50.02%)
digsum(2,4782969) = 1595000 (33.35%)
digsum(3,4782969) = 1196370 (25.01%)
digsum(4,4782969) = 957300 (20.01%)
digsum(5,4782969) = 797700 (16.68%)
digsum(6,4782969) = 683850 (14.30%)
digsum(7,4782969) = 598444 (12.51%)
digsum(8,4782969) = 531944 (11.12%)
digsum(9,4782969) = 480870 (10.05%)
digcount(0,4782969) = 66

Yes, the pattern’s getting stronger. Let’s try even bigger numbers:

n=43046721

digsum(1,43046721) = 21525521 (50.01%)
digsum(2,43046721) = 14350754 (33.34%)
digsum(3,43046721) = 10763496 (25.00%)
digsum(4,43046721) = 8610980 (20.00%)
digsum(5,43046721) = 7175955 (16.67%)
digsum(6,43046721) = 6150924 (14.29%)
digsum(7,43046721) = 5382167 (12.50%)
digsum(8,43046721) = 4784232 (11.11%)
digsum(9,43046721) = 4306257 (10.00%)
digcount(0,43046721) = 86

n=387420489

digsum(1,387420489) = 193716365 (50.00%)
digsum(2,387420489) = 129145522 (33.33%)
digsum(3,387420489) = 96859980 (25.00%)
digsum(4,387420489) = 77488588 (20.00%)
digsum(5,387420489) = 64574220 (16.67%)
digsum(6,387420489) = 55349742 (14.29%)
digsum(7,387420489) = 48431250 (12.50%)
digsum(8,387420489) = 43050264 (11.11%)
digsum(9,387420489) = 38748357 (10.00%)
digcount(0,387420489) = 95

To the given precision, the sum of 1s is 1/2 of n; the sum of 2s is 1/3; the sum of 3 is 1/4; and the sum of 4s is 1/5. It looks as though the sum of a given digit d → 1/(d+1) of n as n → ∞. But why? My mathematical intuition is bad, so it took me a while to see what some people will see in a flash. To see what’s going on, let’s go back to the all-base representations of 100:

100 = 1100100 in base 2; 10201 in base 3; 1210 in base 4; 400 in base 5; 244 in base 6; 202 in base 7; 144 in base 8; 121 in base 9; 100 in b10; 91 in b11; 84 in b12; 79 in b13; 72 in b14; 6A in b15; 64 in b16; 5F in b17; 5A in b18; 55 in b19; 50 in b20; 4G in b21; 4C in b22; 48 in b23; 44 in b24; 40 in b25; 3M in b26; 3J in b27; 3G in b28; 3D in b29; 3A in b30; 37 in b31; 34 in b32; 31 in b33; 2W in b34; 2U in b35; 2S in b36; 2Q in b37; 2O in b38; 2M in b39; 2K in b40; 2I in b41;
2G in b42; 2E in b43; 2C in b44; 2A in b45; 28 in b46; 26 in b47; 24 in b48; 22 in b49; 20 in b50; 1[49] in b51; 1[48] in b52; 1[47] in b53; 1[46] in b54; 1[45] in b55; 1[44] in b56; 1[43] in b57; 1[42] in b58; 1[41] in b59; 1[40] in b60; 1[39] in b61; 1[38] in b62; 1[37] in b63; 1[36] in b64; 1Z in b65; 1Y in b66; 1X in b67; 1W in b68; 1V in b69; 1U in b70; 1T in b71; 1S in b72; 1R in b73; 1Q in b74; 1P in b75; 1O in b76; 1N in b77; 1M in b78; 1L in b79; 1K in b80; 1J in b81
; 1I in b82; 1H in b83; 1G in b84; 1F in b85; 1E in b86; 1D in b87; 1C in b88; 1B in b89; 1A in b90; 19 in b91; 18 in b92; 17 in b93; 16 in b94; 15 in b95; 14 in b96; 13 in b97; 12 in b98; 11 in b99

When the base b is higher than half of 100, the representations of 100 consist of a digit 1 followed by another digit. Half of a hundred = 50, therefore 100 in base 10 = 1[49] in b51, 1[48] in b52, 1[47] in b53, 1[46] in b54, 1[45] in b55, 1[44] in b56, 1[43] in b57, 1[42] in b58, 1[41] in b59… If you take binary and so on into account, 1 is the first digit of slightly over half the representations of 100. And 1 also occurs in other positions. Therefore digsum(1,100,b=2..99) > 50. As the number n gets larger and larger, the contribution of leading 1s in bases b > n/2 begins to swamp the contributions of 1s in other positions, therefore digsum(1,n) → 1/2 of n as n → ∞.

And what about 2s and 3s? Similar reasoning applies. One hundred has a leading digit of 2 in bases b where b > 1/3 of 100 and b <= 1/2 of 100. So 100 = 2W in b34, 2U in b35, 2S in b36, 2Q in b37, 2O in b38… In other words, roughly 1/2 – 1/3 of the representations of 100 have a leading 2. Now, 1/2 – 1/3 = 3/6 – 2/6 = 1/6 and 1/6 * 2 = 1/3 (i.e., 1/6 of the representations contribute a leading 2 to the sum of 2s). Therefore the all-base digsum(2,n) → 1/3 of n as n → ∞. Next, one hundred has a leading digit of 3 in bases b where b > 1/4 of 100 and b <= 1/3. So 100 = 3M in b26, 3J in b27, 3G in b28, 3D in b29, 3A in b30… Now, 1/3 – 1/4 = 4/12 – 3/12 = 1/12 and 1/12 * 3 = 1/4. Therefore the all-base digsum(3,n) → 1/4 of n as n → ∞.

And so on.

# Total Score

The number 23 is always (and trivially) equal to some running total of the digits of its roots in base 2. In other bases, that’s not always true (n.b. numbers inside square brackets represent single digits in that base):

√23 = 23^(1/2) = 100.1100101110111011100111010101110111000001000... in base 2
23 = digsum(100.110010111011101110011101010111011)
23^(1/2) = 11.21011101110011111122022101121121... in base 3
23 = digsum(11.2101110111001111112202)
23^(1/2) = 4.8832850[10]89028... in base 11
23 = digsum(4.883)
23^(1/2) = 4.[14]5[15]53[14]0[12]0[14]5[13]... in base 18
23 = digsum(4.[14]5)
23^(1/2) = 4.[19]29[13][19]4[11][23][19][11][20]... in base 24
23 = digsum(4.[19])
23^(1/2) = 4.[19][22]9[21][17]5[12][10]456... in base 25
23 = digsum(4.[19])

23^(1/3) = 10.11011000000001111010101010011000101000110000001100000010010000101011... in base 2
23 = digsum(10.1101100000000111101010101001100010100011000000110000001001)
23^(1/3) = 2.21121001121111121022212100220... in base 3
23 = digsum(2.2112100112111112102)
23^(1/3) = 2.312000132222212022030003... in base 4
23 = digsum(2.31200013222221)
23^(1/3) = 2.6600365246121403... in base 8
23 = digsum(2.660036)
23^(1/3) = 2.753154453877080... in base 9
23 = digsum(2.75315)
23^(1/3) = 2.93120691571[10]001[10]... in base 11
23 = digsum(2.931206)
23^(1/3) = 2.[12]9[13]0[11]74[11]61[14]2... in base 15
23 = digsum(2.[12]9)
23^(1/3) = 2.[13]807[10][10]98[10]303... in base 16
23 = digsum(2.[13]8)
23^(1/3) = 2.[21]2[10][10][13][11][21][23][15][24][21]... in base 25
23 = digsum(2.[21])
23^(1/3) = 2.[21][24][11][20][24][22][23][25]0[11][11]... in base 26
23 = digsum(2.[21])

23^(1/4) = 10.0011000010011111110100101010011000001001011110001110101... in base 2
23 = digsum(10.001100001001111111010010101001100000100101111)
23^(1/4) = 2.1411772251404570... in base 8
23 = digsum(2.141177)
23^(1/4) = 2.1634161832077814... in base 9
23 = digsum(2.163416)
23^(1/4) = 2.33[15]2[14][13]967[10]6[12]5... in base 17
23 = digsum(2.33[15])
23^(1/4) = 2.6[15][19][11][31][17][10][18][21]30[27]... in base 34
23 = digsum(2.6[15])
23^(1/4) = 2.[12]9[63][18][41][32][37][56][58][60]1[17]... in base 64
23 = digsum(2.[12]9)
23^(1/4) = 2.[21]9[26]6[54][21][20]3[64][86][110]... in base 111
23 = digsum(2.[21])
23^(1/4) = 2.[21][30][66][22][73][19]3[15][51][24]8... in base 112
23 = digsum(2.[21])
23^(1/4) = 2.[21][52][36][111][32][104][66][40][95][33]5... in base 113
23 = digsum(2.[21])
23^(1/4) = 2.[21][74][50][62][27]19[100][70][48][89]... in base 114
23 = digsum(2.[21])
23^(1/4) = 2.[21][96][108]2[101][62][43][18][71][113][37]... in base 115
23 = digsum(2.[21])

23^(1/5) = 1.110111110100011010011101000111111011111011000... in base 2
23 = digsum(1.11011111010001101001110100011111101)
23^(1/5) = 1.313310122131013323323010... in base 4
23 = digsum(1.31331012213101)
23^(1/5) = 1.[10]5714140[10][11][11]61... in base 12
23 = digsum(1.[10]57)
23^(1/5) = 1.[11]45210[12]3974[12]0[11]... in base 13
23 = digsum(1.[11]452)
23^(1/5) = 1.[22][17][15]788[12][20][10][16]5... in base 26
23 = digsum(1.[22])

And in base 10:

23^(1/7) = 1.565065607960239...
23 = digsum(1.56506)

23^(1/11) = 1.32982177397055...
23 = digsum(1.3298)

23^(1/25) = 1.133624213096260543...
23 = digsum(1.13362421)

23^(1/43) = 1.075642836327515...
23 = digsum(1.07564)

23^(1/51) = 1.0634095245502272...
23 = digsum(1.063409)

23^(1/59) = 1.054581462032154...
23 = digsum(1.05458)

23^(1/74) = 1.043282031364111825...
23 = digsum(1.04328203)

23^(1/78) = 1.041017545329593513...
23 = digsum(1.04101754)

23^(1/81) = 1.039468791371841...
23 = digsum(1.03946)

23^(1/85) = 1.037576979258809...
23 = digsum(1.03757)

23^(1/86) = 1.0371320245405187874...
23 = digsum(1.037132024)

23^(1/101) = 1.031531403111493041428...
23 = digsum(1.03153140311)

# Magistra Rules the Waves

One of my favourite integer sequences has the simple formula n(i) = n(i-1) + digitsum(n(i-1)). If it’s seeded with 1, its first few terms go like this:

n(1) = 1
n(2) = n(1) + digitsum(n(1)) = 1 + digitsum(1) = 2
n(3) = 2 + digitsum(2) = 4
n(4) = 4 + digitsum(4) = 8
n(5) = 8 + digitsum(8) = 16
n(6) = 16 + digitsum(16) = 16 + 1+6 = 16 + 7 = 23
n(7) = 23 + digitsum(23) = 23 + 2+3 = 23 + 5 = 28
n(8) = 28 + digitsum(28) = 28 + 2+8 = 28 + 10 = 38

As a sequence, it looks like this:

1, 2, 4, 8, 16, 23, 28, 38, 49, 62, 70, 77, 91, 101, 103, 107, 115, 122, 127, 137, 148, 161, 169, 185, 199, 218, 229, 242, 250, 257, 271, 281, 292, 305, 313, 320, 325, 335, 346, 359, 376, 392, 406, 416, 427, 440, 448, 464, 478, 497, 517, 530, 538, 554, 568, 587, 607, 620, 628, 644, 658, 677, 697, 719, 736, 752, 766, 785, 805, 818, 835, 851, 865, 884, 904, 917, 934, 950, 964, 983, 1003…

Given a number at random, is there a quick way to say whether it appears in the sequence seeded with 1? Not that I know, with one exception. If the number is divisible by 3, it doesn’t appear, at least in base 10. In base 2, that rule doesn’t apply:

n(1) = 1
n(2) = 1 + digitsum(1) = 10 = 1 + 1 = 2
n(3) = 10 + digitsum(10) = 10 + 1 = 11 = 2 + 1 = 3
n(4) = 11 + digitsum(11) = 11 + 1+1 = 101 = 3 + 2 = 5
n(5) = 101 + digitsum(101) = 101 + 1+0+1 = 111 = 5 + 2 = 7
n(6) = 111 + digitsum(111) = 111 + 11 = 1010 = 7 + 3 = 10
n(7) = 1010 + digitsum(1010) = 1010 + 10 = 1100 = 10 + 2 = 12
n(8) = 1100 + digitsum(1100) = 1100 + 10 = 1110 = 12 + 2 = 14

1, 2, 3, 5, 7, 10, 12, 14, 17, 19, 22, 25, 28, 31, 36, 38, 41, 44, 47, 52, 55, 60, 64, 65, 67, 70, 73, 76, 79, 84, 87, 92, 96, 98, 101, 105, 109, 114, 118, 123, 129, 131, 134, 137, 140, 143, 148, 151, 156, 160, 162, 165, 169, 173, 178, 182, 187, 193, 196, 199, 204, 208, 211, 216, 220, 225, 229, 234, 239, 246, 252, 258, 260, 262, 265, 268, 271, 276, 279, 284, 288, 290, 293, 297, 301, 306, 310, 315, 321, 324, 327, 332, 336, 339, 344, 348, 353, 357, 362, 367, 374…

What patterns are there in these sequences? It’s easier to check when they’re represented graphically, so I converted them into patterns à la the Ulam spiral, where n is represented as a dot on a spiral of integers. This is the spiral for base 10:

Base 10

And these are the spirals for bases 2 and 3:

Base 2

Base 3

These sequences look fairly random to me: there are no obvious patterns in the jumps from n(i) to n(i+1), i.e. in the values for digitsum(n(i)). Now try the spirals for bases 9 and 33:

Base 9

Base 33

Patterns have appeared: there is some regularity in the jumps. You can see these regularities more clearly if you represent digitsum(n(i)) as a graph, with n(i) on the x axis and digitsum(n(i)) on the y axis. If the graph starts with n(i) = 1 on the lower left and proceeds left-right, left-right up the screen, it looks like this in base 10:

Base 10 (click to enlarge)

Here are bases 2 and 3:

Base 2

Base 3

The jumps seem fairly random. Now try bases 9, 13, 16, 17, 25, 33 and 49:

Base 9

Base 13

Base 16

Base 17

Base 25

Base 33

Base 49

In some bases, the formula n(i) = n(i-1) + digitsum(n(i-1)) generates mild randomness. In others, it generates strong regularity, like waves rolling ashore under a steady wind. I don’t understand why, but regularity seems to occur in bases that are one more than a power of 2 and also in some bases that are primes or squares.

Elsewhere other-posted:

# Dig Sum Fib

The Fibonacci sequence is an infinitely rich sequence based on a very simple rule: add the previous two numbers. If the first two numbers are 1 and 1, the sequence begins like this:

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025…

Plainly, the numbers increase for ever. The hundredth Fibonacci number is 354,224,848,179,261,915,075, for example, and the two-hundredth is 280,571,172,992,510,140,037,611,932,413,038,677,189,525. But there are variants on the Fibonacci sequence that don’t increase for ever. The standard rule is n(i) = n(i-2) + n(i-1). What if the rule becomes n(i) = digitsum(n(i-2)) + digitsum(n(i-1))? Now the sequence falls into a loop, like this:

1, 1, 2, 3, 5, 8, 13, 12, 7, 10, 8, 9, 17, 17, 16, 15, 13, 10, 5, 6, 11, 8, 10, 9, 10, 10, 2, 3… (length=28)

But that’s in base 10. Here are the previous bases:

1, 1, 2, 2, 2… (base=2) (length=5)
1, 1, 2, 3, 3, 2, 3… (b=3) (l=7)
1, 1, 2, 3, 5, 5, 4, 3, 4, 4, 2, 3… (b=4) (l=12)
1, 1, 2, 3, 5, 4, 5, 5, 2, 3… (b=5) (l=10)
1, 1, 2, 3, 5, 8, 8, 6, 4, 5, 9, 9, 8, 7, 5, 7, 7, 4, 6, 5, 6, 6, 2, 3… (b=6) (l=24)
1, 1, 2, 3, 5, 8, 7, 3, 4, 7, 5, 6, 11, 11, 10, 9, 7, 4, 5, 9, 8, 5, 7, 6, 7, 7, 2, 3… (b=7) (l=28)
1, 1, 2, 3, 5, 8, 6, 7, 13, 13, 12, 11, 9, 6, 8, 7, 8, 8, 2, 3… (b=8) (l=20)
1, 1, 2, 3, 5, 8, 13, 13, 10, 7, 9, 8, 9, 9, 2, 3… (b=9) (l=16)

Apart from base 2, all the bases repeat with (2, 3), which is set up in each case by (base, base) = (10, 10) in that base, equivalent to (1, 1). All bases > 2 appear to repeat with (2, 3), but I don’t understand why. The length of the sequence varies widely. Here it is in bases 29, 30 and 31:

1, 1, 2, 3, 5, 8, 13, 21, 34, 27, 33, 32, 9, 13, 22, 35, 29, 8, 9, 17, 26, 43, 41, 28, 41, 41, 26, 39, 37, 20, 29, 21, 22, 43, 37, 24, 33, 29, 6, 7, 13, 20, 33, 25, 30, 27, 29, 28, 29, 29, 2, 3… (b=29) (l=52)

1, 1, 2, 3, 5, 8, 13, 21, 34, 26, 31, 28, 30, 29, 30, 30, 2, 3 (b=30) (l=18)

1, 1, 2, 3, 5, 8, 13, 21, 34, 25, 29, 54, 53, 47, 40, 27, 37, 34, 11, 15, 26, 41, 37, 18, 25, 43, 38, 21, 29, 50, 49, 39, 28, 37, 35, 12, 17, 29, 46, 45, 31, 16, 17, 33, 20, 23, 43, 36, 19, 25, 44, 39, 23, 32, 25, 27, 52, 49, 41, 30, 41, 41, 22, 33, 25, 28, 53, 51, 44, 35, 19, 24, 43, 37, 20, 27, 47, 44, 31, 15, 16, 31, 17, 18, 35, 23, 28, 51, 49, 40, 29, 39, 38, 17, 25, 42, 37, 19, 26, 45, 41, 26, 37, 33, 10, 13, 23, 36, 29, 35, 34, 9, 13, 22, 35, 27, 32, 29, 31, 30, 31, 31, 2, 3 (b=31) (l=124)

The sequence for base 77 is short like that for base 30:

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 68, 81, 73, 78, 75, 77, 76, 77, 77, 2, 3 (b=77) (l=22)

But the sequence for base 51 is this:

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 39, 44, 83, 77, 60, 37, 47, 84, 81, 65, 46, 61, 57, 18, 25, 43, 68, 61, 29, 40, 69, 59, 28, 37, 65, 52, 17, 19, 36, 55, 41, 46, 87, 83, 70, 53, 23, 26, 49, 75, 74, 49, 73, 72, 45, 67, 62, 29, 41, 70, 61, 31, 42, 73, 65, 38, 53, 41, 44, 85, 79, 64, 43, 57, 50, 57, 57, 14, 21, 35, 56, 41, 47, 88, 85, 73, 58, 31, 39, 70, 59, 29, 38, 67, 55, 22, 27, 49, 76, 75, 51, 26, 27, 53, 30, 33, 63, 46, 59, 55, 14, 19, 33, 52, 35, 37, 72, 59, 31, 40, 71, 61, 32, 43, 75, 68, 43, 61, 54, 15, 19, 34, 53, 37, 40, 77, 67, 44, 61, 55, 16, 21, 37, 58, 45, 53, 48, 51, 49, 50, 99, 99, 98, 97, 95, 92, 87, 79, 66, 45, 61, 56, 17, 23, 40, 63, 53, 16, 19, 35, 54, 39, 43, 82, 75, 57, 32, 39, 71, 60, 31, 41, 72, 63, 35, 48, 83, 81, 64, 45, 59, 54, 13, 17, 30, 47, 77, 74, 51, 25, 26, 51, 27, 28, 55, 33, 38, 71, 59, 30, 39, 69, 58, 27, 35, 62, 47, 59, 56, 15, 21, 36, 57, 43, 50, 93, 93, 86, 79, 65, 44, 59, 53, 12, 15, 27, 42, 69, 61, 30, 41, 71, 62, 33, 45, 78, 73, 51, 24, 25, 49, 74, 73, 47, 70, 67, 37, 54, 41, 45, 86, 81, 67, 48, 65, 63, 28, 41, 69, 60, 29, 39, 68, 57, 25, 32, 57, 39, 46, 85, 81, 66, 47, 63, 60, 23, 33, 56, 39, 45, 84, 79, 63, 42, 55, 47, 52, 49, 51, 50, 51, 51, 2, 3… (b=51) (l=304)

# The Rite of Sling

Duels are interesting things. Flashman made his name in one and earnt an impressive scar in another. Maupassant explored their psychology and so did his imitator Maugham. Game theory might be a good guide on how to fight one, but I’d like to look at something simpler: the concept of duelling numbers.

How would two numbers fight? One way is to use digit-sums. Find the digit-sum of each number, then take it away from the other number. Repeat until one or both numbers <= 0, like this:

function duel(n1,n2){
print(n1," <-> ",n2);
do{
s1=digitsum(n1);
s2=digitsum(n2);
n1 -= s2;
n2 -= s1;
print(” -> ",n1," <-> ",n2);
}while(n1>0 && n2>0);
}

Suppose n1 = 23 and n2 = 22. At the first step, s1 = digitsum(23) = 5 and s2 = digitsum(22) = 4. So n1 = 23 – 4 = 19 and n2 = 22 – 5 = 17. And what happens in the end?

23 ↔ 22 ➔ 19 ↔ 17 ➔ 11 ↔ 7 ➔ 4 ↔ 5 ➔ -1 ↔ 1

So 23 loses the duel with 22. Now try 23 vs 24:

23 ↔ 24 ➔ 17 ↔ 19 ➔ 7 ↔ 11 ➔ 5 ↔ 4 ➔ 1 ↔ -1

23 wins the duel with 24. The gap can be bigger. For example, 85 and 100 are what might be called David and Goliath numbers, because the David of 85 beats the Goliath of 100:

85 ↔ 100 ➔ 84 ↔ 87 ➔ 69 ↔ 75 ➔ 57 ↔ 60 ➔ 51 ↔ 48 ➔ 39 ↔ 42 ➔ 33 ↔ 30 ➔ 30 ↔ 24 ➔ 24 ↔ 21 ➔ 21 ↔ 15 ➔ 15 ↔ 12 ➔ 12 ↔ 6 ➔ 6 ↔ 3 ➔ 3 ↔ -3

999 and 1130 are also David and Goliath numbers:

999 ↔ 1130 ➔ 994 ↔ 1103 ➔ 989 ↔ 1081 ➔ 979 ↔ 1055 ➔ 968 ↔ 1030 ➔ 964 ↔ 1007 ➔ 956 ↔ 988 ➔ 931 ↔ 968 ➔ 908 ↔ 955 ➔ 889 ↔ 938 ➔ 869 ↔ 913 ➔ 856 ↔ 890 ➔ 839 ↔ 871 ➔ 823 ↔ 851 ➔ 809 ↔ 838 ➔ 790 ↔ 821 ➔ 779 ↔ 805 ➔ 766 ↔ 782 ➔ 749 ↔ 763 ➔ 733 ↔ 743 ➔ 719 ↔ 730 ➔ 709 ↔ 713 ➔ 698 ↔ 697 ➔ 676 ↔ 674 ➔ 659 ↔ 655 ➔ 643 ↔ 635 ➔ 629 ↔ 622 ➔ 619 ↔ 605 ➔ 608 ↔ 589 ➔ 586 ↔ 575 ➔ 569 ↔ 556 ➔ 553 ↔ 536 ➔ 539 ↔ 523 ➔ 529 ↔ 506 ➔ 518 ↔ 490 ➔ 505 ↔ 476 ➔ 488 ↔ 466 ➔ 472 ↔ 446 ➔ 458 ↔ 433 ➔ 448 ↔ 416 ➔ 437 ↔ 400 ➔ 433 ↔ 386 ➔ 416 ↔ 376 ➔ 400 ↔ 365 ➔ 386 ↔ 361 ➔ 376 ↔ 344 ➔ 365 ↔ 328 ➔ 352 ↔ 314 ➔ 344 ↔ 304 ➔ 337 ↔ 293 ➔ 323 ↔ 280 ➔ 313 ↔ 272 ➔ 302 ↔ 265 ➔ 289 ↔ 260 ➔ 281 ↔ 241 ➔ 274 ↔ 230 ➔ 269 ↔ 217 ➔ 259 ↔ 200 ➔ 257 ↔ 184 ➔ 244 ↔ 170 ➔ 236 ↔ 160 ➔ 229 ↔ 149 ➔ 215 ↔ 136 ➔ 205 ↔ 128 ➔ 194 ↔ 121 ➔ 190 ↔ 107 ➔ 182 ↔ 97 ➔ 166 ↔ 86 ➔ 152 ↔ 73 ➔ 142 ↔ 65 ➔ 131 ↔ 58 ➔ 118 ↔ 53 ➔ 110 ↔ 43 ➔ 103 ↔ 41 ➔ 98 ↔ 37 ➔ 88 ↔ 20 ➔ 86 ↔ 4 ➔ 82 ↔ -10

You can look in the other direction and find bully numbers, or numbers that beat all numbers smaller than themselves. In base 10, the numbers 2 to 9 obviously do. So do these:

35, 36, 37, 38, 39, 47, 48, 49, 58, 59, 64, 65, 66, 67, 68, 69, 76, 77, 78, 79, 189

In other bases, bullies are sometimes common, sometimes rare. Sometimes they don’t exist at all for n > b. Here are bully numbers for bases 2 to 30:

base=2: 3, 5, 7, 13, 15, 21, 27, 29, 31, 37, 43, 45, 47, 54, 59
b=3: 4, 5, 7, 8, 14
b=4: 5, 6, 7, 9, 10, 11, 14, 15, 27, 63
b=5: 12, 13, 14, 18, 19, 23, 24
b=6: 15, 16, 17, 22, 23, 26, 27, 28, 29, 32, 33, 34, 35, 65, 71, 101
b=7: 17, 18, 19, 20, 24, 25, 26, 27, 32, 33, 34, 40, 41, 45, 46, 47, 48, 76
b=8: 37, 38, 39, 46, 47, 59, 60, 61, 62, 63, 95, 103, 111, 119
b=9: 42, 43, 44, 52, 53, 61, 62
b=10: 35, 36, 37, 38, 39, 47, 48, 49, 58, 59, 64, 65, 66, 67, 68, 69, 76, 77, 78, 79, 189
b=11: 38, 39, 40, 41, 42, 43, 49, 50, 51, 52, 53, 54, 62, 63, 64, 65, 73, 74, 75, 76, 85, 86, 87
b=12: 57, 58, 59
b=13: 58, 59, 60, 61, 62, 63, 64, 74, 75, 76, 77, 87, 88, 89, 90, 101, 102, 103, 115, 116, 127, 128, 129
b=14: none (except 2 to 13)
b=15: 116, 117, 118, 119, 130, 131, 132, 133, 134, 147, 148, 149
b=16: 122, 123, 124, 125, 126, 127, 140, 141, 142, 143, 156, 157, 158, 159, 173, 174, 175, 190, 191, 222, 223
b=17: 151, 152, 168, 169, 185, 186
b=18: 85, 86, 87, 88, 89, 191, 192, 193, 194, 195, 196, 197, 212, 213, 214, 215
b=19: 242, 243, 244, 245, 246
b=20: none
b=21: 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 162, 163, 164, 165, 166, 167, 183, 184, 185, 186, 187, 188, 206, 207, 208, 209, 227, 228, 229, 230, 248, 249, 250, 251, 270, 271, 272
b=22: 477, 478, 479, 480, 481, 482, 483
b=23: none
b=24: none
b=25: 271, 272, 273, 274, 296, 297, 298, 299, 322, 323, 324, 348, 349, 372, 373, 374
b=26: none
b=27: none
b=28: none
b=29: 431, 432, 433, 434, 459, 460, 461, 462, 463, 490, 491, 492, 546, 547, 548, 549, 550
b=30: none

# Summus

I’m interested in digit-sums and in palindromic numbers. Looking at one, I found the other. It started like this: 9^2 = 81 and 9 = 8 + 1, so digitsum(9^1) = digitsum(9^2). I wondered how long such a sequence of powers could be (excluding powers of 10). I quickly found that the digit-sum of 468 is equal to the digit-sum of its square and cube:

digsum(468) = digsum(219024) = digsum(102503232)

But I couldn’t find any longer sequence, although plenty of other numbers are similar to 468:

digsum(585) = digsum(342225) = digsum(200201625)
digsum(4680) = digsum(21902400) = digsum(102503232000)
digsum(5850) = digsum(34222500) = digsum(200201625000)
digsum(5851) = digsum(34234201) = digsum(200304310051)
digsum(5868) = digsum(34433424) = digsum(202055332032)
digsum(28845) = digsum(832034025) = digsum(24000021451125) […]
digsum(589680) = digsum(347722502400) = digsum(205045005215232000)

What about other bases? First came this sequence:

digsum(2) = digsum(11) (base = 3) (highest power = 2)

Then these:

digsum(4) = digsum(22) = digsum(121) (b=7) (highest power = 3)
digsum(8) = digsum(44) = digsum(242) = digsum(1331) (b=15) (hp=4)
digsum([16]) = digsum(88) = digsum(484) = digsum(2662) = digsum(14641) (b=31) (hp=5)

The pattern continues (a number between square brackets represents a single digit in the base):

digsum([32]) = digsum([16][16]) = digsum(8[16]8) = digsum(4[12][12]4) = digsum(28[12]82) = digsum(15[10][10]51) (b=63) (hp=6)
digsum([64]) = digsum([32][32]) = digsum([16][32][16]) = digsum(8[24][24]8) = digsum(4[16][24][16]4) = digsum(2[10][20][20][10]2) = digsum(16[15][20][15]61) (b=127) (hp=7)
digsum([128]) = digsum([64][64]) = digsum([32][64][32]) = digsum([16][48][48][16]) = digsum(8[32][48][32]8) = digsum(4[20][40][40][20]4) = digsum(2[12][30][40][30][12]2) = digsum(17[21][35][35][21]71) (b=255) (hp=8)
digsum([256]) = digsum([128][128]) = digsum([64][128][64]) = digsum([32][96][96][32]) = digsum([16][64][96][64][16]) = digsum(8[40][80][80][40]8) = digsum(4[24][60][80][60][24]4) = digsum(2[14][42][70][70][42][14]2) = digsum(18[28][56][70][56][28]81) (b=511) (hp=9)

After this, I looked at sequences in which n(i) = n(i-1) + digitsum(n(i-1)). How long could digitsum(n(i)) be greater than or equal to digitsum(n(i-1))? In base 10, I found these sequences:

1 (digitsum=1) → 2 → 4 → 8 → 16 (sum=7) (count=4) (base=10)
9 → 18 (sum=9) → 27 (s=9) → 36 (s=9) → 45 (s=9) → 54 (s=9) → 63 (s=9) → 72 (s=9) → 81 (s=9) → 90 (s=9) → 99 (s=18) → 117 (s=9) (c=11) (b=10)
801 (s=9) → 810 (s=9) → 819 (s=18) → 837 (s=18) → 855 (s=18) → 873 (s=18) → 891 (s=18) → 909 (s=18) → 927 (s=18) → 945 (s=18) → 963 (s=18) → 981 (s=18) → 999 (s=27) → 1026 (s=9) (c=13)

Base 2 does better:

1 → 10 (s=1) → 11 (s=2) → 101 (s=2) → 111 (s=3) → 1010 (s=2) (c=5) (b=2)
16 = 10000 (s=1) → 10001 (s=2) → 10011 (s=3) → 10110 (s=3) → 11001 (s=3) → 11100 (s=3) → 11111 (s=5) → 100100 (s=2) (c=7) (b=2)
962 = 1111000010 (s=5) → 1111000111 (s=7) → 1111001110 (s=7) → 1111010101 (s=7) → 1111011100 (s=7) → 1111100011 (s=7) → 1111101010 (s=7) → 1111110001 (s=7) → 1111111000 (s=7) → 1111111111 (s=10) → 10000001001 (s=3) (c=10) (b=2)
524047 = 1111111111100001111 (s=15) → 1111111111100011110 (s=15) → 1111111111100101101 (s=15) → 1111111111100111100 (s=15) → 1111111111101001011 (s=15) → 1111111111101011010 (s=15) → 1111111111101101001(s=15) → 1111111111101111000 (s=15) → 1111111111110000111 (s=15) → 1111111111110010110 (s=15) → 1111111111110100101 (s=15) → 1111111111110110100 (s=15) → 1111111111111000011 (s=15) → 1111111111111010010 (s=15) → 1111111111111100001 (s=15) → 1111111111111110000 (s=15) → 1111111111111111111 (s=19) → 10000000000000010010 (s=3) (c=17) (b=2)

The best sequence I found in base 3 is shorter than in base 10, but there are more sequences:

1 → 2 → 11 (s=2) → 20 (s=2) → 22 (s=4) → 110 (s=2) (c=5) (b=3)
31 = 1011 (s=3) → 1021 (s=4) → 1102 (s=4) → 1120 (s=4) → 1201 (s=4) → 1212 (s=6) → 2002 (s=4) (c=6) (b=3)
54 = 2000 (s=2) → 2002 (s=4) → 2020 (s=4) → 2101 (s=4) → 2112 (s=6) → 2202 (s=6) → 2222 (s=8) → 10021(s=4) (c=7) (b=3)
432 = 121000 (s=4) → 121011 (s=6) → 121101 (s=6) → 121121 (s=8) → 121220 (s=8) → 122012 (s=8) → 122111 (s=8) → 122210 (s=8) → 200002 (s=4) (c=8) (b=3)
648 = 220000 (s=4) → 220011 (s=6) → 220101 (s=6) → 220121 (s=8) → 220220 (s=8) → 221012 (s=8) → 221111 (s=8) → 221210 (s=8) → 222002 (s=8) → 222101 (s=8) → 222200 (s=8) → 222222 (s=12) → 1000102 (s=4) (c=12) (b=3)

And what about sequences in which digitsum(n(i)) is always greater than digitsum(n(i-1))? Base 10 is disappointing:

1 → 2 → 4 → 8 → 16 (sum=7) (count=4) (base=10)
50 (s=5) → 55 (s=10) → 65 (s=11) → 76 (s=13) → 89 (s=17) → 106 (s=7) (c=5) (b=10)

Some other bases do better:

2 = 10 (s=1) → 11 (s=2) → 101 (s=2) (c=2) (b=2)
4 = 100 (s=1) → 101 (s=2) → 111 (s=3) → 1010 (s=2) (c=3) (b=2)
240 = 11110000 (s=4) → 11110100 (s=5) → 11111001 (s=6) → 11111111 (s=8) → 100000111 (s=4) (c=4) (b=2)

1 → 2 → 11 (s=2) (c=2) (b=3)
19 = 201 (s=3) → 211 (s=4) → 222 (s=6) → 1012 (s=4) (c=3) (b=3)
58999 = 2222221011 (s=15) → 2222221201 (s=16) → 2222222022 (s=18) → 2222222222 (s=20) → 10000000201 (s=4) (c=4) (b=3)

1 → 2 → 10 (s=1) (c=2) (b=4)
4 = 10 (s=1) → 11 (s=2) → 13 (s=4) → 23 (s=5) → 100 (s=1) (c=4) (b=4)
977 = 33101 (s=8) → 33121 (s=10) → 33203 (s=11) → 33232 (s=13) → 33323 (s=14) → 100021 (s=4) (c=5) (b=4)

1 → 2 → 4 → 13 (s=4) (c=3) (b=5)
105 = 410 (s=5) → 420 (s=6) → 431 (s=8) → 444 (s=12) → 1021 (s=4) (c=4) (b=5)

1 → 2 → 4 → 12 (s=3) (c=3) (b=6)
13 = 21 (s=3) → 24 (s=6) → 34 (s=7) → 45 (s=9) → 102 (s=3) (c=4) (b=6)
396 = 1500 (s=6) → 1510 (s=7) → 1521 (s=9) → 1534 (s=13) → 1555 (s=16) → 2023 (s=7) (c=5) (b=6)

1 → 2 → 4 → 11 (s=2) (c=3) (b=7)
121 = 232 (s=7) → 242 (s=8) → 253 (s=10) → 266 (s=14) → 316 (s=10) (c=4) (b=7)
205 = 412 (s=7) → 422 (s=8) → 433 (s=10) → 446 (s=14) → 466 (s=16) → 521 (s=8) (c=5) (b=7)

1 → 2 → 4 → 10 (s=1) (c=3) (b=8)
8 = 10 (s=1) → 11 (s=2) → 13 (s=4) → 17 (s=8) → 27 (s=9) → 40 (s=4) (c=5) (b=8)
323 = 503 (s=8) → 513 (s=9) → 524 (s=11) → 537 (s=15) → 556 (s=16) → 576 (s=18) → 620 (s=8) (c=6) (b=8)

1 → 2 → 4 → 8 → 17 (s=8) (c=4) (b=9)
6481 = 8801 (s=17) → 8820 (s=18) → 8840 (s=20) → 8862 (s=24) → 8888 (s=32) → 10034 (s=8) (c=5) (b=9)

1 → 2 → 4 → 8 → 16 (s=7) (c=4) (b=10)
50 (s=5) → 55 (s=10) → 65 (s=11) → 76 (s=13) → 89 (s=17) → 106 (s=7) (c=5) (b=10)

1 → 2 → 4 → 8 → 15 (s=6) (c=4) (b=11)
1013 = 841 (s=13) → 853 (s=16) → 868 (s=22) → 888 (s=24) → 8[10][10] (s=28) → 925 (s=16) (c=5) (b=11)

1 → 2 → 4 → 8 → 14 (s=5) (c=4) (b=12)
25 = 21 (s=3) → 24 (s=6) → 2[10] (s=12) → 3[10] (s=13) → 4[11] (s=15) → 62 (s=8) (c=5) (b=12)
1191 = 833 (s=14) → 845 (s=17) → 85[10] (s=23) → 879 (s=24) → 899 (s=26) → 8[11][11] (s=30) → 925 (s=16) (c=6) (b=12)

1 → 2 → 4 → 8 → 13 (s=4) (c=4) (b=13)
781 = 481 (s=13) → 491 (s=14) → 4[10]2 (s=16) → 4[11]5 (s=20) → 4[12][12] (s=28) → 521 (s=8) (c=5) (b=13)
19621 = 8[12]14 (s=25) → 8[12]33 (s=26) → 8[12]53 (s=28) → 8[12]75 (s=32) → 8[12]9[11] (s=40) → 8[12][12][12] (s=44) → 9034 (s=16) (c=6) (b=13)

1 → 2 → 4 → 8 → 12 (s=3) (c=4) (b=14)
72 = 52 (s=7) → 59 (s=14) → 69 (s=15) → 7[10] (s=17) → 8[13] (s=21) → [10]6 (s=16) (c=5) (b=14)
1275 = 671 (s=14) → 681 (s=15) → 692 (s=17) → 6[10]5 (s=21) → 6[11][12] (s=29) → 6[13][13] (s=32) → 723 (s=12) (c=6) (b=14)
19026 = 6[13]10 (s=20) → 6[13]26 (s=27) → 6[13]45 (s=28) → 6[13]65 (s=30) → 6[13]87 (s=34) → 6[13][10][13] (s=42) → 6[13][13][13] (s=45) → 7032 (s=12) (c=7) (b=14)

1 → 2 → 4 → 8 → 11 (s=2) (c=4) (b=15)
603 = 2[10]3 (s=15) → 2[11]3 (s=16) → 2[12]4 (s=18) → 2[13]7 (s=22) → 2[14][14] (s=30) → 31[14] (s=18) (c=5) (b=15)
1023 = 483 (s=15) → 493 (s=16) → 4[10]4 (s=18) → 4[11]7 (s=22) → 4[12][14] (s=30) → 4[14][14] (s=32) → 521 (s=8) (c=6) (b=15)
1891 = 861 (s=15) → 871 (s=16) → 882 (s=18) → 895 (s=22) → 8[10][12] (s=30) → 8[12][12] (s=32) → 8[14][14] (s=36) → 925 (s=16) (c=7) (b=15)

1 → 2 → 4 → 8 → 10 (s=1) (c=4) (b=16)
16 = 10 (s=1) → 11 (s=2) → 13 (s=4) → 17 (s=8) → 1[15] (s=16) → 2[15] (s=17) → 40 (s=4) (c=6) (b=16)
1396 = 574 (s=16) → 584 (s=17) → 595 (s=19) → 5[10]8 (s=23) → 5[11][15] (s=31) → 5[13][14] (s=32) → 5[15][14] (s=34) → 620 (s=8) (c=7) (b=16)
2131 = 853 (s=16) → 863 (s=17) → 874 (s=19) → 887 (s=23) → 89[14] (s=31) → 8[11][13] (s=32) → 8[13][13] (s=34) → 8[15][15] (s=38) → 925 (s=16) (c=8) (b=16)

1 → 2 → 4 → 8 → [16] (s=16) → 1[15] (s=16) (c=5) (b=17)

1 → 2 → 4 → 8 → [16] (s=16) → 1[14] (s=15) (c=5) (b=18)
5330 = [16]82 (s=26) → [16]9[10] (s=35) → [16][11]9 (s=36) → [16][13]9 (s=38) → [16][15][11] (s=42) → [16][17][17] (s=50) → [17]2[13] (s=32) (c=6) (b=18)

1 → 2 → 4 → 8 → [16] (s=16) → 1[13] (s=14) (c=5) (b=19)
116339 = [16][18]52 (s=41) → [16][18]75 (s=46) → [16][18]9[13] (s=56) → [16][18][12][12] (s=58) → [16][18][15][13] (s=62) → [16][18][18][18] (s=70) → [17]03[12] (s=32) (c=6) (b=19)

1 → 2 → 4 → 8 → [16] (s=16) → 1[12] (s=13) (c=5) (b=20)
100 = 50 (s=5) → 55 (s=10) → 5[15] (s=20) → 6[15] (s=21) → 7[16] (s=23) → 8[19] (s=27) → [10]6 (s=16) (c=6) (b=20)
135665 = [16][19]35 (s=43) → [16][19]58 (s=48) → [16][19]7[16] (s=58) → [16][19][10][14] (s=59) → [16][19][13][13] (s=61) → [16][19][16][14] (s=65) → [16][19][19][19] (s=73) → [17]03[12] (s=32) (c=7) (b=20)