Strange “S” in the Light

Unexpected discoveries are one of the joys of mathematics, even for amateurs. And computers help you make more of them, because computers make it easy to adjust variables or search faster and further through math-space than any unaided human ever could (on the downside, computers can make you lazy and blunt your intuition). Here’s an unexpected discovery I made using a computer in November 2020:

A distorted and dissected capital “S”


It’s a strange “S” that looks complex but is constructed very easily from three simple lines. And it’s a fractal, a shape that contains copies of itself at smaller and smaller scales:

Five sub-fractals of the Strange “S”


Elsewhere Other-Accessible…

Fractangular Frolics — the Strange “S” in more light

We Can Circ It Out

It’s a pretty little problem to convert this triangular fractal…

Sierpiński triangle (Wikipedia)


…into its circular equivalent:

Sierpiński triangle as circle


Sierpiński triangle to circle (animated)


But once you’ve circ’d it out, as it were, you can easily adapt the technique to fractals based on other polygons:

T-square fractal (Wikipedia)

T-square fractal as circle


T-square fractal to circle (animated)


Elsewhere other-accessible…

Dilating the Delta — more on converting polygonic fractals to circles…

The Devil’s Digits

As I’ve said before, I love the way that numbers can come in many different guises. For example, take the number 21. It comes in all these guises:

21 = 10101 in base 2 = 210 in base 3 = 111 in b4 = 41 in b5 = 33 in b6 = 30 in b7 = 25 in b8 = 23 in b9 = 21 in b10 = 1A in b11 = 19 in b12 = 18 in b13 = 17 in b14 = 16 in b15 = 15 in b16 = 14 in b17 = 13 in b18 = 12 in b19 = 11 in b20 = 10 in b21

But I’ve not chosen 21 at random. If you sum the 1s in the representations of 21 in bases 2 to 21, look what you get:

21 = 10101 in base 2 = 210 in base 3 = 111 in b4 = 41 in b5 = 33 in b6 = 30 in b7 = 25 in b8 = 23 in b9 = 21 in b10 = 1A in b11 = 19 in b12 = 18 in b13 = 17 in b14 = 16 in b15 = 15 in b16 = 14 in b17 = 13 in b18 = 12 in b19 = 11 in b20 = 10 in b21


21 = 1s=101s=201s=3 in base 2 = 21s=40 in base 3 = 111s=7 in b4 = 41s=8 in b5 = 33 in b6 = 30 in b7 = 25 in b8 = 23 in b9 = 21s=9 in b10 = 1s=10A in b11 = 1s=119 in b12 = 1s=128 in b13 = 1s=137 in b14 = 1s=146 in b15 = 1s=155 in b16 = 1s=164 in b17 = 1s=173 in b18 = 1s=182 in b19 = 11s=20 in b20 = 1s=210 in b21


In other words, 21 = digcount(21,dig=1,base=2..21). But n = digcount(n,dig,b=2..n) doesn’t happen for any other digit and doesn’t happen often with 1:

3 = digcount(3,d=1,b=2..3) = 11 in b2 = 10 in b3
4 = digcount(4,d=1,b=2..4) = 100 in b2 = 11 in b3 = 10 in b4
6 = digcount(6,d=1,b=2..6) = 110 in b2 = 20 in b3 = 12 in b4 = 11 in b5 = 10 in b6
10 = digcount(10,d=1) = 1010 in b2 = 101 in b3 = 22 in b4 = 20 in b5 = 14 in b6 = 13 in b7 = 12 in b8 = 11 in b9 = 10 in b10
15 = digcount(15,d=1) = 1111 in b2 = 120 in b3 = 33 in b4 = 30 in b5 = 23 in b6 = 21 in b7 = 17 in b8 = 16 in b9 = 15 in b10 = 14 in b11 = 13 in b12 = 12 in b13 = 11 in b14 = 10 in b15
21 = digcount(21,d=1) = 10101 in b2 = 210 in b3 = 111 in b4 = 41 in b5 = 33 in b6 = 30 in b7 = 25 in b8 = 23 in b9 = 21 in b10 = 1A in b11 = 19 in b12 = 18 in b13 = 17 in b14 = 16 in b15 = 15 in b16 = 14 in b17 = 13 in b18 = 12 in b19 = 11 in b20 = 10 in b21


