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
[...]

La Formule de François

Here is a beautiful and astonishingly simple formula for π created by the French mathematician François Viète (1540-1603):

• 2 / π = √2/2 * √(2 + √2)/2 * √(2 + √(2 + √2))/2…

I can remember testing the formula on a scientific calculator that allowed simple programming. As I pressed the = key and the results began to home in on π, I felt as though I was watching a tall and elegant temple emerge through swirling mist.

Triangular Squares

The numbers that are both square and triangular are beautifully related to the best approximations to √2:

Number

Square Root

Factors of root

1 1 1
36 6 2 * 3
1225 35 5 * 7
41616 204 12 * 17

and so on.

In each case the factors of the root are the numerator and denominator of the next approximation to √2. — David Wells, The Penguin Dictionary of Curious and Interesting Mathematics (1986), entry for “36”.


Elsewhere other-accessible

A001110 — Square triangular numbers: numbers that are both triangular and square

The Trivial Troot

Here is the square root of 2:

√2 = 1·414213562373095048801688724209698078569671875376948073176679738...

Here is the square root of 20:

√20 = 4·472135954999579392818347337462552470881236719223051448541794491...

And here are the first few triangular numbers:

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035...

What links √2 and √20 strongly with the triangular numbers? At first glance, nothing does. The square roots of 2 and 20 are very different from the triangular numbers. Square roots like those are irrational, that is, they can’t be represented as a fraction or ratio of integers. This means that their digits go on for ever, never falling into a regular pattern. So the digits are hard to calculate. The sequence of triangular numbers also goes on for ever, but it’s very easy to calculate. The triangular numbers get their name from the way they can be arranged into simple triangles, like this:

* = 1


*
** = 3


*
**
*** = 6


*
**
***
**** = 10


*
**
***
****
***** = 15

The 1st triangular number is 1, the 2nd is 3 = 1+2, the 3rd is 6 = 1+2+3, the 4th is 10 = 1+2+3+4, and so on. The n-th triangular number = 1+2+3…+n, so the formula for the n-th triangular number is n*(n+1)/2 = (n^2+n)/2. So what’s the 123456789th triangular number? Easy: it’s 7620789436823655 (see A077694 at the OEIS). But what’s the 123456789th digit of √2 or √20? That’s not easy to answer. But here’s something else that is easy to answer. If tri(n) is the n-th triangular number, what are the values of n when tri(n) is one digit longer than tri(n-1)? That is, what are the values of n when tri(n) increases in length by one digit? If you look at the beginning of the sequence, you can see the first three answers:

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105...

1 is one digit longer than nothing, as it were, and 1 = tri(1); 10 is one digit longer than 6 and 10 = tri(4); 105 is one digit longer than 91 and 105 = tri(14). Here are some more answers, giving triangular numbers on the left, as they increase in length by one digit, and the n of tri(n) on the right:

1 ← 1
10 ← 4
105 ← 14
1035 ← 45
10011 ← 141
100128 ← 447
1000405 ← 1414
10001628 ← 4472
100005153 ← 14142
1000006281 ← 44721
10000020331 ← 141421
100000404505 ← 447214
1000001326005 ← 1414214
10000002437316 ← 4472136
100000012392316 ← 14142136
1000000042485480 ← 44721360
10000000037150046 ← 141421356
100000000000018810 ← 447213595
1000000000179470703 ← 1414213562
10000000002237948990 ← 4472135955
100000000010876002500 ← 14142135624
1000000000022548781025 ← 44721359550
10000000000026940078203 ← 141421356237
100000000000242416922750 ← 447213595500
1000000000000572687476751 ← 1414213562373
10000000000004117080477500 ← 4472135955000
100000000000007771272992046 ← 14142135623731
1000000000000031576491575006 ← 44721359549996
10000000000000140731196136705 ← 141421356237310
100000000000000250760786750861 ← 447213595499958
1000000000000000638090771126060 ← 1414213562373095
10000000000000000479330922588410 ← 4472135954999579
100000000000000000169466805816725 ← 14142135623730950
1000000000000000025572412483843115 ← 44721359549995794
10000000000000000087657358700327265 ← 141421356237309505
100000000000000000097566473134542830 ← 447213595499957939
1000000000000000000987561276980703725 ← 1414213562373095049
10000000000000000003048443380954913921 ← 4472135954999579393
100000000000000000006832246143819194316 ← 14142135623730950488
1000000000000000000014155501020518731556 ← 44721359549995793928

