Narcissarithmetic

Why is 438,579,088 a beautiful number? Simple: it may seem entirely arbitrary, but it’s actually self-empowered:

438,579,088 = 4^4 + 3^3 + 8^8 + 5^5 + 7^7 + 9^9 + 0^0 + 8^8 + 8^8 = 256 + 27 + 16777216 + 3125 + 823543 + 387420489 + 0 + 16777216 + 16777216 (usually 0^0 = 1, but the rule is slightly varied here)

438,579,088 is so beautiful, in fact, that it’s in love with itself as a narcissistic number, or number that can be generated by manipulation of its own digits. 89 = 8^1 + 9^2 = 8 + 81 and 135 = 1^1 + 3^2 + 5^3 = 1 + 9 + 125 are different kinds of narcissistic number. 3435 is self-empowered again:

3435 = 3^3 + 4^4 + 3^3 + 5^5 = 27 + 256 + 27 + 3125

But that’s your lot: there are no more numbers in base-10 that are equal to the sum of their self-empowered digits (apart from the trivial 0 and 1). To prove this, start by considering that there is a limit to the size of a self-empowered number. 9^9 is 387,420,489, which is nine digits long. The function autopower(999,999,999) = 387,420,489 x 9 = 3,486,784,401, which is ten digits long. But autopower(999,999,999,999) = 387,420,489 x 12 = 4,649,045,868, also ten digits long.

The Metamorphosis of Narcissus by Salvador Dalí

Salvador Dalí, La Metamorfosis de Narciso (1937)

So you don’t need to check numbers above a certain size. There still seem a lot of numbers to check: 438,579,088 is a long way above 3435. However, the search is easy to shorten if you consider that checking 3-3-4-5 is equivalent to checking 3-4-3-5, just as checking 034,578,889 is equivalent to checking 438,579,088. If you self-empower a number and the result has the same digits as the original number, you’ve found what you’re looking for. The order of digits in the original number doesn’t matter, because the result has automatically sorted them for you. The function autopower(3345) produces 3435, therefore 3435 must be self-empowered.

So the rule is simple: Check only the numbers in which any digit is greater than or equal to all digits to its left. In other words, you check 12 and skip 21, check 34 and skip 43, check 567 and skip 576, 657, 675, 756 and 765. That reduces the search-time considerably: discarding numbers is computationally simpler than self-empowering them. It’s also computationally simple to vary the base in which you’re searching. Base-10 produces only two self-empowered numbers, but its neighbours base-9 and base-11 are much more fertile:

30 = 3^3 + 0^0 = 30 + 0 (b=9)
27 = 27 + 0 (b=10)

31 = 3^3 + 1^1 = 30 + 1 (b=9)
28 = 27 + 1 (b=10)

156262 = 1^1 + 5^5 + 6^6 + 2^2 + 6^6 + 2^2 = 1 + 4252 + 71000 + 4 + 71000 + 4 (b=9)
96446 = 1 + 3125 + 46656 + 4 + 46656 + 4 (b=10)

1647063 = 1^1 + 6^6 + 4^4 + 7^7 + 0^0 + 6^6 + 3^3 = 1 + 71000 + 314 + 1484617 + 0 + 71000 + 30 (b=9)
917139 = 1 + 46656 + 256 + 823543 + 0 + 46656 + 27 (b=10)

1656547 = 1^1 + 6^6 + 5^5 + 6^6 + 5^5 + 4^4 + 7^7 = 1 + 71000 + 4252 + 71000 + 4252 + 314 + 1484617 (b=9)
923362 = 1 + 46656 + 3125 + 46656 + 3125 + 256 + 823543 (b=10)

34664084 = 3^3 + 4^4 + 6^6 + 6^6 + 4^4 + 0^0 + 8^8 + 4^4 = 30 + 314 + 71000 + 71000 + 314 + 0 + 34511011 + 314 (b=9)
16871323 = 27 + 256 + 46656 + 46656 + 256 + 0 + 16777216 + 256 (b=10)

66500 = 6^6 + 6^6 + 5^5 + 0^0 + 0^0 = 32065 + 32065 + 2391 + 0 + 0 (b=11)
96437 = 46656 + 46656 + 3125 + 0 + 0 (b=10)

66501 = 6^6 + 6^6 + 5^5 + 0^0 + 1^1 = 32065 + 32065 + 2391 + 0 + 1 (b=11)
96438 = 46656 + 46656 + 3125 + 0 + 1 (b=10)

517503 = 5^5 + 1^1 + 7^7 + 5^5 + 0^0 + 3^3 = 2391 + 1 + 512816 + 2391 + 0 + 25 (b=11)
829821 = 3125 + 1 + 823543 + 3125 + 0 + 27 (b=10)