After that, the digcount(n,d=1,b=2..n) → n/2 (see “Digital Dissection” for further discussion). But I decided to look for the first n where digcount(n,dig,b=2..n) = 666:

digcount(1270,1) = 666
digcount(3770,2) = 666
digcount(7667,3) = 666
digcount(12184,4) = 666
digcount(18845,5) = 666
digcount(25806,6) = 666
digcount(34195,7) = 666
digcount(43352,8) = 666
digcount(54693,9) = 666


It doesn’t stop there, of course. You can carry on for ever, looking for digcount(n,A) = 666, digcount(n,B) = 666, digcount(n,C) = 666, where A = 10, B = 11 and C=12, and so on. But it doesn’t start there, either. What about digcount(n,0) = 666? That isn’t easy to find, because 0 usually occurs far less often than other digits in the representation of n. Here are the integers setting records for digcount(n,0,b=2..n):

2 → digcount(2,0) = 1 ← 2= 10 in base 2
4 → digcount(4,0) = 3; ← 4 = 100 in base 2, 11 in base 3, 10 in base 4
8 → digcount(8,0) = 5 ← 8 = 1000 in base 2, 22 in base 3, 20 in base 4, 13 in base 5, 12 in base 6, 11 in base 7, 10 in base 8
12 → digcount(12,0) = 6
16 → digcount(16,0) = 8
18 → digcount(18,0) = 9
32 → digcount(32,0) = 11
36 → digcount(36,0) = 13
64 → digcount(64,0) = 15
72 → digcount(72,0) = 18
128 → digcount(128,0) = 20
144 → digcount(144,0) = 24
252 → digcount(252,0) = 25
264 → digcount(264,0) = 27
288 → digcount(288,0) = 29
360 → digcount(360,0) = 30
504 → digcount(504,0) = 33
540 → digcount(540,0) = 36
720 → digcount(720,0) = 40
900 → digcount(900,0) = 42
1080 → digcount(1080,0) = 47
1680 → digcount(1680,0) = 48
1800 → digcount(1800,0) = 53
2160 → digcount(2160,0) = 56
2520 → digcount(2520,0) = 61
3600 → digcount(3600,0) = 64
4320 → digcount(4320,0) = 66


So what is the first n for which digcount(n,0) = 666? Watch this space.

Reciprocal Recipes

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

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...

Here’s another sequence. What’s the next number?

0, 1, 1, 2, 3, 5, 8, 13, 21, 34...

Those aren’t trick questions, so the answers are 1 and 55, respectively. The second sequence is the famous Fibonacci sequence, where each number after [0,1] is the sum of the previous two numbers.

Now try dividing each of those sequences by powers of 2 and summing the results, like this:

1/2 + 1/4 + 1/8 + 1/16 + 1/32 + 1/64 + 1/128 + 1/256 + 1/512 + 1/1024 + 1/2048 + 1/4096 + 1/8192 + 1/16384 + 1/32768 + 1/65536 + 1/131072 + 1/262144 + 1/524288 + 1/1048576 +... = ?

0/2 + 1/4 + 1/8 + 2/16 + 3/32 + 5/64 + 8/128 + 13/256 + 21/512 + 34/1024 + 55/2048 + 89/4096 + 144/8192 + 233/16384 + 377/32768 + 610/65536 + 987/131072 + 1597/262144 + 2584/524288 + 4181/1048576 +... = ?

What are the sums? I was surprised to learn that they’re identical:

1/2 + 1/4 + 1/8 + 1/16 + 1/32 + 1/64 + 1/128 + 1/256 + 1/512 + 1/1024 + 1/2048 + 1/4096 + 1/8192 + 1/16384 + 1/32768 + 1/65536 + 1/131072 + 1/262144 + 1/524288 + 1/1048576 +... = 1