Can you spot the patterns? When tri(n) has an odd number of digits, n approximates the digits of √2; when tri(n) has an even number of digits, n approximates the digits of √20. And what can you call the approximations? Well, in a way they’re triangular roots so I’m calling them troots. Here are the troots for tri(n) with an odd number of digits:

1 → 1
14 → 105
141 → 10011
1414 → 1000405
14142 → 100005153
141421 → 10000020331
1414214 → 1000001326005
14142136 → 100000012392316
141421356 → 10000000037150046
1414213562 → 1000000000179470703
14142135624 → 100000000010876002500
141421356237 → 10000000000026940078203
1414213562373 → 1000000000000572687476751
14142135623731 → 100000000000007771272992046
141421356237310 → 10000000000000140731196136705
1414213562373095 → 1000000000000000638090771126060
14142135623730950 → 100000000000000000169466805816725
141421356237309505 → 10000000000000000087657358700327265
1414213562373095049 → 1000000000000000000987561276980703725
14142135623730950488 → 100000000000000000006832246143819194316
14142135623730950488... = √2 (without the decimal point)

When I first found these patterns, I thought I might have discovered something mathematically profound. I hadn’t. Troots are trivial. I think troots are beautiful too, but a little thought soon showed me how easily and obviously they arise. Remember that the formula for tri(n), the n-th triangular number, is tri(n) = (n^2+n)/2. As you can see above, when tri(n) is increasing in length by one digit, it rises above the next power of 10, which always begins with 1 followed by only 0s. Therefore n^2+n will begin with the digit 2 followed by some 0s, which then becomes 1 followed by some 0s as (n^2+n) is divided by 2. So n for tri(n) increasing-by-one-digit will be the first integer, n, where n^2+n yields a number with 2 as the leading digit followed by more and more 0s.

And that’s why n approximates the digits of √2·0000… and √20·0000…, for tri(n) with an odd and even number of digits, respectively. Similar trootful patterns exist in other bases and for other polygonal numbers, like the square numbers, the pentagonal numbers and so on. The troots are beautiful to see but trivial to explain. All the same, there is a sense in which you can say the mindless sequence of triangular numbers is “calculating” the digits of √2 and √20. It even rounds up the final digits when necessary:

1414214 → 1000001326005
14142136 → 100000012392316
141421356 → 10000000037150046
141421356... = √2
[...]
14142135624 → 100000000010876002500
141421356237 → 10000000000026940078203
141421356237... = √2
[...]
14142135623731 → 100000000000007771272992046
141421356237310 → 10000000000000140731196136705
1414213562373095 → 1000000000000000638090771126060
1414213562373095... = √2
[...]
1414213562373095049 → 1000000000000000000987561276980703725
14142135623730950488 → 100000000000000000006832246143819194316
14142135623730950488... = √2

Fib and Let Tri

It’s a simple sequence with hidden depths:

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, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986, 102334155... — A000045 at OEIS

That’s the Fibonacci sequence, probably the most famous of all integer sequences after the integers themselves (1, 2, 3, 4, 5…) and the primes (2, 3, 5, 7, 11…). It has a very simple definition: if fib(fi) is the fi-th number in the Fibonacci sequence, then fib(fi) = fib(fi-1) + fib(fi-2). By definition, fib(1) = fib(2) = 1. After that, it’s easy to generate new numbers:

2 = fib(3) = fib(1) + fib(2) = 1 + 1
3 = fib(4) = fib(2) + fib(3) = 1 + 2
5 = fib(5) = fib(3) + fib(4) = 2 + 3
8 = fib(6) = fib(4) + fib(5) = 3 + 5
13 = fib(7) = fib(5) + fib(6) = 5 + 8
21 = fib(8) = fib(6) + fib(7) = 8 + 13
34 = fib(9) = fib(7) + fib(8) = 13 + 21
55 = fib(10) = fib(8) + fib(9) = 21 + 34
89 = fib(11) = fib(9) + fib(10) = 34 + 55
144 = fib(12) = fib(10) + fib(11) = 55 + 89
233 = fib(13) = fib(11) + fib(12) = 89 + 144
377 = fib(14) = fib(12) + fib(13) = 144 + 233
610 = fib(15) = fib(13) + fib(14) = 233 + 377
987 = fib(16) = fib(14) + fib(15) = 377 + 610
[...]

How to create the Fibonacci sequence is obvious. But it’s not obvious that fib(fi) / fib(fi-1) gives you ever-better approximations to a fascinating constant called φ, the golden ratio, which is 1.618033988749894…:

1/1 = 1
2/1 = 2
3/2 = 1.5
5/3 = 1.66666...
8/5 = 1.6
13/8 = 1.625
21/13 = 1.615384...
34/21 = 1.619047...
55/34 = 1.6176470588235294117647058823...
89/55 = 1.618181818...
144/89 = 1.617977528089887640...
233/144 = 1.6180555555...
377/233 = 1.618025751072961...
610/377 = 1.618037135278514...
987/610 = 1.618032786885245...
[...]

And that’s just the start of the hidden depths in the Fibonacci sequence. I stumbled across another interesting pattern for myself a few days ago. I was looking at the sequence and one of the numbers caught my eye:

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

55 is a palindrome, reading the same forward and backwards. I wondered whether there were any other palindromes in the sequence (apart from the trivial single-digit palindromes 1, 1, 2, 3…). I couldn’t find any more. Nor can anyone else, apparently. But that’s in base 10. Other bases are more productive. For example, in bases 2, 3 and 4, you get this:

11 in b2 = 3
101 in b2 = 5
10101 in b2 = 21


22 in b3 = 8
111 in b3 = 13
22122 in b3 = 233


11 in b4 = 5
111 in b4 = 21
202 in b4 = 34
313 in b4 = 55


I decided to concentrate on tripals, or palindromes with three digits. I started looking at bases that set records for the greatest number of tripals. And there are some interesting patterns in the digits of the tripals in these bases (when a digit > 9, the digit is represented inside square brackets — see base-29 and higher). See how quickly you can spot the patterns:

Palindromic Fibonacci numbers in base-4

111 in b4 (fib=21, fi=8)
202 in b4 (fib=34, fi=9)
313 in b4 (fib=55, fi=10)

4 = 2^2 (pal=3)


Palindromic Fibonacci numbers in base-11

121 in b11 (fib=144, fi=12)
313 in b11 (fib=377, fi=14)
505 in b11 (fib=610, fi=15)
818 in b11 (fib=987, fi=16)

11 is prime (pal=4)


Palindromic Fibonacci numbers in base-29

151 in b29 (fib=987, fi=16)
323 in b29 (fib=2584, fi=18)
818 in b29 (fib=6765, fi=20)
[13]0[13] in b29 (fib=10946, fi=21)
[21]1[21] in b29 (fib=17711, fi=22)

29 is prime (pal=5)


Palindromic Fibonacci numbers in base-76

1[13]1 in b76 (fib=6765, fi=20)
353 in b76 (fib=17711, fi=22)
828 in b76 (fib=46368, fi=24)
[21]1[21] in b76 (fib=121393, fi=26)
[34]0[34] in b76 (fib=196418, fi=27)
[55]1[55] in b76 (fib=317811, fi=28)

76 = 2^2 * 19 (pal=6)


Palindromic Fibonacci numbers in base-199

1[34]1 in b199 (fib=46368, fi=24)
3[13]3 in b199 (fib=121393, fi=26)
858 in b199 (fib=317811, fi=28)
[21]2[21] in b199 (fib=832040, fi=30)
[55]1[55] in b199 (fib=2178309, fi=32)
[89]0[89] in b199 (fib=3524578, fi=33)
[144]1[144] in b199 (fib=5702887, fi=34)

199 is prime (pal=7)