18453278 = 1^1 + 8^8 + 4^4 + 5^5 + 3^3 + 2^2 + 7^7 + 8^8 = 1 + 9519A75 + 213 + 2391 + 25 + 4 + 512816 + 9519A75 (b=11)
34381388 = 1 + 16777216 + 256 + 3125 + 27 + 4 + 823543 + 16777216 (b=10)

18453487 = 1^1 + 8^8 + 4^4 + 5^5 + 3^3 + 4^4 + 8^8 + 7^7 = 1 + 9519A75 + 213 + 2391 + 25 + 213 + 9519A75 + 512816 (b=11)
34381640 = 1 + 16777216 + 256 + 3125 + 27 + 256 + 16777216 + 823543 (b=10)

It’s easy to extend the concept of self-empowered narcisso-numbers. The prime 71 = 131 in base-7 and the prime 83 = 146 in base-7. If 131[b=7] is empowered to the digits of 146[b=7], you get 146[b=7]; and if 146[b=7] is empowered to the digits of 131[b=7], you get 131[b=7], like this:

71 = 131[b=7] → 1^1 + 3^4 + 1^6 = 1 + 81 + 1 = 83 = 146[b=7]

83 = 146[b=7] → 1^1 + 4^3 + 6^1 = 1 + 64 + 6 = 71 = 131[b=7]

But it’s not easy to find more examples. Are there other-empowering pairs like that in base-10? I don’t know.

More Multi-Magic

The answer, I’m glad to say, is yes. The question is: Can a prime magic-square nest inside a second prime magic-square that nests inside a third prime magic-square? I asked this in Multi-Magic, where I described how a magic square is a square of numbers where all rows, all columns and both diagonals add to the same number, or magic total. This magic square consists entirely of prime numbers, or numbers divisible only by themselves and 1:

43 | 01 | 67
61 | 37 | 13
07 | 73 | 31

Base = 10, magic total = 111

It nests inside this prime magic-square, whose digit-sums in base-97 re-create it:

0619  =  [06][37] | 0097  =  [01][00] | 1123  =  [11][56]
1117  =  [11][50] | 0613  =  [06][31] | 0109  =  [01][12]
0103  =  [01][06] | 1129  =  [11][62] | 0607  =  [06][25]

Base = 97, magic total = 1839

And that prime magic-square nests inside this one:

2803  =  [1][0618] | 2281  =  [1][0096] | 3307  =  [1][1122]
3301  =  [1][1116] | 2797  =  [1][0612] | 2293  =  [1][0108]
2287  =  [1][0102] | 3313  =  [1][1128] | 2791  =  [1][0606]

Base = 2185, magic total = 8391

I don’t know whether that prime magic-square nests inside a fourth square, but a 3-nest is good for 3×3 magic squares. On the other hand, this famous 3×3 magic square is easy to nest inside an infinite series of other magic squares:

6 | 1 | 8
7 | 5 | 3
2 | 9 | 4

Base = 10, magic total = 15

It’s created by the digit-sums of this square in base-9 (“14 = 15” means that the number 14 is represented as “15” in base-9):

14 = 15 → 6 | 09 = 10 → 1 | 16 = 17 → 8
15 = 16 → 7 | 13 = 14 → 5 | 11 = 12 → 3
10 = 11 → 2 | 17 = 18 → 9 | 12 = 13 → 4

Base = 9, magic total = 39


And that square in base-9 is created by the digit-sums of this square in base-17:

30 = 1[13] → 14 | 25 = 00018 → 09 | 32 = 1[15] → 16
31 = 1[14] → 15 | 29 = 1[12] → 13 | 27 = 1[10] → 11
26 = 00019 → 10 | 33 = 1[16] → 17 | 28 = 1[11] → 12

Base = 17, magic total = 87

And so on:

62 = 1[29] → 30 | 57 = 1[24] → 25 | 64 = 1[31] → 32
63 = 1[30] → 31 | 61 = 1[28] → 29 | 59 = 1[26] → 27
58 = 1[25] → 26 | 65 = 1[32] → 33 | 60 = 1[27] → 28

Base = 33, magic total = 183

126 = 1[61] → 62 | 121 = 1[56] → 57 | 128 = 1[63] → 64
127 = 1[62] → 63 | 125 = 1[60] → 61 | 123 = 1[58] → 59
122 = 1[57] → 58 | 129 = 1[64] → 65 | 124 = 1[59] → 60

Base = 65, magic total = 375

Previously Pre-Posted (please peruse):

Multi-Magic

Multi-Magic

A magic square is a square of numbers in which all rows, all columns and both diagonals add to the same number, or magic total. The simplest magic square using distinct numbers is this:

6 1 8
7 5 3
2 9 4

It’s easy to prove that the magic total of a 3×3 magic square must be three times the central number. Accordingly, if the central number is 37, the magic total must be 111. There are lots of ways to create a magic square with 37 at its heart, but this is my favourite:

43 | 01 | 67
61 | 37 | 13
07 | 73 | 31

The square is special because all the numbers are prime, or divisible by only themselves and 1 (though 1 itself is not usually defined as prime in modern mathematics). I like the 37-square even more now that I’ve discovered it can be found inside another all-prime magic square:

0619 = 0006[37] | 0097 = 00000010 | 1123 = [11][56]
1117 = [11][50] | 0613 = 0006[31] | 0109 = 0001[12]
0103 = 00000016 | 1129 = [11][62] | 0607 = 0006[25]

Magic total = 1839

The square is shown in both base-10 and base-97. If the digit-sums of the base-97 square are calculated, this is the result (e.g., the digit-sum of 6[37][b=97] = 6 + 37 = 43):

43 | 01 | 67
61 | 37 | 13
07 | 73 | 31

This makes me wonder whether the 613-square might nest in another all-prime square, and so on, perhaps ad infinitum [Update: yes, the 613-square is a nestling]. There are certainly many nested all-prime squares. Here is square-631 in base-187:

661 = 003[100] | 379 = 00000025 | 853 = 004[105]
823 = 004[075] | 631 = 003[070] | 439 = 002[065]
409 = 002[035] | 883 = 004[135] | 601 = 003[040]

Magic total = 1893

Digit-sums:

103 | 007 | 109
079 | 073 | 067
037 | 139 | 043

Magic total = 219

There are also all-prime magic squares that have two kinds of nestlings inside them: digit-sum magic squares and digit-product magic squares. The digit-product of a number is calculated by multiplying its digits (except 0): digit-product(37) = 3 x 7 = 21, digit-product(103) = 1 x 3 = 3, and so on. In base-331, this all-prime magic square yields both a digit-sum square and a digit-product square:

503 = 1[172] | 359 = 1[028] | 521 = 1[190]
479 = 1[148] | 461 = 1[130] | 443 = 1[112]
401 = 1[070] | 563 = 1[232] | 419 = 1[088]

Magic total = 1383

Digit-sums:

173 | 029 | 191
149 | 131 | 113
071 | 233 | 089

Magic total = 393

Digit-products:

172 | 028 | 190
148 | 130 | 112
070 | 232 | 088

Magic total = 390

Here are two more twin-bearing all-prime magic squares:

Square-719 in base-451:

761 = 1[310] | 557 = 1[106] | 839 = 1[388]
797 = 1[346] | 719 = 1[268] | 641 = 1[190]
599 = 1[148] | 881 = 1[430] | 677 = 1[226]

Magic total = 2157

Digit-sums:

311 | 107 | 389
347 | 269 | 191
149 | 431 | 227

Magic total = 807

Digit-products:

310 | 106 | 388
346 | 268 | 190
148 | 430 | 226

Magic total = 804

Square-853 in base-344:

883 = 2[195] | 709 = 2[021] | 967 = 2[279]
937 = 2[249] | 853 = 2[165] | 769 = 2[081]
739 = 2[051] | 997 = 2[309] | 823 = 2[135]

Magic total = 2559

Digit-sums:

197 | 023 | 281
251 | 167 | 083
053 | 311 | 137

Magic total = 501

Digit-products:

390 | 042 | 558
498 | 330 | 162
102 | 618 | 270

Magic total = 990

Proviously Post-Posted (please peruse):

More Multi-Magic

Prummer-Time Views

East, west, home’s best. And for human beings, base-10 is a kind of home. We have ten fingers and we use ten digits. Base-10 comes naturally to us: it feels like home. So it’s disappointing that there is no number in base-10 that is equal to the sum of the squares of its digits (apart from the trivial 0^2 = 0 and 1^2 = 1). Base-9 and base-11 do better:

41 = 45[b=9] = 4^2 + 5^2 = 16 + 25 = 41
50 = 55[b=9] = 5^2 + 5^2 = 25 + 25 = 50

61 = 56[b=11] = 5^2 + 6^2 = 25 + 36 = 61
72 = 66[b=11] = 6^2 + 6^2 = 36 + 36 = 72

Base-47 does better still, with fourteen 2-sumbers. And base-10 does have 3-sumbers, or numbers equal to the sum of the cubes of their digits:

153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153
370 = 3^3 + 7^3 + 0^3 = 27 + 343 + 0 = 370
371 = 3^3 + 7^3 + 1^3 = 27 + 343 + 1 = 371
407 = 4^3 + 0^3 + 7^3 = 64 + 0 + 343 = 407