0/2 + 1/4 + 1/8 + 2/16 + 3/32 + 5/64 + 8/128 + 13/256 + 21/512 + 34/1024 + 55/2048 + 89/4096 + 144/8192 + 233/16384 + 377/32768 + 610/65536 + 987/131072 + 1597/262144 + 2584/524288 + 4181/1048576 +... = 1

I discovered this when I was playing with an old scientific calculator and calculated these sums:

5^2 + 2^2 = 29
5^2 + 4^2 = 41
5^2 + 6^2 = 61
5^2 + 8^2 = 89

The sums are all prime numbers. Then I idly calculated the reciprocal of 1/89:

1/89 = 0·011235955056179775...

The digits 011235… are the start of the Fibonacci sequence. It seems to go awry after that, but I remembered what David Wells had said in his wonderful Penguin Dictionary of Curious and Interesting Numbers (1986): “89 is the 11th Fibonacci number, and the period of its reciprocal is generated by the Fibonacci sequence: 1/89 = 0·11235…” He means that the Fibonacci sequence generates the digits of 1/89 like this, when you sum the columns and move carries left as necessary:

0
1
↓↓1
↓↓↓2
↓↓↓↓3
↓↓↓↓↓5
↓↓↓↓↓↓8
↓↓↓↓↓↓13
↓↓↓↓↓↓↓21
↓↓↓↓↓↓↓↓34
↓↓↓↓↓↓↓↓↓55
↓↓↓↓↓↓↓↓↓↓89...
↓↓↓↓↓↓↓↓↓↓
0112359550...

I tried this method of summing the Fibonacci sequence in other bases. Although it was old, the scientific calculator was crudely programmable. And it helpfully converted the sum into a final fraction once there were enough decimal digits:

0/3 + 1/32 + 1/33 + 2/34 + 3/35 + 5/36 + 8/37 + 13/38 + 21/39 + 34/310 + 55/311 + 89/312 + 144/313 + 233/314 + 377/315 + 610/316 + 987/317 + 1597/318 + 2584/319 + 4181/320 +... = 1/5 = 0·012101210121012101210 in b3


0/4 + 1/42 + 1/43 + 2/44 + 3/45 + 5/46 + 8/47 + 13/48 + 21/49 + 34/410 + 55/411 + 89/412 + 144/413 + 233/414 + 377/415 + 610/416 + 987/417 + 1597/418 + 2584/419 + 4181/420 +... = 1/11 = 0·011310113101131011310 in b4


0/5 + 1/52 + 1/53 + 2/54 + 3/55 + 5/56 + 8/57 + 13/58 + 21/59 + 34/510 + 55/511 + 89/512 + 144/513 + 233/514 + 377/515 + 610/516 + 987/517 + 1597/518 + 2584/519 + 4181/520 +... = 1/19 = 0·011242141011242141011 in b5


0/6 + 1/62 + 1/63 + 2/64 + 3/65 + 5/66 + 8/67 + 13/68 + 21/69 + 34/610 + 55/611 + 89/612 + 144/613 + 233/614 + 377/615 + 610/616 + 987/617 + 1597/618 + 2584/619 + 4181/620 +... = 1/29 = 0·011240454431510112404 in b6


0/7 + 1/72 + 1/73 + 2/74 + 3/75 + 5/76 + 8/77 + 13/78 + 21/79 + 34/710 + 55/711 + 89/712 + 144/713 + 233/714 + 377/715 + 610/716 + 987/717 + 1597/718 + 2584/719 + 4181/720 +... = 1/41 = 0·011236326213520225056 in b7

It was interesting to see that all the reciprocals so far were of primes. I carried on:

0/8 + 1/82 + 1/83 + 2/84 + 3/85 + 5/86 + 8/87 + 13/88 + 21/89 + 34/810 + 55/811 + 89/812 + 144/813 + 233/814 + 377/815 + 610/816 + 987/817 + 1597/818 + 2584/819 + 4181/820 +... = 1/55 = 0·011236202247440451710 in b8