Palindromic Fibonacci numbers in base-521

1[89]1 in b521 (fib=317811, fi=28)
3[34]3 in b521 (fib=832040, fi=30)
8[13]8 in b521 (fib=2178309, fi=32)
[21]5[21] in b521 (fib=5702887, fi=34)
[55]2[55] in b521 (fib=14930352, fi=36)
[144]1[144] in b521 (fib=39088169, fi=38)
[233]0[233] in b521 (fib=63245986, fi=39)
[377]1[377] in b521 (fib=102334155, fi=40)

521 is prime (pal=8)


Palindromic Fibonacci numbers in base-1364

1[233]1 in b1364 (fib=2178309, fi=32)
3[89]3 in b1364 (fib=5702887, fi=34)
8[34]8 in b1364 (fib=14930352, fi=36)
[21][13][21] in b1364 (fib=39088169, fi=38)
[55]5[55] in b1364 (fib=102334155, fi=40)
[144]2[144] in b1364 (fib=267914296, fi=42)
[377]1[377] in b1364 (fib=701408733, fi=44)
[610]0[610] in b1364 (fib=1134903170, fi=45)
[987]1[987] in b1364 (fib=1836311903, fi=46)

1364 = 2^2 * 11 * 31 (pal=9)


Two patterns are quickly obvious. Every digit in the tripals is a Fibonacci number. And the middle digit of one Fibonacci tripal, fib(fi), becomes fib(fi-2) in the next tripal, while fib(fi), the first and last digits (which are identical), becomes fib(fi+2) in the next tripal.

But what about the bases? If you’re an expert in the Fibonacci sequence, you’ll spot the pattern at work straight away. I’m not an expert, but I spotted it in the end. Here are the first few bases setting records for the numbers of Fibonacci tripals:

4, 11, 29, 76, 199, 521, 1364, 3571, 9349, 24476, 64079, 167761, 439204, 1149851, 3010349, 7881196...

These numbers come from the Lucas sequence, which is closely related to the Fibonacci sequence. But where fib(1) = fib(2) = 1, luc(1) = 1 and luc(2) = 3. After that, luc(li) = luc(li-2) + luc(li-1):

1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, 4870847, 7881196... — A000204 at OEIS

It seems that every second number from 4 in the Lucas sequence supplies a base in which 1) the number of Fibonacci tripals sets a new record; 2) every digit of the Fibonacci tripals is itself a Fibonacci number.

But can I prove that this is always true? No. And do I understand why these patterns exist? No. My simple search for palindromes in the Fibonacci sequence soon took me far out of my mathematical depth. But it’s been fun to find huge bases like this in which every digit of every Fibonacci tripal is itself a Fibonacci number:

Palindromic Fibonacci numbers in base-817138163596