But base-10 disappoints again when it comes to prumbers, or prime sumbers, or numbers that are equal to the sum of the primes whose indices are equal to the digits of the number. The index of a prime number is its position in the list of primes. Here are the first nine primes and their indices (with 0 as a pseudo-prime at position 0):

prime(0) = 0
prime(1) = 2
prime(2) = 3
prime(3) = 5
prime(4) = 7
prime(5) = 11
prime(6) = 13
prime(7) = 17
prime(8) = 19
prime(9) = 23

So the prumber, or prime-sumber, of 1 = prime(1) = 2. The prumber of 104 = prime(1) + prime(0) + prime(4) = 2 + 0 + 7 = 9. The prumber of 186 = 2 + 19 + 13 = 34. But no number in base-10 is equal to its prime sumber. Base-2 and base-3 do better:

Base-2 has 1 prumber:

2 = 10[b=2] = 2 + 0 = 2

Base-3 has 2 prumbers:

4 = 11[b=3] = 2 + 2 = 4
5 = 12[b=3] = 2 + 3 = 5

But prumbers are rare. The next record is set by base-127, with 4 prumbers:

165 = 1[38][b=127] = 2 + 163 = 165
320 = 2[66][b=127] = 3 + 317 = 320
472 = 3[91][b=127] = 5 + 467 = 472
620 = 4[112][b=127] = 7 + 613 = 620

Base-479 has 4 prumbers:

1702 = 3[265] = 5 + 1697 = 1702
2250 = 4[334] = 7 + 2243 = 2250
2800 = 5[405] = 11 + 2789 = 2800
3344 = 6[470] = 13 + 3331 = 3344

Base-637 has 4 prumbers:

1514 = 2[240] = 3 + 1511 = 1514
2244 = 3[333] = 5 + 2239 = 2244
2976 = 4[428] = 7 + 2969 = 2976
4422 = 6[600] = 13 + 4409 = 4422

Base-831 has 4 prumbers:

999 = 1[168] = 2 + 997 = 999
2914 = 3[421] = 5 + 2909 = 2914
3858 = 4[534] = 7 + 3851 = 3858
4798 = 5[643] = 11 + 4787 = 4798

Base-876 has 4 prumbers:

1053 = 1[177] = 2 + 1051 = 1053
3066 = 3[438] = 5 + 3061 = 3066
4064 = 4[560] = 7 + 4057 = 4064
6042 = 6[786] = 13 + 6029 = 6042

Previously pre-posted (please peruse):

Sumbertime Views

Roo’s Who

11 is a prime number, divisible by only itself and 1. If you add its digits, 1 + 1, you get 2. 11 + 2 = 13, another prime number. And 13 + (1 + 3) = 17, a third prime number. And there it ends, because 17 + (1 + 7) = 25 = 5 x 5. I call (11, 13, 17) kangaroo primes, because one jumps to another. In base 10, the record for numbers below 1,000,000 is this:

6 primes: 516493 + 28 = 516521 + 20 = 516541 + 22 = 516563 + 26 = 516589 + 34 = 516623.

In base 16, the record is this:

8 primes: 97397 = 17,C75[b=16] + 32 = 97429 = 17,C95[b=16] + 34 = 97463 = 17,CB7[b=16] + 38 = 97501 = 17,CDD[b=16] + 46 = 97547 = 17,D0B[b=16] + 32 = 97579 = 17,D2B[b=16] + 34 = 97613 = 17,D4D[b=16] + 38 = 97651 = 17,D73[b=16].

Another kind of kangaroo prime is found not by adding the sum of digits, but by adding their product, i.e., the result of multiplying the digits (except 0). 23 + (2 x 3) = 29. 29 + (2 x 9) = 47. But 47 + (4 x 7) = 75 = 3 x 5 x 5. So (23, 29, 47) are kangaroo primes too. In base 10, the record for numbers below 1,000,000 is this:

9 primes: 524219 + 720 = 524939 + 9720 = 534659 + 16200 = 550859 + 9000 = 559859 + 81000 = 640859 + 8640 = 649499 + 69984 = 719483 + 6048 = 725531.

But what about subtraction? For a reason I don’t understand, subtracting the digit-sum doesn’t seem to create any kangaroo-primes in base 10. But 11 in base 8 is 13 = 1 x 8^1 + 3 x 8^0 and 13[b=8] – (1 + 3) = 7. In base 2, this sequence appears:

1619 = 11,001,010,011[b=2] – 6 = 1613 = 11,001,001,101[b=2] – 6 = 1607 = 11,001,000,111[b=2] – 6 = 1601 = 11,001,000,001[b=2] – 4 = 1597.

