“In many cases, mathematics is an escape from reality. The mathematician finds his own monastic niche and happiness in pursuits that are disconnected from external affairs. Some practice it as if using a drug. Chess sometimes plays a similar role. In their unhappiness over the events of this world, some immerse themselves in a kind of self-sufficiency in mathematics. (Some have engaged in it for this reason alone.)” — Stanislaw Ulam (1909-84)

# Tag Archives: escape from reality

# Möbius Tripping

# Amateur ’Grammatics

There is much more to mathematics than mathematics. Like a tree, it has deep roots. Like a tree, it’s affected by its environment. Philosophy of mathematics is concerned with the roots. Psychology of mathematics is concerned with the environment.

On Planet Earth, the environment is human beings. What attracts men and women to the subject? What makes them good or bad at it?And so on. One interesting answer to the first question was supplied by the mathematician Stanislaw Ulam (1909-84), who wrote this in his autobiography:

“In many cases, mathematics is an escape from reality. The mathematician finds his own monastic niche and happiness in pursuits that are disconnected from external affairs. Some practice it as if using a drug.” – Adventures of a Mathematician (1983)

That’s certainly part of maths’ appeal to me: as an escape from reality, or an escape from one reality into another (and deeper). Real life is messy. Maths isn’t, unless you want it to be. But you can find parallels between maths and real life too. In real life, people collect things that they find attractive or interesting: stamps, sea-shells, gems, cigarette-cards, beer-cans and so on. You can collect things in maths too: interesting numbers and number patterns. Recreational maths can feel like looking on a beach for attractive shells and pebbles.

Here’s a good example: digital anagrams, or numbers in different bases whose digits are the same but re-arranged. For example, 13 in base 10 equals 31 in base 4, because 13 = 3 * 4 + 1. To people with the right kind of mind, that’s an interesting and attractive pattern. There are lots more anagrams like that:

1045 = 4501 in base 6

1135 = 5131 in base 6

23 = 32 in base 7

46 = 64 in base 7

1273 = 2371 in base 8

1653 = 3165 in base 8

158 = 185 in base 9

227 = 272 in base 9

196 = 169 in base 11

283 = 238 in base 11

2193 = 1329 in base 12

6053 = 3605 in base 12

43 = 34 in base 13

86 = 68 in base 13

But triple anagrams, involving three bases, seem even more attractive:

913 = 391 in base 16 = 193 in base 26

103462 = 610432 in base 7 = 312046 in base 8

245183 = 413285 in base 9 = 158234 in base 11

And that’s just looking in base 10. If you include all bases, the first double anagram is in fact 21 in base 3 = 12 in base 5 (equals 7 in base 10). The first triple anagram is this:

2C1 in base 13 = 1C2 in base 17 = 12C in base 21 (equals 495 in base 10)

But are there quadruple anagrams, quintuple anagrams and higher? I don’t know. I haven’t found any and it gets harder and harder to search for them, because the bigger *n* gets, the more bases there are to check. However, I can say one thing for certain: in any given base, anagrams eventually disappear.

To understand why, consider the obvious fact that anagrams have to have the same number of digits in different bases. But the number of digits is a function of the powers of the base. That is, the triple anagram 103462 (see above) has six digits in bases 7, 8 and 10 because 7^5 < 103462 < 7^6, 8^5 < 103462 < 8^6 and 10^5 < 103462 < 10^6. Similarly, the triple anagram 245183 (ditto) has six digits in bases 9, 10 and 11 because 9^5 < 245183 < 9^6, 10^5 < 245183 < 10^6 and 11^5 < 245183 < 11^6:

7^5 < 103462 < 7^6

16807 < 103462 < 117649

8^5 < 103462 < 8^6

32768 < 103462 < 262144

10^5 < 103462 < 10^6

100000 < 103462 < 1000000

9^5 < 245183 < 9^6

59049 < 245183 < 531441

10^5 < 245183 < 10^6

100000 < 245183 < 1000000

11^5 < 245183 < 11^6

161051 < 245183 < 1771561

