Narcischism

What have bits to do with splits? A lot. Suppose you take the digits 12345, split them in all possible ways, then sum the results, like this:

12345 → (1234 + 5) + (123 + 45) + (123 + 4 + 5) + (12 + 345) + (12 + 34 + 5) + (12 + 3 + 45) + (12 + 3 + 4 + 5) + (1 + 2345) + (1 + 234 + 5) + (1 + 23 + 45) + (1 + 23 + 4 + 5) + (1 + 2 + 345) + (1 + 2 + 34 + 5) + (1 + 2 + 3 + 45) + (1 + 2 + 3 + 4 + 5) = 5175.

That’s a sum in base 10, but base 2 is at work below the surface, because each set of numbers is the answer to a series of binary questions: split or not? There are four possible places to split the digits 12345: after the 1, after the 2, after the 3 and after the 4. In (1 + 2 + 3 + 4 + 5), the binary question “Split or not?” is answered SPLIT every time. In (1234 + 5) and (1 + 2345) it’s answered SPLIT only once.

So the splits are governed by a four-digit binary number ranging from 0001 to 1111. When the binary digit is 1, split; when the binary digit is 0, don’t split. In binary, 0001 to 1111 = 01 to 15 in base 10 = 2^4-1. That’s for a five-digit number, so the four-digit 1234 will have 2^3-1 = 7 sets of sums:

1234 → (123 + 4) + (12 + 34) + (12 + 3 + 4) + (1 + 234) + (1 + 23 + 4) + 110 (1 + 2 + 34) + (1 + 2 + 3 + 4) = 502.

And the six-digit number 123456 will have 2^5-1 = 31 sets of sums. By now, an exciting question may have occurred to some readers. Does any number in base 10 equal the sum of all possible numbers formed by splitting its digits?

The exciting answer is: 0. In other words: No. To see why not, examine a quick way of summing the split-bits of 123,456,789, with nine digits. The long way is to find all possible sets of split-bits. There are 2^8-1 = 255 of them. The quick way is to sum these equations:

1 * 128 + 10 * 64 + 100 * 32 + 1000 * 16 + 10000 * 8 + 100000 * 4 + 1000000 * 2 + 10000000 * 1
2 * 128 + 20 * 64 + 200 * 32 + 2000 * 16 + 20000 * 8 + 200000 * 4 + 2000000 * 2 + 20000000 * 1
3 * 128 + 30 * 64 + 300 * 32 + 3000 * 16 + 30000 * 8 + 300000 * 4 + 3000000 * 3
4 * 128 + 40 * 64 + 400 * 32 + 4000 * 16 + 40000 * 8 + 400000 * 7
5 * 128 + 50 * 64 + 500 * 32 + 5000 * 16 + 50000 * 15
6 * 128 + 60 * 64 + 600 * 32 + 6000 * 31
7 * 128 + 70 * 64 + 700 * 63
8 * 128 + 80 * 127
9 * 255

Sum = 52,322,283.

52,322,283 has eight digits. If you use the same formula for the nine-digit number 999,999,999, the sum is 265,621,761, which has nine digits but is far smaller than 999,999,999. If you adapt the formula for the twenty-digit 19,999,999,999,999,999,999 (starting with 1), the split-bit sum is 16,562,499,999,987,400,705. In base 10, as far as I can see, numbers increase too fast and digit-lengths too slowly for the binary governing the split-sums to keep up. That’s also true in base 9 and base 8:

Num = 18,888,888,888,888,888,888 (b=9)
Sum = 16,714,201,578,038,328,760

Num = 17,777,777,777,777,777,777 (b=8)
Sum = 17,070,707,070,625,000,001

So what about base 7? Do the numbers increase slowly enough and the digit-lengths fast enough for the binary to keep up? The answer is: 1. In base 7, this twenty-digit number is actually smaller than its split-bit sum:

Num = 16,666,666,666,666,666,666 (b=7)
Sum = 20,363,036,303,404,141,363

And if you search below that, you can find a number that is equal to its split-bit sum:

166512 → (1 + 6 + 6 + 5 + 1 + 2) + (16 + 6 + 5 + 1 + 2) + (1 + 66 + 5 + 1 + 2) + (166 + 5 + 1 + 2) + (1 + 6 + 65 + 1 + 2) + (16 + 65 + 1 + 2) + (1 + 665 + 1 + 2) + (1665 + 1 + 2) + (1 + 6 + 6 + 51 + 2) + (16 + 6 + 51 + 2) + (1 + 66 + 51 + 2) + (166 + 51 + 2) + (1 + 6 + 651 + 2) + (16 + 651 + 2) + (1 + 6651 + 2) + (16651 + 2) + (1 + 6 + 6 + 5 + 12) + (16 + 6 + 5 + 12) + (1 + 66 + 5 + 12) + (166 + 5 + 12) + (1 + 6 + 65 + 12) + (16 + 65 + 12) + (1 + 665 + 12) + (1665 + 12) + (1 + 6 + 6 + 512) + (16 + 6 + 512) + (1 + 66 + 512) + (166 + 512) + (1 + 6 + 6512) + (16 + 6512) + (1 + 66512) = 166512[b=7] = 33525[b=10].

So 33525 in base 7 is what might be called a narcischist: it can gaze into the split-bits of its own digits and see itself gazing back. In base 6, 1940 is a narcischist:

12552 → (1 + 2 + 5 + 5 + 2) + (12 + 5 + 5 + 2) + (1 + 25 + 5 + 2) + (125 + 5 + 2) + (1 + 2 + 55 + 2) + (12 + 55 + 2) + (1 + 255 + 2) + (1255 + 2) + (1 + 2 + 5+ 52) + (12 + 5 + 52) + (1 + 25 + 52) + (125 + 52) + (1 + 2 + 552) + (12 + 552) + (1 + 2552) = 12552[b=6] = 1940[b=10].

In base 5, 4074 is a narcischist:

112244 → (1 + 1 + 2 + 2 + 4 + 4) + (11 + 2 + 2 + 4 + 4) + (1 + 12 + 2 + 4 + 4) + (112 + 2 + 4 + 4) + (1 + 1 + 22 + 4 + 4) + (11 + 22 + 4 + 4) + (1 + 122 + 4 + 4) + (1122 + 4 + 4) + (1 + 1 + 2 + 24 + 4) + (11 + 2 + 24 + 4) + (1 + 12 + 24 + 4) + (112 + 24 + 4) + (1 + 1 + 224 + 4) + (11 + 224 + 4) + (1 + 1224 + 4) + (11224 + 4) + (1 + 1 + 2 + 2 + 44) + (11 + 2 + 2 + 44) + (1 + 12 + 2 + 44) + (112 + 2 + 44) + (1 + 1 + 22 + 44) + (11 + 22 + 44) + (1 + 122 + 44) + (1122 + 44) + (1 + 1 + 2 + 244) + (11 + 2 + 244) + (1 + 12 + 244) + (112 + 244) + (1 + 1 + 2244) + (11 + 2244) + (1 + 12244) = 112244[b=5] = 4074.

And in base 4, 27 is:

123 → (1 + 2 + 3) + (12 + 3) + (1 + 23) = 123[b=4] = 27.

And in base 3, 13 and 26 are:

111 → (1 + 1 + 1) + (11 + 1) + (1 + 11) = 111[b=3] = 13.

222 → (2 + 2 + 2) + (22 + 2) + (2 + 22) = 222[b=3] = 26.

There are many more narcischists in all these bases, even if you exclude numbers with zeroes in them, like these in base 4:

1022 → (1 + 0 + 2 + 2) + (10 + 2 + 2) + (1 + 02 + 2) + (102 + 2) + (1 + 0 + 22) + (10 + 22) + (1 + 022) = 1022[b=4] = 74.

1030 → (1 + 0 + 3 + 0) + (10 + 3 + 0) + (1 + 03 + 0) + (103 + 0) + (1 + 0 + 30) + (10 + 30) + (1 + 030) = 1030[b=4] = 76.

1120 → (1 + 1 + 2 + 0) + (11 + 2 + 0) + (1 + 12 + 0) + (112 + 0) + (1 + 1 + 20) + (11 + 20) + (1 + 120) = 1120[b=4] = 88.

Reverssum

Here’s a simple sequence. What’s the next number?

1, 2, 4, 8, 16, 68, 100, ?

The rule I’m using is this: Reverse the number, then add the sum of the digits. So 1 doubles till it becomes 16. Then 16 becomes 61 + 6 + 1 = 68. Then 68 becomes 86 + 8 + 6 = 100. Then 100 becomes 001 + 1 = 2. And the sequence falls into a loop.

Reversing the number means that small numbers can get big and big numbers can get small, but the second tendency is stronger for the first few seeds:

• 1 → 2 → 4 → 8 → 16 → 68 → 100 → 2
• 2 → 4 → 8 → 16 → 68 → 100 → 2
• 3 → 6 → 12 → 24 → 48 → 96 → 84 → 60 → 12
• 4 → 8 → 16 → 68 → 100 → 2 → 4
• 5 → 10 → 2 → 4 → 8 → 16 → 68 → 100 → 2
• 6 → 12 → 24 → 48 → 96 → 84 → 60 → 12
• 7 → 14 → 46 → 74 → 58 → 98 → 106 → 608 → 820 → 38 → 94 → 62 → 34 → 50 → 10 → 2 → 4 → 8 → 16 → 68 → 100 → 2
• 8 → 16 → 68 → 100 → 2 → 4 → 8
• 9 → 18 → 90 → 18
• 10 → 2 → 4 → 8 → 16 → 68 → 100 → 2

An 11-seed is a little more interesting:

11 → 13 → 35 → 61 → 23 → 37 → 83 → 49 → 107 → 709 → 923 → 343 → 353 → 364 → 476 → 691 → 212 → 217 → 722 → 238 → 845 → 565 → 581 → 199 → 1010 → 103 → 305 → 511 → 122 → 226 → 632 → 247 → 755 → 574 → 491 → 208 → 812 → 229 → 935 → 556 → 671 → 190 → 101 → 103 (11 leads to an 18-loop from 103 at step 26; total steps = 44)

Now try some higher bases:

• 1 → 2 → 4 → 8 → 15 → 57 → 86 → 80 → 15 (base=11)
• 1 → 2 → 4 → 8 → 14 → 46 → 72 → 34 → 4A → B6 → 84 → 58 → 96 → 80 → 14 (base=12)
• 1 → 2 → 4 → 8 → 13 → 35 → 5B → C8 → A6 → 80 → 13 (base=13)
• 1 → 2 → 4 → 8 → 12 → 24 → 48 → 92 → 36 → 6C → DA → C8 → A4 → 5A → B6 → 80 → 12 (base=14)
• 1 → 2 → 4 → 8 → 11 → 13 → 35 → 5B → C6 → 80 → 11 (base=15)
• 1 → 2 → 4 → 8 → 10 → 2 (base=16)

Does the 1-seed always create a short sequence? No, it gets pretty long in base-19 and base-20:

• 1 → 2 → 4 → 8 → [16] → 1D → DF → [17]3 → 4[18] → 107 → 709 → 914 → 424 → 42E → E35 → 54[17] → [17]5C → C7D → D96 → 6B3 → 3C7 → 7D6 → 6EE → E[16]2 → 2[18]8 → 90B → B1A → A2E → E3[17] → [17]5A → A7B → B90 → AC→ DD → F1 → 2C → C[16] → [18]2 → 40 → 8 (base=19)
• 1 → 2 → 4 → 8 → [16] → 1C → CE → F[18] → 108 → 80A → A16 → 627 → 731 → 13[18] → [18]43 → 363 → 36F → F77 → 794 → 4A7 → 7B5 → 5CA → ADC → CF5 → 5[17]4 → 4[18]B → B[19][17] → [18]1[18] → [18]3F → F5E → E79 → 994 → 4AB → BB9 → 9D2 → 2ED → DFB → B[17]C → C[19]B → C1E → E2[19] → [19]49 → 96B → B7F → F94 → 4B3 → 3C2 → 2D0 → D[17] → [19]3 → 51 → 1B → BD → EF → [17]3 → 4[17] → [18]5 → 71 → 1F → F[17] → [19]7 → 95 → 63 → 3F → [16]1 → 2D → D[17] (base=20)

Then it settles down again:

• 1 → 2 → 4 → 8 → [16] → 1B → BD → EE → [16]0 → 1B (base=21)
• 1 → 2 → 4 → 8 → [16] → 1A → AC → DA → BE → FE → [16]0 → 1A (base=22)
• 1 → 2 → 4 → 8 → [16] → 19 → 9B → C6 → 77 → 7[21] → [22]C → EA → BF → [16]E → [16]0 → 19 (base=23)

Base-33 is also short:

1 → 2 → 4 → 8 → [16] → [32] → 1[31] → [32]0 → 1[31] (base=33)

And so is base-35:

1 → 2 → 4 → 8 → [16] → [32] → 1[29] → [29][31] → [33][19] → [21]F → [16][22] → [23][19] → [20][30] → [32]0 → 1[29] (base=35)

So what about base-34?