However, subtracting the digit-product creates kangaroo-primes in base 10. For example, 23 – (2 x 3) = 17. The record below 1,000,000 is this (when 0 is found in the digits of a number, it is not included in the multiplication):

7 primes: 64037 – 504 = 63533 – 810 = 62723 – 504 = 62219 – 216 = 62003 – 36 = 61967 – 2268 = 59699.

Base 2 also provides examples of addition/subtraction pairs of kangaroo-primes, like this:

3 = 11[b=2] + 2 = 5 = 101[b=2] | 5 = 101[b=2] – 2 = 3

277 = 100,010,101[b=2] + 4 = 281 = 100,011,001[b=2] | 281 – 4 = 277

311 = 100,110,111[b=2] + 6 = 317 = 100,111,101[b=2] | 317 – 6 = 311

In base 10, addition/subtraction pairs are created by the digit-product, like this:

239 + 54 = 293 | 293 – 54 = 239
563 + 90 = 653 | 653 – 90 = 563
613 + 18 = 631 | 631 – 18 = 613
2791 + 126 = 2917 | 2917 – 126 = 2791
3259 + 270 = 3529 | 3529 – 270 = 3259
5233 + 90 = 5323 | 5323 – 90 = 5233
5297 + 630 = 5927 | 5927 – 630 = 5297
6113 + 18 = 6131 | 6131 – 18 = 6113
10613 + 18 = 10631 | 10631 – 18 = 10613
12791 + 126 = 12917 | 12917 – 126 = 12791

You could call these boxing primes, like boxing kangaroos. The two primes in the pair usually have the same digits in different arrangements, but there are also pairs like these:

24527 + 560 = 25087 | 25087 – 560 = 24527
25183 + 240 = 25423 | 25423 – 240 = 25183
50849 + 1440 = 52289 | 52289 – 1440 = 50849

Neuclid on the Block

How many blows does it take to demolish a wall with a hammer? It depends on the wall and the hammer, of course. If the wall is reality and the hammer is mathematics, you can do it in three blows, like this:

α’. Σημεῖόν ἐστιν, οὗ μέρος οὐθέν.
β’. Γραμμὴ δὲ μῆκος ἀπλατές.
γ’. Γραμμῆς δὲ πέρατα σημεῖα.

1. A point is that of which there is no part.
2. A line is a length without breadth.
3. The extremities of a line are points.

That is the astonishing, world-shattering opening in one of the strangest – and sanest – books ever written. It’s twenty-three centuries old, was written by an Alexandrian mathematician called Euclid (fl. 300 B.C.), and has been pored over by everyone from Abraham Lincoln to Bertrand Russell by way of Edna St. Vincent Millay. Its title is highly appropriate: Στοιχεῖα, or Elements. Physical reality is composed of chemical elements; mathematical reality is composed of logical elements. The second reality is much bigger – infinitely bigger, in fact. In his Elements, Euclid slipped the bonds of time, space and matter by demolishing the walls of reality with a mathematical hammer and escaping into a world of pure abstraction.

• Continue reading Neuclid on the Block

Sumbertime Views

Like 666 (see Revelation 13:18), 153 (see John 21:11) appears in the Bible. And perhaps for the same reason: because it is the sum of successive integers. 153 = 1+2+3+…+17 = Σ(17), just as 666 = Σ(36). So both numbers are sum-numbers or sumbers. But 153 has other interesting properties, including one that can’t have been known in Biblical times, because numbers weren’t represented in the right way. It’s also the sum of the cubes of its digits: 153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27. So 153 is a cube-sumber or 3-sumber. The other 3-sumbers are 370, 371 and 407. There are 4-sumbers too, like 1,634 = 1^4 + 6^4 + 3^4 + 4^4, and 5-sumbers, like 194,979 = 1^5 + 9^5 + 4^5 + 9^5 + 7^5 + 9^5, and 6-sumbers, like 548,834 = 5^6 + 4^6 + 8^6 + 8^6 + 3^6 + 4^6.

But there are no 2-sumbers, or numbers that are the sum of the squares of their digits. It doesn’t take long to confirm this, because numbers above a certain size can’t be 2-sumbers. 9^2 + 9^2 = 162, but 9^2 + 9^2 + 9^2 = 243. So 2-sumbers can’t exist above 99 and if you search that high you’ll find that they don’t exist at all. At least not in this house, but they do exist in the houses next door. Base 10 yields nothing, so what about base 9?

4^2 + 5^2 = 45[9] = 41[10]
5^2 + 5^2 = 55[9] = 50

And base 11?