Not a prime reciprocal, but a reciprocal of a Fibonacci number. Here are some more sums:

0/9 + 1/92 + 1/93 + 2/94 + 3/95 + 5/96 + 8/97 + 13/98 + 21/99 + 34/910 + 55/911 + 89/912 + 144/913 + 233/914 + 377/915 + 610/916 + 987/917 + 1597/918 + 2584/919 + 4181/920 +... = 1/71 (another prime) = 0·011236067540450563033 in b9


0/10 + 1/102 + 1/103 + 2/104 + 3/105 + 5/106 + 8/107 + 13/108 + 21/109 + 34/1010 + 55/1011 + 89/1012 + 144/1013 + 233/1014 + 377/1015 + 610/1016 + 987/1017 + 1597/1018 + 2584/1019 + 4181/1020 +... = 1/89 (and another) = 0·011235955056179775280 in b10


0/11 + 1/112 + 1/113 + 2/114 + 3/115 + 5/116 + 8/117 + 13/118 + 21/119 + 34/1110 + 55/1111 + 89/1112 + 144/1113 + 233/1114 + 377/1115 + 610/1116 + 987/1117 + 1597/1118 + 2584/1119 + 4181/1120 +... = 1/109 (and another) = 0·011235942695392022470 in b11


0/12 + 1/122 + 1/123 + 2/124 + 3/125 + 5/126 + 8/127 + 13/128 + 21/129 + 34/1210 + 55/1211 + 89/1212 + 144/1213 + 233/1214 + 377/1215 + 610/1216 + 987/1217 + 1597/1218 + 2584/1219 + 4181/1220 +... = 1/131 (and another) = 0·011235930336A53909A87 in b12


0/13 + 1/132 + 1/133 + 2/134 + 3/135 + 5/136 + 8/137 + 13/138 + 21/139 + 34/1310 + 55/1311 + 89/1312 + 144/1313 + 233/1314 + 377/1315 + 610/1316 + 987/1317 + 1597/1318 + 2584/1319 + 4181/1320 +... = 1/155 (not a prime or a Fibonacci number) = 0·01123591ACAA861794044 in b13

The reciprocals go like this:

1/1, 1/5, 1/11, 1/19, 1/29, 1/41, 1/55, 1/71, 1/89, 1/109, 1/131, 1/155...

And it should be easy to see the rule that generates them:

5 = 1 + 4
11 = 5 + 6
19 = 11 + 8
29 = 19 + 10
41 = 29 + 12
55 = 41 + 14
71 = 55 + 16
89 = 17 + 18
109 = 89 + 20
131 = 109 + 22
155 = 131 + 24
[...]

But I don’t understand why the rule applies, let alone why the Fibonacci sequence generates these reciprocals in the first place.

Game of Throwns

In “Scaffscapes”, I looked at these three fractals and described how they were in a sense the same fractal, even though they looked very different:

Fractal #1


Fractal #2


Fractal #3


But even if they are all the same in some mathematical sense, their different appearances matter in an aesthetic sense. Fractal #1 is unattractive and seems uninteresting:

Fractal #1, unattractive, uninteresting and unnamed


Fractal #3 is attractive and interesting. That’s part of why mathematicians have given it a name, the T-square fractal:

Fractal #3 — the T-square fractal


But fractal #2, although it’s attractive and interesting, doesn’t have a name. It reminds me of a ninja throwing-star or shuriken, so I’ve decided to call it the throwing-star fractal or ninja-star fractal:

Fractal #2, the throwing-star fractal


A ninja throwing-star or shuriken


This is one way to construct a throwing-star fractal:

Throwing-star fractal, stage 1


Throwing-star fractal, #2


Throwing-star fractal, #3


Throwing-star fractal, #4


Throwing-star fractal, #5


Throwing-star fractal, #6


Throwing-star fractal, #7


Throwing-star fractal, #8


Throwing-star fractal, #9


Throwing-star fractal, #10


Throwing-star fractal, #11


Throwing-star fractal (animated)