In other words, for some *n* the number-lengths of bases 7 and 8 overlap the number-lengths of base 10, which overlap the number-lengths of bases 9 and 11. But eventually, as *n* gets larger, the number-lengths of base 10 will fall permanently below the number-lengths of bases 7, 8 and 9, just as the number-lengths of base 11 will fall permanently below the number-lengths of base 10.

To see this in action, consider the simplest example: number-lengths in bases 2 and 3. There is no anagram involving these two bases, because only two numbers have the same number of digits in both: 1 and 3 = 11 in base 2 = 10 in base 3. After that, *n* in base 2 always has more digits than *n* in base 3:

2^0 = 1 in base 2 (number-length=1) = 1 in base 3 (l=1)

2^1 = 2 = 10 in base 2 (number-length=2) = 2 in base 3 (l=1)

2^2 = 4 = 100 in base 2 (l=3) = 11 in base 3 (l=2)

2^3 = 8 = 1000 in base 2 = 22 in base 3 (l=2)

2^4 = 16 = 10000 in base 2 = 121 in base 3 (l=3)

2^5 = 32 = 1012 in base 3 (l=4)

2^6 = 64 = 2101 in base 3 (l=4)

2^7 = 128 = 11202 in base 3 (l=5)

2^8 = 256 = 100111 in base 3 (l=6)

2^9 = 512 = 200222 in base 3 (l=6)

2^10 = 1024 = 1101221 in base 3 (l=7)

Now consider bases 3 and 4. Here is an anagram using these bases: 211 in base 3 = 112 in base 4 = 22. There are no more anagrams and eventually there’s no more chance for them to occur, because this happens as *n* gets larger:

3^0 = 1 in base 3 (number-length=1) = 1 in base 4 (l=1)

3^1 = 3 = 10 in base 3 (number-length=2) = 3 in base 4 (l=1)

3^2 = 9 = 100 in base 3 (l=3) = 21 in base 4 (l=2)

3^3 = 27 = 1000 in base 3 (l=4) = 123 in base 4 (l=3)

3^4 = 81 = 10000 in base 3 (l=5) = 1101 in base 4 (l=4)

3^5 = 243 = 100000 in base 3 (l=6) = 3303 in base 4 (l=4)

3^6 = 729 = 23121 in base 4 (l=5)

3^7 = 2187 = 202023 in base 4 (l=6)

3^8 = 6561 = 1212201 in base 4 (l=7)

3^9 = 19683 = 10303203 in base 4 (l=8)

3^10 = 59049 = 32122221 in base 4 (l=8)

3^11 = 177147 = 223033323 in base 4 (l=9)

3^12 = 531441 = 2001233301 in base 4 (l=10)

3^13 = 1594323 = 12011033103 in base 4 (l=11)

3^14 = 4782969 = 102033231321 in base 4 (l=12)

3^15 = 14348907 = 312233021223 in base 4 (l=12)

3^16 = 43046721 = 2210031131001 in base 4 (l=13)

3^17 = 129140163 = 13230220113003 in base 4 (l=14)

3^18 = 387420489 = 113011321011021 in base 4 (l=15)

3^19 = 1162261467 = 1011101223033123 in base 4 (l=16)

3^20 = 3486784401 = 3033311001232101 in base 4 (l=16)

When *n* is sufficiently large, it always has fewer digits in base 4 than in base 3. And the gap gets steadily bigger. When *n* doesn’t have the same number of digits in two bases, it can’t be an anagram. A similar number-length gap eventually appears in bases 4 and 5, but the anagrams don’t run out as quickly there:

103 in base 5 = 130 in base 4 = 28

1022 in base 5 = 2021 in base 4 = 137

1320 in base 5 = 3102 in base 4 = 210

10232 in base 5 = 22310 in base 4 = 692

10332 in base 5 = 23031 in base 4 = 717

12213 in base 5 = 32211 in base 4 = 933

100023 in base 5 = 301002 in base 4 = 3138

100323 in base 5 = 302031 in base 4 = 3213