5^2 + 6^2 = 56[11] = 61[10]
6^2 + 6^2 = 66[11] = 72

This happens because odd bases always yield a pair of 2-sumbers whose second digit is one more than half the base and whose first digit is the same or one less. See above (and the appendix). Such a pair is found among the 14 sumbers of base 47, which is the best total till base 157 and its 22 sumbers. Here are the 2-sumbers for base 47:

2^2 + 10^2 = 104
3^2 + 12^2 = 153
5^2 + 15^2 = 250
9^2 + 19^2 = 442
12^2 + 21^2 = 585
14^2 + 22^2 = 680
23^2 + 24^2 = 1,105
24^2 + 24^2 = 1,152
33^2 + 22^2 = 1,573
35^2 + 21^2 = 1,666
38^2 + 19^2 = 1,805
42^2 + 15^2 = 1,989
44^2 + 12^2 = 2,080
45^2 + 10^2 = 2,125

As the progressive records for 2-sumber-totals are set, subsequent bases seem to either match or surpass them, except in three cases below base 450:

2 in base 5
4 in base 7
6 in base 13
10 in base 43
14 in base 47
22 in base 157
8 in base 182*
16 in base 268*
30 in base 307
18 in base 443*

Totals for sums of squares in bases 4 to 450

Totals for sums-of–squares in bases 4 to 450 (click for larger image)

Appendix: Odd Bases and 2-sumbers

Take an even number and half of that even number: say 12 and 6. 12 x 6 = 11 x 6 + 6. Further, 12 x 6 = 2 x 6 x 6 = 2 x 6^2 = 6^2 + 6^2. Accordingly, 66[11] = 6 x 11 + 6 = 12 x 6 = 6^2 + 6^2. So 66 in base 11 is a 2-sumber. Similar reasoning applies to every other odd base except base-3 [update: wrong!]. Now, take 12 x 5 = 2 x 6 x 5 = 2 x (5×5 + 5) = 5^2+5 + 5^5+5 = 5^5 + 5^5+2×5. Further, 5^5+2×5 = (5+1)(5+1) – 1 = 6^2 – 1. Accordingly, 56[11] = 11×5 + 6 = 12×5 + 1 = 5^2 + 6^2. Again, similar reasoning applies to every other odd base except base-3 [update: no — 1^2 + 2^2 = 12[3] = 5; 2^2 + 2^2 = 22[3] = 8]. This means that every odd base b, except base-3, will supply a pair of 2-sumbers with digits [d-1][d] and [d][d], where d = (b + 1) / 2.

Watch this Sbase

In standard notation, there are two ways to represent 2: 10, in base 2, and 2 in every other base. Accordingly, there are three ways to represent 3: 11 in base 2, 10 in base 3, and 3 in every other base. There are four ways to represent 4, five ways to represent 5, and so on. Now, suppose you sum all the digits of all the representations of n in the bases 2 to n, like this:

Σ(2) = 1+02 = 1
Σ(3) = 1+12 + 1+03 = 3 (+2)
Σ(4) = 1+0+02 + 1+13 + 1+04 = 4 (+1)
Σ(5) = 1+0+12 + 1+23 + 1+14 + 1+05 = 8 (+4)
Σ(6) = 1+1+02 + 2+03 + 1+24 + 1+15 + 1+06 = 10 (+2)
Σ(7) = 1+1+12 + 2+13 + 1+34 + 1+25 + 1+16 + 1+07 = 16 (+6)
Σ(8) = 1+0+0+02 + 2+23 + 2+04 + 1+35 + 1+26 + 1+17 + 1+08 = 17 (+1)
Σ(9) = 1+0+0+12 + 1+0+03 + 2+14 + 1+45 + 1+36 + 1+27 + 1+18 + 1+09 = 21 (+4)
Σ(10) = 1+0+1+02 + 1+0+13 + 2+24 + 2+05 + 1+46 + 1+37 + 1+28 + 1+19 + 1+010 = 25 (+4)

It seems reasonable to suppose that as n increases, so the all-digit-sum of n increases. But that isn’t always the case: occasionally it decreases. Here are the sums for n=11..100 (with prime factors when the sum is composite):