But there’s another way to construct a throwing-star fractal. You use what’s called the chaos game. To understand the commonest form of the chaos game, imagine a ninja inside an equilateral triangle throwing a shuriken again and again halfway towards a randomly chosen vertex of the triangle. If you mark each point where the shuriken lands, you eventually get a fractal called the Sierpiński triangle:

Chaos game with triangle stage 1


Chaos triangle #2


Chaos triangle #3


Chaos triangle #4


Chaos triangle #5


Chaos triangle #6


Chaos triangle #7


Chaos triangle (animated)


When you try the chaos game with a square, with the ninja throwing the shuriken again and again halfway towards a randomly chosen vertex, you don’t get a fractal. The interior of the square just fills more or less evenly with points:

Chaos game with square, stage 1


Chaos square #2


Chaos square #3


Chaos square #4


Chaos square #5


Chaos square #6


Chaos square (anim)


But suppose you restrict the ninja’s throws in some way. If he can’t throw twice or more in a row towards the same vertex, you get a familiar fractal:

Chaos game with square, ban on throwing towards same vertex, stage 1


Chaos square, ban = v+0, #2


Chaos square, ban = v+0, #3


Chaos square, ban = v+0, #4


Chaos square, ban = v+0, #5


Chaos square, ban = v+0, #6


Chaos square, ban = v+0 (anim)


But what if the ninja can’t throw the shuriken towards the vertex one place anti-clockwise of the vertex he’s just thrown it towards? Then you get another familiar fractal — the throwing-star fractal:

Chaos square, ban = v+1, stage 1


Chaos square, ban = v+1, #2


Chaos square, ban = v+1, #3


Chaos square, ban = v+1, #4


Chaos square, ban = v+1, #5


Game of Throwns — throwing-star fractal from chaos game (static)


Game of Throwns — throwing-star fractal from chaos game (anim)


And what if the ninja can’t throw towards the vertex two places anti-clockwise (or two places clockwise) of the vertex he’s just thrown the shuriken towards? Then you get a third familiar fractal — the T-square fractal:

Chaos square, ban = v+2, stage 1


Chaos square, ban = v+2, #2


Chaos square, ban = v+2, #3


Chaos square, ban = v+2, #4


Chaos square, ban = v+2, #5


T-square fractal from chaos game (static)


T-square fractal from chaos game (anim)


Finally, what if the ninja can’t throw towards the vertex three places anti-clockwise, or one place clockwise, of the vertex he’s just thrown the shuriken towards? If you can guess what happens, your mathematical intuition is much better than mine.


Post-Performative Post-Scriptum

I am not now and never have been a fan of George R.R. Martin. He may be a good author but I’ve always suspected otherwise, so I’ve never read any of his books or seen any of the TV adaptations.

Scaffscapes

A fractal is a shape that contains copies of itself on smaller and smaller scales. You can find fractals everywhere in nature. Part of a fern looks like the fern as a whole:

Fern as fractal (source)


Part of a tree looks like the tree as a whole:

Tree as fractal (source)


Part of a landscape looks like the landscape as a whole:

Landscape as fractal (source)


You can also create fractals for yourself. Here are three that I’ve constructed:

Fractal #1


Fractal #2


Fractal #3 — the T-square fractal


The three fractals look very different and, in one sense, that’s exactly what they are. But in another sense, they’re the same fractal. Each can morph into the other two:

Fractal #1 → fractal #2 → fractal #3 (animated)


Here are two more fractals taken en route from fractal #2 to fractal #3, as it were:

Fractal #4


Fractal #5


To understand how the fractals belong together, you have to see what might be called the scaffolding. The construction of fractal #3 is the easiest to understand. First you put up the scaffolding, then you take it away and leave the final fractal:

Fractal #3, scaffolding stage 1


Fractal #3, stage 2


Fractal #3, stage 3


Fractal #3, stage 4


Fractal #3, stage 5


Fractal #3, stage 6


Fractal #3, stage 7


Fractal #3, stage 8


Fractal #3, stage 9


Fractal #3, stage 10


Fractal #3 (scaffolding removed)