1[139583862445]1 in b817138163596 (fib=781774079430987230203437, fi=116)
3[53316291173]3 in b817138163596 (fib=2046711111473984623691759, fi=118)
8[20365011074]8 in b817138163596 (fib=5358359254990966640871840, fi=120)
[21][7778742049][21] in b817138163596 (fib=14028366653498915298923761, fi=122)
[55][2971215073][55] in b817138163596 (fib=36726740705505779255899443, fi=124)
[144][1134903170][144] in b817138163596 (fib=96151855463018422468774568, fi=126)
[377][433494437][377] in b817138163596 (fib=251728825683549488150424261, fi=128)
[987][165580141][987] in b817138163596 (fib=659034621587630041982498215, fi=130)
[2584][63245986][2584] in b817138163596 (fib=1725375039079340637797070384, fi=132)
[6765][24157817][6765] in b817138163596 (fib=4517090495650391871408712937, fi=134)
[17711][9227465][17711] in b817138163596 (fib=11825896447871834976429068427, fi=136)
[46368][3524578][46368] in b817138163596 (fib=30960598847965113057878492344, fi=138)
[121393][1346269][121393] in b817138163596 (fib=81055900096023504197206408605, fi=140)
[317811][514229][317811] in b817138163596 (fib=212207101440105399533740733471, fi=142)
[832040][196418][832040] in b817138163596 (fib=555565404224292694404015791808, fi=144)
[2178309][75025][2178309] in b817138163596 (fib=1454489111232772683678306641953, fi=146)
[5702887][28657][5702887] in b817138163596 (fib=3807901929474025356630904134051, fi=148)
[14930352][10946][14930352] in b817138163596 (fib=9969216677189303386214405760200, fi=150)
[39088169][4181][39088169] in b817138163596 (fib=26099748102093884802012313146549, fi=152)
[102334155][1597][102334155] in b817138163596 (fib=68330027629092351019822533679447, fi=154)
[267914296][610][267914296] in b817138163596 (fib=178890334785183168257455287891792, fi=156)
[701408733][233][701408733] in b817138163596 (fib=468340976726457153752543329995929, fi=158)
[1836311903][89][1836311903] in b817138163596 (fib=1226132595394188293000174702095995, fi=160)
[4807526976][34][4807526976] in b817138163596 (fib=3210056809456107725247980776292056, fi=162)
[12586269025][13][12586269025] in b817138163596 (fib=8404037832974134882743767626780173, fi=164)
[32951280099]5[32951280099] in b817138163596 (fib=22002056689466296922983322104048463, fi=166)
[86267571272]2[86267571272] in b817138163596 (fib=57602132235424755886206198685365216, fi=168)
[225851433717]1[225851433717] in b817138163596 (fib=150804340016807970735635273952047185, fi=170)
[365435296162]0[365435296162] in b817138163596 (fib=244006547798191185585064349218729154, fi=171)
[591286729879]1[591286729879] in b817138163596 (fib=394810887814999156320699623170776339, fi=172)

817138163596 = 2^2 * 229 * 9349 * 95419 (pal=30)

The Glamor of Gamma

The factorial function, n!, is easy to understand. You simply take an integer and multiply it by all integers smaller than it (by convention, 0! = 1):

0! = 1
1! = 1
2! = 2 = 2*1
3! = 6 = 3*2*1
4! = 24 = 4*3*2*1
5! = 120 = 5*4*3*2*1
6! = 720 = 6*120 = 6*5!
7! = 5040
8! = 40320
9! = 362880
10! = 3628800
11! = 39916800
12! = 479001600
13! = 6227020800
14! = 87178291200
15! = 1307674368000
16! = 20922789888000
17! = 355687428096000
18! = 6402373705728000
19! = 121645100408832000
20! = 2432902008176640000

The gamma function, Γ(n), isn’t so easy to understand. It allows you to find the factorials of not just the integers, but everything between the integers, like fractions, square roots, and transcendental numbers like π. Don’t ask me how! And don’t ask me how you get this very beautiful and unexpected result:

Γ(1/2) = √π = 1.77245385091...

But a blog called Mathematical Enchantments can tell you more:

The Square Root of Pi


Post-Performative Post-Scriptum

glamour | glamor, n. Originally Scots, introduced into the literary language by Scott. A corrupt form of grammar n.; for the sense compare gramarye n. (and French grimoire ), and for the form glomery n. 1. Magic, enchantment, spell; esp. in the phrase to cast the glamour over one. 2. a. A magical or fictitious beauty attaching to any person or object; a delusive or alluring charm. b. Charm; attractiveness; physical allure, esp. feminine beauty; frequently attributive colloquial (originally U.S.). — Oxford English Dictionary

The Power of Powder

• Racine carrée de 2, c’est 1,414 et des poussières… Et quelles poussières ! Des grains de sable qui empêchent d’écrire racine de 2 comme une fraction. Autrement dit, cette racine n’est pas dans Q. — Rationnel mon Q: 65 exercices de styles, Ludmilla Duchêne et Agnès Leblanc (2010)

• The square root of 2 is 1·414 and dust… And what dust! Grains of sand that stop you writing the root of 2 as a fraction. Put another way, this root isn’t in Q [the set of rational numbers].

Root Rite

A square contains one of the great — perhaps the greatest — intellectual rites of passage. If each side of the square is 1 unit in length, how long are its diagonals? By Pythagoras’ theorem:

a^2 + b^2 = c^2
1^2 + 1^2 = 2, so c = √2

So each diagonal is √2 units long. But what is √2? It’s a new kind of number: an irrational number. That doesn’t mean that it’s illogical or against reason, but that it isn’t exactly equal to any ratio of integers like 3/2 or 17/12. When represented as decimals, the digits of all integer ratios either end or fall, sooner or later, into an endlessly repeating pattern:

3/2 = 1.5

17/12 = 1.416,666,666,666,666…

577/408 = 1.414,2156 8627 4509 8039,2156 8627 4509 8039,2156 8627 4509 8039,2156 8627 4509 8039,2156 8627 4509 8039,…

But when √2 is represented as a decimal, its digits go on for ever without any such pattern:

√2 = 1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,462,107…

The intellectual rite of passage comes when you understand why √2 is irrational and behaves like that:

Proof of the irrationality of √2

1. Suppose that there is some ratio, a/b, such that

2. a and b have no factors in common and

3. a^2/b^2 = 2.

4. It follows that a^2 = 2b^2.

5. Therefore a is even and there is some number, c, such that 2c = a.

6. Substituting c in #4, we derive (2c)^2 = 4c^2 = 2b^2.

7. Therefore 2c^2 = b^2 and b is also even.

8. But #7 contradicts #2 and the supposition that a and b have no factors in common.

9. Therefore, by reductio ad absurdum, there is no ratio, a/b, such that a^2/b^2 = 2. Q.E.D.

Given that subtle proof, you might think the digits of an irrational number like √2 would be difficult to calculate. In fact, they’re easy. And one method is so easy that it’s often re-discovered by recreational mathematicians. Suppose that a is an estimate for √2 but it’s too high. Clearly, if 2/a = b, then b will be too low. To get a better estimate, you simply split the difference: a = (a + b) / 2. Then do it again and again:

a = (2/a + a) / 2

If you first set a = 1, the estimates improve like this:

(2/1 + 1) / 2 = 3/2
2 – (3/2)^2 = -0.25
(2/(3/2) + 3/2) / 2 = 17/12
2 – (17/12)^2 = -0.00694…
(2/(17/12) + 17/12) / 2 = 577/408
2 – (577/408)^2 = -0.000006007…
(2/(577/408) + 577/408) / 2 = 665857/470832
2 – (665857/470832)^2 = -0.00000000000451…

In fact, the estimate doubles in accuracy (or better) at each stage (the first digit to differ is underlined):

1.5… = 3/2 (matching digits = 1)
1.4… = √2

1.416… = 17/12 (m=3)
1.414… = √2

1.414,215… = 577/408 (m=6)
1.414,213… = √2

1.414,213,562,374… = 665857/470832 (m=12)
1.414,213,562,373… = √2

1.414,213,562,373,095,048,801,689… = 886731088897/627013566048 (m=24)
1.414,213,562,373,095,048,801,688… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,377… (m=48)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,6… (m=97)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,5… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,8… (m=196)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,5… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,571,470,109,559,971,605,970,274,534,59
6,862,014,728,517,418,640,889,198,609,552,329,230,484,308,714,321,450,839,762,603,627,995,251,407,98
9,687,253,396,546,331,808,829,640,620,615,258,352,395,054,745,750,287,759,961,729,835,575,220,337,53
1,857,011,354,374,603,43… (m=392)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,571,470,109,559,971,605,970,274,534,59
6,862,014,728,517,418,640,889,198,609,552,329,230,484,308,714,321,450,839,762,603,627,995,251,407,98
9,687,253,396,546,331,808,829,640,620,615,258,352,395,054,745,750,287,759,961,729,835,575,220,337,53
1,857,011,354,374,603,40… = √2