Σ(11) = 35 = 5·7 (+10)
Σ(12) = 34 = 2·17 (-1)
Σ(13) = 46 = 2·23 (+12)
Σ(14) = 52 = 22·13 (+6)
Σ(15) = 60 = 22·3·5 (+8)
Σ(16) = 58 = 2·29 (-2)
Σ(17) = 74 = 2·37 (+16)
Σ(18) = 73 (-1)
Σ(19) = 91 = 7·13 (+18)
Σ(20) = 92 = 22·23 (+1)
Σ(21) = 104 = 23·13 (+12)
Σ(22) = 114 = 2·3·19 (+10)
Σ(23) = 136 = 23·17 (+22)
Σ(24) = 128 = 27 (-8)
Σ(25) = 144 = 24·32 (+16)
Σ(26) = 156 = 22·3·13 (+12)
Σ(27) = 168 = 23·3·7 (+12)
Σ(28) = 171 = 32·19 (+3)
Σ(29) = 199 (+28)
Σ(30) = 193 (-6)
Σ(31) = 223 (+30)
Σ(32) = 221 = 13·17 (-2)
Σ(33) = 241 (+20)
Σ(34) = 257 (+16)
Σ(35) = 281 (+24)
Σ(36) = 261 = 32·29 (-20)
Σ(37) = 297 = 33·11 (+36)
Σ(38) = 315 = 32·5·7 (+18)
Σ(39) = 339 = 3·113 (+24)
Σ(40) = 333 = 32·37 (-6)
Σ(41) = 373 (+40)
Σ(42) = 367 (-6)
Σ(43) = 409 (+42)
Σ(44) = 416 = 25·13 (+7)
Σ(45) = 430 = 2·5·43 (+14)
Σ(46) = 452 = 22·113 (+22)
Σ(47) = 498 = 2·3·83 (+46)
Σ(48) = 472 = 23·59 (-26)
Σ(49) = 508 = 22·127 (+36)
Σ(50) = 515 = 5·103 (+7)
Σ(51) = 547 (+32)
Σ(52) = 556 = 22·139 (+9)
Σ(53) = 608 = 25·19 (+52)
Σ(54) = 598 = 2·13·23 (-10)
Σ(55) = 638 = 2·11·29 (+40)
Σ(56) = 634 = 2·317 (-4)
Σ(57) = 670 = 2·5·67 (+36)
Σ(58) = 698 = 2·349 (+28)
Σ(59) = 756 = 22·33·7 (+58)
Σ(60) = 717 = 3·239 (-39)
Σ(61) = 777 = 3·7·37 (+60)
Σ(62) = 807 = 3·269 (+30)
Σ(63) = 831 = 3·277 (+24)
Σ(64) = 819 = 32·7·13 (-12)
Σ(65) = 867 = 3·172 (+48)
Σ(66) = 861 = 3·7·41 (-6)
Σ(67) = 927 = 32·103 (+66)
Σ(68) = 940 = 22·5·47 (+13)
Σ(69) = 984 = 23·3·41 (+44)
Σ(70) = 986 = 2·17·29 (+2)
Σ(71) = 1056 = 25·3·11 (+70)
Σ(72) = 1006 = 2·503 (-50)
Σ(73) = 1078 = 2·72·11 (+72)
Σ(74) = 1114 = 2·557 (+36)
Σ(75) = 1140 = 22·3·5·19 (+26)
Σ(76) = 1155 = 3·5·7·11 (+15)
Σ(77) = 1215 = 35·5 (+60)
Σ(78) = 1209 = 3·13·31 (-6)
Σ(79) = 1287 = 32·11·13 (+78)
Σ(80) = 1263 = 3·421 (-24)
Σ(81) = 1293 = 3·431 (+30)
Σ(82) = 1333 = 31·43 (+40)
Σ(83) = 1415 = 5·283 (+82)
Σ(84) = 1368 = 23·32·19 (-47)
Σ(85) = 1432 = 23·179 (+64)
Σ(86) = 1474 = 2·11·67 (+42)
Σ(87) = 1530 = 2·32·5·17 (+56)
Σ(88) = 1530 = 2·32·5·17 (=)
Σ(89) = 1618 = 2·809 (+88)
Σ(90) = 1572 = 22·3·131 (-46)
Σ(91) = 1644 = 22·3·137 (+72)
Σ(92) = 1663 (+19)
Σ(93) = 1723 (+60)
Σ(94) = 1769 = 29·61 (+46)
Σ(95) = 1841 = 7·263 (+72)
Σ(96) = 1784 = 23·223 (-57)
Σ(97) = 1880 = 23·5·47 (+96)
Σ(98) = 1903 = 11·173 (+23)
Σ(99) = 1947 = 3·11·59 (+44)
Σ(100) = 1923 = 3·641 (-24)

The sum usually increases, occasionally decreases. In one case, when 87 = n = 88, it stays the same. This also happens when 463 = n = 464, where Σ(463) = Σ(464) = 39,375. Does it happen again? I don’t know. The ratio of sum-ups to sum-downs seems to tend towards 3:1. Is that the exact ratio at infinity? I don’t know. Watch this sbase.

Back to Bases