Construction of fractal #3 (animated)


Now here’s the construction of fractal #1:

Fractal #1, stage 1


Fractal #1, stage 2


Fractal #1, stage 3

Construction of fractal #1 (animated)


Fractal #1 (static)


And the constructions of fractals #2, #4 and #5:

Fractal #2, stage 1


Fractal #2, stage 2


Fractal #2, stage 3

Fractal #2 (animated)


Fractal #2 (static)


Fractal #4, stage 1


Fractal #4, stage 2


Fractal #4, stage 3

Fractal #4 (animated)


Fractal #4 (static)


Fractal #5, stage 1


Fractal #5, stage 2


Fractal #5, stage 3

Fractal #5 (animated)


Fractal #5


Root Pursuit

Roots are hard, powers are easy. For example, the square root of 2, or √2, is the mysterious and never-ending number that is equal to 2 when multiplied by itself:

• √2 = 1·414213562373095048801688724209698078569671875376948073...

It’s hard to calculate √2. But the powers of 2, or 2^p, are the straightforward numbers that you get by multiplying 2 repeatedly by itself. It’s easy to calculate 2^p:

• 2 = 2^1
• 4 = 2^2
• 8 = 2^3
• 16 = 2^4
• 32 = 2^5
• 64 = 2^6
• 128 = 2^7
• 256 = 2^8
• 512 = 2^9
• 1024 = 2^10
• 2048 = 2^11
• 4096 = 2^12
• 8192 = 2^13
• 16384 = 2^14
• 32768 = 2^15
• 65536 = 2^16
• 131072 = 2^17
• 262144 = 2^18
• 524288 = 2^19
• 1048576 = 2^20
[...]

But there is a way to find √2 by finding 2^p, as I discovered after I asked a simple question about 2^p and 3^p. What are the longest runs of matching digits at the beginning of each power?

131072 = 2^17
129140163 = 3^17
1255420347077336152767157884641... = 2^193
1214512980685298442335534165687... = 3^193
2175541218577478036232553294038... = 2^619
2177993962169082260270654106078... = 3^619
7524389324549354450012295667238... = 2^2016
7524012611682575322123383229826... = 3^2016

There’s no obvious pattern. Then I asked the same question about 2^p and 5^p. And an interesting pattern appeared:

32 = 2^5
3125 = 5^5
316912650057057350374175801344 = 2^98
3155443620884047221646914261131... = 5^98
3162535207926728411757739792483... = 2^1068
3162020133383977882730040274356... = 5^1068
3162266908803418110961625404267... = 2^127185
3162288411569894029343799063611... = 5^127185

The digits 31622 rang a bell. Isn’t that the start of √10? Yes, it is:

• √10 = 3·1622776601683793319988935444327185337195551393252168268575...

I wrote a fast machine-code program to find even longer runs of matching initial digits. Sure enough, the pattern continued:

• 316227... = 2^2728361
• 316227... = 5^2728361
• 3162277... = 2^15917834
• 3162277... = 5^15917834
• 31622776... = 2^73482154
• 31622776... = 5^73482154
• 3162277660... = 2^961700165
• 3162277660... = 5^961700165

But why are powers of 2 and 5 generating the digits of √10? If you’re good at math, that’s a trivial question about a trivial discovery. Here’s the answer: We use base ten and 10 = 2 * 5, 10^2 = 100 = 2^2 * 5^2 = 4 * 25, 10^3 = 1000 = 2^3 * 5^3 = 8 * 125, and so on. When the initial digits of 2^p and 5^p match, those matching digits must come from the digits of √10. Otherwise the product of 2^p * 5^p would be too large or too small. Here are the records for matching initial digits multiplied by themselves:

32 = 2^5
3125 = 5^5
• 3^2 = 9

316912650057057350374175801344 = 2^98
3155443620884047221646914261131... = 5^98
• 31^2 = 961

3162535207926728411757739792483... = 2^1068
3162020133383977882730040274356... = 5^1068
• 3162^2 = 9998244