1 → 2 → 4 → 8 → [16] → [32] → 1[30] → [30][32] → 10[24] → [24]0[26] → [26]26 → 63[26] → [26]47 → 75[29] → [29]6E → E8A → A9C → CA7 → 7B7 → 7B[32] → [32]C[23] → [23]E[31] → [31][16][23] → [23][18][33] → [33][20][29] → [29][23]D → D[25][26] → [26][27]9 → 9[29][20] → [20][30][33] → [33][33]1 → 21[32] → [32]23 → 341 → 14B → B4[17] → [17]59 → 96E → E74 → 485 → 58[21] → [21]95 → 5A[22] → [22]B8 → 8C[29] → [29]D[23] → [23]F[26] → [26][17][19] → [19][19][20] → [20][21]9 → 9[23]2 → 2[24]9 → 9[25]3 → 3[26]C → C[27]A → A[28][27] → [27][30]7 → 7[32][23] → [24]01 → 11F → F1[18] → [18]2F → F3[19] → [19]4[18] → [18]5[26] → [26]6[33] → [33]8[23] → [23]A[29] → [29]C[17] → [17]E[19] → [19]F[33] → [33][17][18] → [18][19][33] → [33][21][20] → [20][24]5 → 5[26]1 → 1[27]3 → 3[27][32] → [32][28][31] → [31][31][21] → [22]0C → C1[22] → [22]2D → D3[25] → [25]4[20] → [20]66 → 67[18] → [18]83 → 39D → D9[28] → [28]A[29] → [29]C[27] → [27]E[29] → [29][16][29] → [29][19]1 → 1[21]A → A[21][33] → [33][23]6 → 6[25][27] → [27][26][30] → [30][29]8 → 8[31][29] → [29][33]8 → 91[31] → [31]2[16] → [16]4C → C5E → E69 → 979 → 980 → 8[26] → [27]8 → 9[28] → [29]C → E2 → 2[30] → [31]0 → 1[28] → [28][30] → [32][18] → [20]E → F[20] → [21][16] → [17][24] → [25][24] → [26]6 → 7[24] → [25]4 → 5[20] → [20][30] → [32]2 → 3[32] → [33]4 → 62 → 2E → E[18] → [19]C → D[16] → [17]8 → 98 → 8[26] (1 leads to a 30-loop from 8[26] / 298 in base-34 at step 111; total steps = 141)

An alternative rule is to add the digit-sum first and then reverse the result. Now 8 becomes 8 + 8 = 16 and 16 becomes 61. Then 61 becomes 61 + 6 + 1 = 68 and 68 becomes 86. Then 86 becomes 86 + 8 + 6 = 100 and 100 becomes 001 = 1:

• 1 → 2 → 4 → 8 → 61 → 86 → 1
• 2 → 4 → 8 → 61 → 86 → 1 → 2
• 3 → 6 → 21 → 42 → 84 → 69 → 48 → 6
• 4 → 8 → 61 → 86 → 1 → 2 → 4
• 5 → 1 → 2 → 4 → 8 → 62 → 7 → 48 → 6 → 27 → 63 → 27
• 6 → 21 → 42 → 84 → 69 → 48 → 6
• 7 → 41 → 64 → 47 → 85 → 89 → 601 → 806 → 28 → 83 → 49 → 26 → 43 → 5 → 6 → 27 → 63 → 27
• 8 → 61 → 86 → 1 → 2 → 4 → 8
• 9 → 81 → 9
• 10 → 11 → 31 → 53 → 16 → 32 → 73 → 38 → 94 → 701 → 907 → 329 → 343 → 353 → 463 → 674 → 196 → 212 → 712 → 227 → 832 → 548 → 565 → 185 → 991 → 101 → 301 → 503 → 115 → 221 → 622 → 236 → 742 → 557 → 475 → 194→ 802 → 218 → 922 → 539 → 655 → 176 → 91 → 102 → 501 → 705 → 717 → 237 → 942 → 759 → 87 → 208 → 812 → 328 → 143 → 151 → 851 → 568 → 785 → 508 → 125 → 331 → 833 → 748 → 767 → 787 → 908 → 529 → 545 → 955 → 479 → 994 → 6102 → 1116 → 5211 → 225 → 432 → 144 → 351 → 63 → 27 → 63

Six Six Nix

4 x 3 = 13. A mistake? Not in base-9, where 13 = 1×9^1 + 3 = 12 in base-10. This means that 13 is a sum-product number in base-9: first add its digits, then multiply them, then multiply the digit-sum by the digit-product: (1+3) x (1×3) = 13[9]. There are four more sum-product numbers in this base:

2086[9] = 17 x 116 = (2 + 8 + 6) x (2 x 8 x 6) = 1536[10] = 16 x 96
281876[9] = 35 x 7333 = (2 + 8 + 1 + 8 + 7 + 6) x (2 x 8 x 1 x 8 x 7 x 6) = 172032[10] = 32 x 5376
724856[9] = 35 x 20383 = (7 + 2 + 4 + 8 + 5 + 6) x (7 x 2 x 4 x 8 x 5 x 6) = 430080[10] = 32 x 13440
7487248[9] = 44 x 162582 = (7 + 4 + 8 + 7 + 2 + 4 + 8) x (7 x 4 x 8 x 7 x 2 x 4 x 8) = 4014080[10] = 40 x 100352

And that’s the lot, apart from the trivial 0 = (0) x (0) and 1 = (1) x (1), which are true in all bases.

What about base-10?

135 = 9 x 15 = (1 + 3 + 5) x (1 x 3 x 5)
144 = 9 x 16 = (1 + 4 + 4) x (1 x 4 x 4)
1088 = 17 x 64 = (1 + 8 + 8) x (1 x 8 x 8)

1088 is missing from the list at Wikipedia and the Encyclopedia of Integer Sequences, but I like the look of it, so I’m including it here. Base-11 has five sum-product numbers:

419[11] = 13 x 33 = (4 + 1 + 9) x (4 x 1 x 9) = 504[10] = 14 x 36
253[11] = [10] x 28 = (2 + 5 + 3) x (2 x 5 x 3) = 300[10] = 10 x 30
2189[11] = 19 x 121 = (2 + 1 + 8 + 9) x (2 x 1 x 8 x 9) = 2880[10] = 20 x 144
7634[11] = 19 x 419 = (7 + 6 + 3 + 4) x (7 x 6 x 3 x 4) = 10080[10] = 20 x 504
82974[11] = 28 x 3036 = (8 + 2 + 9 + 7 + 4) x (8 x 2 x 9 x 7 x 4) = 120960[10] = 30 x 4032

But the record for bases below 50 is set by 7:

22[7] = 4 x 4 = (2 + 2) x (2 x 2) = 16[10] = 4 x 4
505[7] = 13 x 34 = (5 + 5) x (5 x 5) = 250[10] = 10 x 25
242[7] = 11 x 22 = (2 + 4 + 2) x (2 x 4 x 2) = 128[10] = 8 x 16
1254[7] = 15 x 55 = (1 + 2 + 5 + 4) x (1 x 2 x 5 x 4) = 480[10] = 12 x 40
2343[7] = 15 x 132 = (2 + 3 + 4 + 3) x (2 x 3 x 4 x 3) = 864[10] = 12 x 72
116655[7] = 33 x 2424 = (1 + 1 + 6 + 6 + 5 + 5) x (1 x 1 x 6 x 6 x 5 x 5) = 21600[10] = 24 x 900
346236[7] = 33 x 10362 = (3 + 4 + 6 + 2 + 3 + 6) x (3 x 4 x 6 x 2 x 3 x 6) = 62208[10] = 24 x 2592
424644[7] = 33 x 11646 = (4 + 2 + 4 + 6 + 4 + 4) x (4 x 2 x 4 x 6 x 4 x 4) = 73728[10] = 24 x 3072

And base-6? Six Nix. There are no sum-product numbers unique to that base (to the best of my far-from-infallible knowledge). Here is the full list for base-3 to base-50 (not counting 0 and 1 as sum-product numbers):

5 in base-11 4 in base-21 3 in base-31 2 in base-41
4 in base-12 5 in base-22 1 in base-32 3 in base-42
0 in base-3 3 in base-13 4 in base-23 3 in base-33 4 in base-43
2 in base-4 3 in base-14 2 in base-24 4 in base-34 5 in base-44
1 in base-5 2 in base-15 3 in base-25 2 in base-35 6 in base-45
0 in base-6 2 in base-16 6 in base-26 2 in base-36 7 in base-46
8 in base-7 6 in base-17 0 in base-27 3 in base-37 3 in base-47
1 in base-8 5 in base-18 1 in base-28 3 in base-38 7 in base-48
5 in base-9 7 in base-19 0 in base-29 1 in base-39 5 in base-49
3 in base-10 3 in base-20 2 in base-30 2 in base-40 3 in base-50