102131 in base 5 = 311120 in base 4 = 3416

102332 in base 5 = 312023 in base 4 = 3467

103123 in base 5 = 313102 in base 4 = 3538

1003233 in base 5 = 3323010 in base 4 = 16068

Base 10 isn’t exempt. Eventually it must outshrink base 9 and be outshrunk by base 11, so what is the highest 9:10 anagram and highest 10:11 anagram? I don’t know: my maths isn’t good enough for me to find out quickly. But using machine code, I’ve found these large anagrams:

205888888872731 = 888883178875022 in base 9

1853020028888858 = 8888888525001032 in base 9

16677181388880888 = 88888888170173166 in base 9

999962734025 = 356099992472 in base 11

9999820360965 = 3205999998606 in base 11

99999993520348 = 29954839390999 in base 11

Note how the digits of *n* in the lower base are increasing as the digits of *n* in the higher base are decreasing. Eventually, *n* in the lower base will always have more digits than *n* in the higher base. When that happens, there will be no more anagrams.

**Some triple anagrams**

2C1 in base 13 = 1C2 in base 17 = 12C in base 21 (n=495 = 3^2*5*11)

912 in base 10 = 219 in base 21 = 192 in base 26 (2^4*3*19)

913 in base 10 = 391 in base 16 = 193 in base 26 (11*83)

4B2 in base 15 = 42B in base 16 = 24B in base 22 (n=1067 = 11*97)

5C1 in base 17 = 51C in base 18 = 1C5 in base 35 (n=1650 = 2*3*5^2*11)

3L2 in base 26 = 2L3 in base 31 = 23L in base 35 (n=2576 = 2^4*7*23)

3E1 in base 31 = 1E3 in base 51 = 13E in base 56 (n=3318 = 2*3*7*79)

531 in base 29 = 351 in base 37 = 135 in base 64 (n=4293 = 3^4*53)

D53 in base 18 = 53D in base 29 = 35D in base 37 (n=4305 = 3*5*7*41)

53I in base 29 = 3I5 in base 35 = 35I in base 37 (n=4310 = 2*5*431)

825 in base 25 = 582 in base 31 = 258 in base 49 (n=5055 = 3*5*337)

6S2 in base 31 = 2S6 in base 51 = 26S in base 56 (n=6636 = 2^2*3*7*79)

D35 in base 23 = 5D3 in base 36 = 3D5 in base 46 (n=6951 = 3*7*331)

3K1 in base 49 = 31K in base 52 = 1K3 in base 81 (n=8184 = 2^3*3*11*31)

A62 in base 29 = 6A2 in base 37 = 26A in base 64 (n=8586 = 2*3^4*53)

9L2 in base 30 = 92L in base 31 = 2L9 in base 61 (n=8732 = 2^2*37*59)

3W1 in base 49 = 1W3 in base 79 = 13W in base 92 (n=8772 = 2^2*3*17*43)

G4A in base 25 = AG4 in base 31 = 4AG in base 49 (n=10110 = 2*3*5*337)

J10 in base 25 = 1J0 in base 100 = 10J in base 109 (n=11900 = 2^2*5^2*7*17)

5[41]1 in base 46 = 1[41]5 in base 93 = 15[41] in base 109 (n=12467 = 7*13*137)

F91 in base 29 = 9F1 in base 37 = 19F in base 109 (n=12877 = 79*163)

F93 in base 29 = 9F3 in base 37 = 39F in base 64 (n=12879 = 3^5*53)

AP4 in base 35 = A4P in base 36 = 4AP in base 56 (n=13129 = 19*691)

BP2 in base 36 = B2P in base 37 = 2PB in base 81 (n=15158 = 2*11*13*53)

O6F in base 25 = FO6 in base 31 = 6FO in base 49 (n=15165 = 3^2*5*337)

FQ1 in base 31 = 1QF in base 111 = 1FQ in base 116 (n=15222 = 2*3*43*59)

B74 in base 37 = 7B4 in base 46 = 47B in base 61 (n=15322 = 2*47*163)