3162266908803418110961625404267... = 2^127185
3162288411569894029343799063611... = 5^127185
• 31622^2 = 999950884

• 316227... = 2^2728361
• 316227... = 5^2728361
• 316227^2 = 99999515529

• 3162277... = 2^15917834
• 3162277... = 5^15917834
• 3162277^2 = 9999995824729

• 31622776... = 2^73482154
• 31622776... = 5^73482154
• 31622776^2 = 999999961946176

• 3162277660... = 2^961700165
• 3162277660... = 5^961700165
• 3162277660^2 = 9999999998935075600

The square of each matching run falls short of 10^p. And so when the digits of 2^p and 5^p stop matching, one power must fall below √10, as it were, and one must rise above:

3 162266908803418110961625404267... = 2^127185
3·162277660168379331998893544432... = √10
3 162288411569894029343799063611... = 5^127185

In this way, 2^p * 5^p = 10^p. And that’s why matching initial digits of 2^p and 5^p generate the digits of √10. The same thing, mutatis mutandis, happens in base 6 with 2^p and 3^p, because 6 = 2 * 3:

• 2.24103122055214532500432040411... = √6 (in base 6)

24 = 2^4
213 = 3^4
225522024 = 2^34 in base 6 = 2^22 in base 10
22225525003213 = 3^34 (3^22)
2241525132535231233233555114533... = 2^1303 (2^327)
2240133444421105112410441102423... = 3^1303 (3^327)
2241055222343212030022044325420... = 2^153251 (2^15007)
2241003215453455515322105001310... = 3^153251 (3^15007)
2241032233315203525544525150530... = 2^233204 (2^20164)
2241030204225410320250422435321... = 3^233204 (3^20164)
2241031334114245140003252435303... = 2^2110415 (2^102539)
2241031103430053425141014505442... = 3^2110415 (3^102539)

And in base 30, where 30 = 2 * 3 * 5, you can find the digits of √30 in three different ways, because 30 = 2 * 15 = 3 * 10 = 5 * 6:

• 5·E9F2LE6BBPBF0F52B7385PE6E5CLN... = √30 (in base 30)

55AA4 = 2^M in base 30 = 2^22 in base 10
5NO6CQN69C3Q0E1Q7F = F^M = 15^22
5E63NMOAO4JPQD6996F3HPLIMLIRL6F... = 2^K6 (2^606)
5ECQDMIOCIAIR0DGJ4O4H8EN10AQ2GR... = F^K6 (15^606)
5E9DTE7BO41HIQDDO0NB1MFNEE4QJRF... = 2^B14 (2^9934)
5E9G5SL7KBNKFLKSG89J9J9NT17KHHO... = F^B14 (15^9934)
[...]
5R4C9 = 3^E in base 30 = 3^14 in base 10
52CE6A3L3A = A^E = 10^14
5E6SOQE5II5A8IRCH9HFBGO7835KL8A = 3^3N (3^113)
5EC1BLQHNJLTGD00SLBEDQ73AH465E3... = A^3N (10^113)
5E9FI455MQI4KOJM0HSBP3GG6OL9T8P... = 3^EJH (3^13187)
5E9EH8N8D9TR1AH48MT7OR3MHAGFNFQ... = A^EJH (10^13187)
[...]
5OCNCNRAP = 5^I in base 30 = 5^18 in base 10
54NO22GI76 = 6^I (6^18)
5EG4RAMD1IGGHQ8QS2QR0S0EH09DK16... = 5^1M7 (5^1567)
5E2PG4Q2G63DOBIJ54E4O035Q9TEJGH... = 6^1M7 (6^1567)
5E96DB9T6TBIM1FCCK8A8J7IDRCTM71... = 5^F9G (5^13786)
5E9NM222PN9Q9TEFTJ94261NRBB8FCH... = 6^F9G (6^13786)
[...]

So that’s √10, √6 and √30. But I said at the beginning that you can find √2 by finding 2^p. How do you do that? By offsetting the powers, as it were. With 2^p and 5^p, you can find the digits of √10. With 2^(p+1) and 5^p, you can find the digits of √2 and √20, because 2^(p+1) * 5^p = 2 * 2^p * 5^p = 2 * 10^p:

•  √2 = 1·414213562373095048801688724209698078569671875376948073...
• √20 = 4·472135954999579392818347337462552470881236719223051448...

16 = 2^4
125 = 5^3
140737488355328 = 2^47
142108547152020037174224853515625 = 5^46
1413... = 2^243
1414... = 5^242
14141... = 2^6651
14142... = 5^6650
141421... = 2^35389
141420... = 5^35388
4472136... = 2^162574
4472135... = 5^162573
141421359... = 2^3216082
141421352... = 5^3216081
447213595... = 2^172530387
447213595... = 5^172530386
[...]

God Give Me Benf’

In “Wake the Snake”, I looked at the digits of powers of 2 and mentioned a fascinating mathematical phenomenon known as Benford’s law, which governs — in a not-yet-fully-explained way — the leading digits of a wide variety of natural and human statistics, from the lengths of rivers to the votes cast in elections. Benford’s law also governs a lot of mathematical data. It states, for example, that the first digit, d, of a power of 2 in base b (except b = 2, 4, 8, 16…) will occur with the frequency logb(1 + 1/d). In base 10, therefore, Benford’s law states that the digits 1..9 will occur with the following frequencies at the beginning of 2^p:

1: 30.102999%
2: 17.609125%
3: 12.493873%
4: 09.691001%
5: 07.918124%
6: 06.694678%
7: 05.799194%
8: 05.115252%
9: 04.575749%

Here’s a graph of the actual relative frequencies of 1..9 as the leading digit of 2^p (open images in a new window if they appear distorted):


And here’s a graph for the predicted frequencies of 1..9 as the leading digit of 2^p, as calculated by the log(1+1/d) of Benford’s law:


The two graphs agree very well. But Benford’s law applies to more than one leading digit. Here are actual and predicted graphs for the first two leading digits of 2^p, 10..99:



And actual and predicted graphs for the first three leading digits of 2^p, 100..999:



But you can represent the leading digit of 2^p in another way: using an adaptation of the famous Ulam spiral. Suppose powers of 2 are represented as a spiral of squares that begins like this, with 2^0 in the center, 2^1 to the right of center, 2^2 above 2^1, and so on:

←←←⮲
432↑
501↑
6789

If the digits of 2^p start with 1, fill the square in question; if the digits of 2^p don’t start with 1, leave the square empty. When you do this, you get this interesting pattern (the purple square at the very center represents 2^0):

Ulam-like power-spiral for 2^p where 1 is the leading digit


Here’s a higher-resolution power-spiral for 1 as the leading digit:

Power-spiral for 2^p, leading-digit = 1 (higher resolution)


And here, at higher resolution still, are power-spirals for all the possible leading digits of 2^p, 1..9 (some spirals look very similar, so you have to compare those ones carefully):

Power-spiral for 2^p, leading-digit = 1 (very high resolution)


Power-spiral for 2^p, leading-digit = 2


Power-spiral for 2^p, ld = 3


Power-spiral for 2^p, ld = 4


Power-spiral for 2^p, ld = 5


Power-spiral for 2^p, ld = 6


Power-spiral for 2^p, ld = 7


Power-spiral for 2^p, ld = 8


Power-spiral for 2^p, ld = 9


Power-spiral for 2^p, ld = 1..9 (animated)


Now try the power-spiral of 2^p, ld = 1, in some other bases:

Power-spiral for 2^p, leading-digit = 1, base = 9


Power-spiral for 2^p, ld = 1, b = 15


You can also try power-spirals for other n^p. Here’s 3^p:

Power-spiral for 3^p, ld = 1, b = 10


Power-spiral for 3^p, ld = 2, b = 10


Power-spiral for 3^p, ld = 1, b = 4


Power-spiral for 3^p, ld = 1, b = 7


Power-spiral for 3^p, ld = 1, b = 18


Elsewhere Other-Accessible…

Wake the Snake — an earlier look at the digits of 2^p