(N.B. I am not a mathematician and often make stupid mistakes in my recreational maths. Caveat lector.)

101 isn’t a number, it’s a label for a number. In fact, it’s a label for infinitely many numbers. In base 2, 1012 = 5; in base 3, 1013 = 10; 1014 = 17; 1015 = 26; and so on, for ever. In some bases, like 2 and 4, the number labelled 101 is prime. In other bases, it isn’t. But it is always a palindrome: that is, it’s the same read forward and back. But 101, the number itself, is a palindrome in only two bases: base 10 and base 100.1 Note that 100 = 101-1: with the exception of 2, all integers, or whole numbers, are palindromic in at least one base, the base that is one less than the integer itself. So 3 = 112; 4 = 113; 5 = 114; 101 = 11100; and so on.

Less trivial is the question of which integers set progressive records for palindromicity, or for the number of palindromes they create in bases less than the integers themselves. You might guess that the bigger the integer, the more palindromes it will create, but it isn’t as simple as that. Here is 10 represented in bases 2 through 9:

10102 | 1013* | 224* | 205 | 146 | 137 | 128 | 119*

10 is a palindrome in bases 3, 4, and 9. Now here is 30 represented in bases 2 through 29 (note that a number between square brackets represents a single digit in that base):2

111102 | 10103 | 1324 | 1105 | 506 | 427 | 368 | 339* | 30 | 2811 | 2612 | 2413 | 2214* | 2015 | 1[14]16 | 1[13]17 | 1[12]18 | 1[11]19 | 1[10]20 | 1921 | 1822 | 1723 | 1624 | 1525 | 1426 | 1327 | 1228
| 1129*

30, despite being three times bigger than 10, creates only three palindromes too: in bases 9, 14, and 29. Here is a graph showing the number of palindromes for each number from 3 to 100 (prime numbers are in red):

Graph of palindromes in various bases for n=3 to 100

The number of palindromes a number has is related to the number of factors, or divisors, it has. A prime number has only one factor,  itself (and 1), so primes tend to be less palindromic than composite numbers. Even large primes can have only one palindrome, in the base b=n-1 (55,440 has 119 factors and 61 palindromes; 65,381 has one factor and one palindrome, 1165380). Here is a graph showing the number of factors for each number from 3 to 100:

Graph of number of factors for n = 3 to 100

And here is an animated gif combining the two previous images:

Animated gif of number of palindromes and factors, n=3 to 100

Here is a graph indicating where palindromes appear when n, along the x-axis, is represented in the bases b=2 to n-1, along the y-axis:

Graph showing where palindromes occur in various bases for n = 3 to 1000

The red line are the palindromes in base b=n-1, which is “11” for every n>2. The lines below it arise because every sufficiently large n with divisor d can be represented in the form d·n1 + d. For example, 8 = 2·3 + 2, so 8 in base 3 = 223; 18 = 3·5 + 3, so 18 = 335; 32 = 4.7 + 4, so 32 = 447; 391 = 17·22 + 17, so 391 = [17][17]22.

And here, finally, is a table showing integers that set progressive records for palindromicity (p = number of palindromes, f = total number of factors, prime and non-prime):

n Prime Factors p f    n Prime Factors p f
3 3 1 1    2,520 23·32·5·7 25 47
5 5 2 1    3,600 24·32·52 26 44
10 2·5 3 3    5,040 24·32·5·7 30 59
21 3·7 4 3    7,560 23·33·5·7 32 63
36 22·32 5 8    9,240 23·3·5·7·11 35 63
60 22·3·5 6 11    10,080 25·32·5·7 36 71
80 24·5 7 9    12,600 23·32·52·7 38 71
120 23·3·5 8 15    15,120 24·33·5·7 40 79
180 22·32·5 9 17    18,480 24·3·5·7·11 43 79
252 22·32·7 11 17    25,200 24·32·52·7 47 89
300 22·3·52 13 17    27,720 23·32·5·7·11 49 95
720 24·32·5 16 29    36,960 25·3·5·7·11 50 95
1,080 23·33·5 17 31    41,580 22·33·5·7·11 51 95
1,440 25·32·5 18 35    45,360 24·34·5·7 52 99
1,680 24·3·5·7 20 39    50,400 25·32·52·7 54 107
2,160 24·33·5 21 39    55,440 24·32·5·7·11 61 119

Notes

1. That is, it’s only a palindrome in two bases less than 101. In higher bases, “101” is a single digit, so is trivially a palindrome (as the numbers 1 through 9 are in base 10).

2. In base b, there are b digits, including 0. So base 2 has two digits, 0 and 1; base 10 has ten digits, 0-9; base 16 has sixteen digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.