1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,571,470,109,559,971,605,970,274,534,59
6,862,014,728,517,418,640,889,198,609,552,329,230,484,308,714,321,450,839,762,603,627,995,251,407,98
9,687,253,396,546,331,808,829,640,620,615,258,352,395,054,745,750,287,759,961,729,835,575,220,337,53
1,857,011,354,374,603,408,498,847,160,386,899,970,699,004,815,030,544,027,790,316,454,247,823,068,49
2,936,918,621,580,578,463,111,596,668,713,013,015,618,568,987,237,235,288,509,264,861,249,497,715,42
1,833,420,428,568,606,014,682,472,077,143,585,487,415,565,706,967,765,372,022,648,544,701,585,880,16
2,075,847,492,265,722,600,208,558,446,652,145,839,889,394,437,092,659,180,031,138,824,646,815,708,26
3,010,059,485,870,400,318,648,034,219,489,727,829,064,104,507,263,688,131,373,985,525,611,732,204,02
4,509,122,770,022,694,112,757,362,728,049,574… (m=783)
1.414,213,562,373,095,048,801,688,724,209,698,078,569,671,875,376,948,073,176,679,737,990,732,478,46
2,107,038,850,387,534,327,641,572,735,013,846,230,912,297,024,924,836,055,850,737,212,644,121,497,09
9,935,831,413,222,665,927,505,592,755,799,950,501,152,782,060,571,470,109,559,971,605,970,274,534,59
6,862,014,728,517,418,640,889,198,609,552,329,230,484,308,714,321,450,839,762,603,627,995,251,407,98
9,687,253,396,546,331,808,829,640,620,615,258,352,395,054,745,750,287,759,961,729,835,575,220,337,53
1,857,011,354,374,603,408,498,847,160,386,899,970,699,004,815,030,544,027,790,316,454,247,823,068,49
2,936,918,621,580,578,463,111,596,668,713,013,015,618,568,987,237,235,288,509,264,861,249,497,715,42
1,833,420,428,568,606,014,682,472,077,143,585,487,415,565,706,967,765,372,022,648,544,701,585,880,16
2,075,847,492,265,722,600,208,558,446,652,145,839,889,394,437,092,659,180,031,138,824,646,815,708,26
3,010,059,485,870,400,318,648,034,219,489,727,829,064,104,507,263,688,131,373,985,525,611,732,204,02
4,509,122,770,022,694,112,757,362,728,049,573… = √2

Pi and By

Here’s √2 in base 2:

√2 = 1.01101010000010011110... (base=2)

And in base 3:

√2 = 1.10201122122200121221... (base=3)

And in bases 4, 5, 6, 7, 8, 9 and 10:

√2 = 1.12220021321212133303... (b=4)
√2 = 1.20134202041300003420... (b=5)
√2 = 1.22524531420552332143... (b=6)
√2 = 1.26203454521123261061... (b=7)
√2 = 1.32404746317716746220... (b=8)
√2 = 1.36485805578615303608... (b=9)
√2 = 1.41421356237309504880... (b=10)

And here’s π in the same bases:

π = 11.00100100001111110110... (b=2)
π = 10.01021101222201021100... (b=3)
π = 03.02100333122220202011... (b=4)
π = 03.03232214303343241124... (b=5)
π = 03.05033005141512410523... (b=6)
π = 03.06636514320361341102... (b=7)
π = 03.11037552421026430215... (b=8)
π = 03.12418812407442788645... (b=9)
π = 03.14159265358979323846... (b=10)

Mathematicians know that in all standard bases, the digits of √2 and π go on for ever, without falling into any regular pattern. These numbers aren’t merely irrational but transcedental. But are they also normal? That is, in each base b, do the digits 0 to [b-1] occur with the same frequency 1/b? (In general, a sequence of length l will occur in a normal number with frequency 1/(b^l).) In base 2, are there as many 1s as 0s in the digits of √2 and π? In base 3, are there as many 2s as 1s and 0s? And so on.

It’s a simple question, but so far it’s proved impossible to answer. Another question starts very simple but quickly gets very difficult. Here are the answers so far at the Online Encyclopedia of Integer Sequences (OEIS):

2, 572, 8410815, 59609420837337474 – A049364

The sequence is defined as the “Smallest number that is digitally balanced in all bases 2, 3, … n”. In base 2, the number 2 is 10, which has one 1 and one 0. In bases 2 and 3, 572 = 1000111100 and 210012, respectively. 1000111100 has five 1s and five 0s; 210012 has two 2s, two 1s and two 0s. Here are the numbers of A049364 in the necessary bases:

10 (n=2)
1000111100, 210012 (n=572)
100000000101011010111111, 120211022110200, 200011122333 (n=8410815)
11010011110001100111001111010010010001101011100110000010, 101201112000102222102011202221201100, 3103301213033102101223212002, 1000001111222333324244344 (n=59609420837337474)

But what number, a(6), satisfies the definition for bases 2, 3, 4, 5 and 6? According to the notes at the OEIS, a(6) > 5^434. That means finding a(6) is way beyond the power of present-day computers. But I assume a quantum computer could crack it. And maybe someone will come up with a short-cut or even an algorithm that supplies a(b) for any base b. Either way, I think we’ll get there, π and by.

Self-Raising Power

The square root of 2 is the number that, raised to the power of 2, equals 2. That is, if r^2 = r * r = 2, then r = √2. The cube root of 2 is the number that, raised to the power of 3, equals 2. That is, if r^3 = r * r * r = 2, then r = [3]√2.

But what do you call the number that, raised to the power of itself, equals 2? I suggest “the auto-root of 2”. Here, if r^r = 2, then r = [r]√2. I don’t know a quick way to calculate the auto-root, but you can adapt a well-known algorithm for approximating the square root of a number. The square-root algorithm looks like this:

n = 2
r = 1
for c = 1 to 20
    r = (r + n/r) / 2
next c
print r

r = 1.414213562…

Note the fourth line of the algorithm: r = (r + n/r) / 2. When r is an over-estimate of √2, then 2/r will be an under-estimate (and vice versa). (r + 2/r) / 2 splits the difference and refines the estimate. Using the lines above as the model, the auto-root algorithm looks like this:

n = 2
r = 1
for c = 1 to 20
    r = (r + [r]√n) / 2[*]
next c
print r

r = 1.559610469…


*This is equivalent to r = (r + n^(1/r)) / 2

Here are the first 100 digits of [r]√2 = r in base 10:

1, 5, 5, 9, 6, 1, 0, 4, 6, 9, 4, 6, 2, 3, 6, 9, 3, 4, 9, 9, 7, 0, 3, 8, 8, 7, 6, 8, 7, 6, 5, 0, 0, 2, 9, 9, 3, 2, 8, 4, 8, 8, 3, 5, 1, 1, 8, 4, 3, 0, 9, 1, 4, 2, 4, 7, 1, 9, 5, 9, 4, 5, 6, 9, 4, 1, 3, 9, 7, 3, 0, 3, 4, 5, 4, 9, 5, 9, 0, 5, 8, 7, 1, 0, 5, 4, 1, 3, 4, 4, 4, 6, 9, 1, 2, 8, 3, 9, 7, 3…

And here is [r]n = r for n = 2..20:

autopower(2) = 1.5596104694623693499703887…
autopower(3) = 1.8254550229248300400414692…
autopower(4) = 2
autopower(5) = 2.1293724827601566963803119…
autopower(6) = 2.2318286244090093673920215…
autopower(7) = 2.3164549587856123013255030…
autopower(8) = 2.3884234844993385564187215…
autopower(9) = 2.4509539280155796306228059…
autopower(10) = 2.5061841455887692562929409…
autopower(11) = 2.5556046121008206152514542…
autopower(12) = 2.6002950000539155877172082…
autopower(13) = 2.6410619164843958084118390…
autopower(14) = 2.6785234858912995813011990…
autopower(15) = 2.7131636040042392095764012…
autopower(16) = 2.7453680235674634847098492…
autopower(17) = 2.7754491049442334313328329…
autopower(18) = 2.8036632456580215496843618…
autopower(19) = 2.8302234384970308956026277…
autopower(20) = 2.8553085030012414128332189…

I assume that the auto-root is always an irrational number, except when n is a perfect power of suitable form, i.e. n = p^p for some integer p. For example, autoroot(4) = 2, because 2^2 = 4, autoroot(27) = 3, because 3^3 = 27, and so on.

And here is the graph of autoroot(n) for n = 2..10000:
autoroot