
Pentagram with colored lines in the golden ratio (Wikipedia)
• Friday is Φiday — Why Today is a Mathemagical Day

Pentagram with colored lines in the golden ratio (Wikipedia)
• Friday is Φiday — Why Today is a Mathemagical Day
Phiday falls on the 11th, 12th and 23rd of each month, because 11, 12 and 23 represent entries in the famous Fibonacci sequence:
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, 165580141, 267914296, 433494437, 701408733, 1134903170, 1836311903, 2971215073, 4807526976, 7778742049, 12586269025, 20365011074, 32951280099, 53316291173, 86267571272, 139583862445, 225851433717, 365435296162, 591286729879, 956722026041, 1548008755920, 2504730781961, 4052739537881, 6557470319842, 10610209857723, 17167680177565, 27777890035288, 44945570212853, 72723460248141, 117669030460994, 190392490709135, 308061521170129, 498454011879264, 806515533049393, 1304969544928657, …
Successive entries in the Fibonacci sequence provide better and better approximations to the golden ratio or φ = 1.61803398874989484820458683…
2 = 2/1
1.5 = 3/2
1.6 = 5/3
1.6 = 8/5
1.625 = 13/8
1.6153846… = 21/13
1.619047619… = 34/21
1.6176470588235294117647… = 55/34
1.618… = 89/55
1.617977528… = 144/89
1.61805… = 233/144
1.618025751… = 377/233
1.618037135… = 610/377
1.618032786… = 987/610
1.618034447… = 1597/987
1.618033813… = 2584/1597
1.618034055… = 4181/2584
1.618033963… = 6765/4181
1.618033998… = 10946/6765
1.618033985… = 17711/10946
Today is 23rd June, so here’s a Fascinating Fibonacci Fact for Phiday. First, list the rational fractions < 1 in simplified form and mark the Fibonacci fractions:
1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, 4/5, 1/6, 5/6, 1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 1/8, 3/8, 5/8, 7/8, 1/9, 2/9, 4/9, 5/9, 7/9, 8/9, 1/10, 3/10, 7/10, 9/10, 1/11, 2/11, 3/11, 4/11, 5/11, 6/11, 7/11, 8/11, 9/11, 10/11, 1/12, 5/12, 7/12, 11/12, 1/13, 2/13, 3/13, 4/13, 5/13, 6/13, 7/13, 8/13, 9/13, 10/13, 11/13, 12/13, 1/14, 3/14, 5/14, 9/14, 11/14, 13/14, 1/15, 2/15, 4/15, 7/15, 8/15, 11/15, 13/15, 14/15, 1/16, 3/16, 5/16, 7/16, 9/16, 11/16, 13/16, 15/16, 1/17, 2/17, 3/17, 4/17, 5/17, 6/17, 7/17, 8/17, 9/17, 10/17, 11/17, 12/17, 13/17, 14/17, 15/17, 16/17, 1/18, 5/18, 7/18, 11/18, 13/18, 17/18, 1/19, 2/19, 3/19, 4/19, 5/19, 6/19, 7/19, 8/19, 9/19, 10/19, 11/19, 12/19, 13/19, 14/19, 15/19, 16/19, 17/19, 18/19, 1/20, 3/20, 7/20, 9/20, 11/20, 13/20, 17/20, 19/20, 1/21, 2/21, 4/21, 5/21, 8/21, 10/21, 11/21, 13/21, 16/21, 17/21, 19/21, 20/21, 1/22, 3/22, 5/22, 7/22, 9/22, 13/22, 15/22, 17/22, 19/22, 21/22, 1/23, 2/23, 3/23, 4/23, 5/23, 6/23, 7/23, 8/23, 9/23, 10/23, 11/23, 12/23, 13/23, 14/23, 15/23, 16/23, 17/23, 18/23, 19/23, 20/23, 21/23, 22/23…
Next, record the positions in the fraction list of the FibFracs, i.e. pos(fibonacci(i)/fibonacci(i+1)) = pos(fibfrac(i)):
1, 3, 8, 20, 53, 135, 353, 924, 2422, 6311, 16529, 43229, 113066, 296173, 775286, 2029661, 5313844, 13911391, 36419909, 95348490, 249624578, 653521015, 1710943906, 4479312193, 11726939926, 30701521655, 80377560978, 210431191133, 550915866198, 1442316294349, 3776032465954, 9885782372588, 25881314454327, 67758160822605, 177393168080718, 464421339906882, 1215870841639593, …
What do you get when you divide pos(fibfrac(i+1)) by pos(fibfrac(i))?
pos(1/2) = 1
pos(2/3) = 3 (3/1 = 3)
pos(3/5) = 8 (8/3 = 2.6…)
pos(5/8) = 20 (20/8 = 2.5)
pos(8/13) = 53 (53/20 = 2.65)
pos(13/21) = 135 (2.5471698113207…)
pos(21/34) = 353 (2.6148…)
pos(34/55) = 924 (2.617563739376770538243626062…)
pos(55/89) = 2422 (2.621…)
pos(89/144) = 6311 (2.605697770437654830718414533…)
pos(144/233) = 16529 (2.619077800665504674378070037…)
pos(233/377) = 43229 (2.615342730957710690301893642…)
pos(377/610) = 113066 (2.615512734506928219482291980…)
pos(610/987) = 296173 (2.619470044045071020465922559…)
pos(987/1597) = 775286 (2.617679531895209894217231145…)
pos(1597/2584) = 2029661 (2.617951310871084993150914630…)
pos(2584/4181) = 5313844 (2.618094351716863062353762525…)
pos(4181/6765) = 13911391 (2.617952465296309037299551888…)
pos(6765/10946) = 36419909 (2.617991903182075753603647543…)
pos(10946/17711) = 95348490 (2.618032076906068051954770123…)
pos(17711/28657) = 249624578 (2.618023400265699016313735016…)
pos(28657/46368) = 653521015 (2.618015502463863954934758067…)
pos(46368/75025) = 1710943906 (2.618039614227248683043497844…)
pos(75025/121393) = 4479312193 (2.618035680358535377956453004…)
pos(121393/196418) = 11726939926 (2.618022459860278821159630657…)
pos(196418/317811) = 30701521655 (2.618033506501651708043379296…)
pos(317811/514229) = 80377560978 (2.618031831816708695313688353…)
pos(514229/832040) = 210431191133 (2.618034045479393794998913484…)
pos(832040/1346269) = 550915866198 (2.618033302153394031845776103…)
pos(1346269/2178309) = 1442316294349 (2.618033683260502304564996035…)
pos(2178309/3524578) = 3776032465954 (2.618033562227999267671331082…)
pos(3524578/5702887) = 9885782372588 (2.618034262608066669117450079…)
pos(5702887/9227465) = 25881314454327 (2.618034008728793003503058474…)
pos(9227465/14930352) = 67758160822605 (2.618033985181798482654668954…)
pos(14930352/24157817) = 177393168080718 (2.618033989221521810752093192…)
pos(24157817/39088169) = 464421339906882 (2.618033969017113072183685603…)
pos(39088169/63245986) = 1215870841639593 (2.618033964338027806153843993…)
[…]
In other words, pos(fibfrac(i+1)) / pos(fibfrac(i)) → φ^2 = 2.61803398874989484820458683… = φ + 1
Previously Pre-Posted (Please Peruse)
The 11th, 12th and 23rd day of a month can be called a φ-day (pronounced fy-day). Why so? Because those numbers are consecutive entries in the famous Fibonacci sequence, which offers better and better approximations to a mathematical constant called φ = (√5 + 1) / 2 = 1.6180339887498948…:
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, …
Each number after the second is the sum of the preceding two (so 11, 12, 23… could be the start of a similar sequence). When you divide fib(i) by fib(i-1), you get these approximations to φ:
2 = 2/1
1.5 = 3/2
1.6 = 5/3
1.6 = 8/5
1.625 = 13/8
1.6153846… = 21/13
1.619047619… = 34/21
1.6176470588235294117647… = 55/34
1.618… = 89/55
1.617977528… = 144/89
1.61805… = 233/144
1.618025751… = 377/233
1.618037135… = 610/377
1.618032786… = 987/610
1.618034447… = 1597/987
1.618033813… = 2584/1597
1.618034055… = 4181/2584
1.618033963… = 6765/4181
1.618033998… = 10946/6765
1.618033985… = 17711/10946
Today is the 23rd and not just a φ-day but a Friday (or φriday). So here’s one of the interesting results I’ve recently found while playing with the Fibonacci sequence. As any recreational mathematician kno, you can also find the Fibonacci sequence — and φ — with this little algorithm:
f = 0
LOOP
f = 1 / (f + 1)
print(f)
goto LOOP
The algorithm returns these values:
1, 1/2, 2/3, 3/5, 5/8, 8/13, 13/21, 21/34, 34/55, 55/89, 89/144, 144/233, 233/377, 377/610, 610/987, 987/1597, 1597/2584, 2584/4181, 4181/6765, 6765/10946, 10946/17711, …
I was playing with that algorithm and got an unexpected result with a simple adaptation of it:
f = 0
LOOP
f = 1 / (3 – f)
print(f)
goto LOOP
The values of f generated by this adapted algorithm are:
1/3, 3/8, 8/21, 21/55, 55/144, 144/377, 377/987, 987/2584, 2584/6765, 6765/17711, 17711/46368, 46368/121393, 121393/317811, 317811/832040, 832040/2178309, 2178309/5702887, 5702887/14930352, 14930352/39088169, 39088169/102334155, 102334155/267914296, …
The numerator and denominator in each fraction are next-but-one Fibonacci numbers, beautifully generated at each step:
3 – 0 = 3 → 1/3
3 – 1/3 = (3*3)/3 – 1/3 = 9/3 – 1/3 = (9-1) / 3 = 8 / 3 → 1/(8/3) = 3/8
3 – 3/8 = (3*8)/3 – 3/8 = 24/8 – 3/8 = (24-3) / 8 = 21/8 → 1/(21/8) = 8/21
3 – 8/21 = (3*21)/21 – 8/21 = 63/21 – 8/21 = (63-8)/21 = 55/21 → 1/(55/21) = 21/55
3 – 21/55 = (3*55)/55 – 21/55 = 165/55 – 21/55 = (165-21)/55 = 144/55 → 1/(144/55) = 55/144
3 – 55/144 = (3*144)/144 – 55/144 = (432-55)/144 = 377/144 → 1/(377/144) = 144/377
3 – 144/377 = (3*377)/377 – 144/377 = (1131-144)/377 = 987/377 → 1/(987/377) = 377/987
[…]
If you reverse numerator and denominator, the limit of the fraction is φ^2 = 2.6180339887498948… = φ+1:
3 = 3/1
2.6 = 8/3
2.625 = 21/8
2.6190476190476190476190476… = 55/21
2.6181818181818181818181818… = 144/55
2.6180555555555555555555555… = 377/144
2.6180371352785145888594164… = 987/377
2.6180344478216818642350557… = 2584/987
2.6180340557275541795665634… = 6765/2584
2.6180339985218033998521803… = 17711/6765
2.6180339901755970865563773… = 46368/17711
2.6180339889579020013802622… = 121393/46368
2.6180339887802426828565073… = 317811/121393
2.6180339887543225376088304… = 832040/317811
2.6180339887505408393827219… = 2178309/832040
2.6180339887499890970472967… = 5702887/2178309
2.6180339887499085989254214… = 14930352/5702887
2.6180339887498968544077192… = 39088169/14930352
2.6180339887498951409056791… = 102334155/39088169
2.6180339887498948909091006… = 267914296/102334155
“The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents.” So said HPL in “The Call of Cthulhu” (1926). But I’d still like to correlate the contents of mine a bit better. For example, I knew that φ, the golden ratio, is the most irrational of all numbers, in that it is the slowest to be approximated with rational fractions. And I also knew that continued fractions, or CFs, were a way of representing both rationals and irrationals as a string of numbers, like this:
contfrac(10/7) = [1; 2, 3]
10/7 = 1 + 1/(2 + 1/3)
10/7 = 1.428571428571…
contfrac(3/5) = [0; 1, 1, 2]
4/5 = 0 + 1/(1 + 1/(1 + 1/2))
4/5 = 0.8
contfrac(11/8) = [1; 2, 1, 2]
11/8 = 1 + 1/(2 + 1/(1 + 1/2))
11/8 = 1.375
contfrac(4/7) = [0; 1, 1, 3]
4/7 = 0 + 1/(1 + 1/(1 + 1/3))
4/7 = 0.57142857142…
contfrac(17/19) = [0; 1, 8, 2]
17/19 = 0 + 1/(1 + 1/(8 + 1/2))
17/19 = 0.8947368421052…
contfrac(8/25) = [0; 3, 8]
8/25 = 0 + 1/(3 + 1/8)
8/25 = 0.32
contfrac(√2) = [1; 2, 2, 2, 2, 2, 2, 2…] = [1; 2]
√2 = 1 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + 1/2 + …))))))
√2 = 1.41421356237309504…
contfrac(φ) = [1; 1, 1, 1, 1, 1, 1, 1, 1…]
φ = 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/1 + …)))))))
φ = 1.6180339887498948…
But I didn’t correlate those two contents of my mind: the maximal irrationality of φ and the way continued fractions work.
That’s why I was surprised when I was looking at the continued fractions of 2..(n-1) / n for 3,4,5,6,7… That is, I was looking at the continued fractions of 2/3, 3/4, 2/5, 3/5, 4/5, 5/6, 2/7, 3/7… (skipping fractions like 2/4, 2/6, 3/6 etc, because they’re reducible: 2/4 = ½, 2/6 = 1/3, 3/6 = ½ etc). I wondered which fractions set successive records for the length of their continued fractions as one worked through ½, 2/3, 3/4, 2/5, 3/5, 4/5, 5/6, 2/7, 3/7… And because I hadn’t correlated the contents of my mind, I was surprised at the result. I shouldn’t have been, of course:
contfrac(1/2) = [0; 2] (cfl=1)
1/2 = 0 + 1/2
1/2 = 0.5
contfrac(2/3) = [0; 1, 2] (cfl=2)
2/3 = 0 + 1/(1 + 1/2)
2/3 = 0.666666666…
contfrac(3/5) = [0; 1, 1, 2] (cfl=3)
3/5 = 0 + 1/(1 + 1/(1 + 1/2))
3/5 = 0.6
contfrac(5/8) = [0; 1, 1, 1, 2] (cfl=4)
5/8 = 0 + 1/(1 + 1/(1 + 1/(1 + 1/2)))
5/8 = 0.625
contfrac(8/13) = [0; 1, 1, 1, 1, 2] (cfl=5)
8/13 = 0 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/2))))
8/13 = 0.615384615…
contfrac(13/21) = [0; 1, 1, 1, 1, 1, 2] (cfl=6)
13/21 = 0 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/2)))))
13/21 = 0.619047619…
contfrac(21/34) = [0; 1, 1, 1, 1, 1, 1, 2] (cfl=7)
21/34 = 0 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/2))))))
21/34 = 0.617647059…
contfrac(34/55) = [0; 1, 1, 1, 1, 1, 1, 1, 2] (cfl=8)
contfrac(55/89) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=9)
contfrac(89/144) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=10)
contfrac(144/233) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=11)
contfrac(233/377) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=12)
contfrac(377/610) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=13)
contfrac(610/987) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=14)
contfrac(987/1597) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=15)
contfrac(1597/2584) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=16)
contfrac(2584/4181) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=17)
contfrac(4181/6765) = [0; 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=18)
[…]
Which n1/n2 set records for the length of their continued fractions (with n2 > n1)? It’s the successive Fibonacci fractions, fib(i)/fib(i+1), of course. I didn’t anticipate that answer because I didn’t understand φ and continued fractions properly. And I still don’t, because I’ve been surprised again today looking at palindromic CFs like these:
contfrac(2/5) = [0; 2, 2] (cfl=2)
2/5 = 0 + 1/(2 + 1/2)
2/5 = 0.4
contfrac(3/8) = [0; 2, 1, 2] (cfl=3)
3/8 = 0 + 1/(2 + 1/(1 + 1/2))
3/8 = 0.375
contfrac(3/10) = [0; 3, 3] (cfl=2)
3/10 = 0 + 1/(3 + 1/3)
3/10 = 0.3
contfrac(5/12) = [0; 2, 2, 2] (cfl=3)
5/12 = 0 + 1/(2 + 1/(2 + 1/2))
5/12 = 0.416666666…
contfrac(5/13) = [0; 2, 1, 1, 2] (cfl=4)
5/13 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/2)))
5/13 = 0.384615384…
contfrac(4/15) = [0; 3, 1, 3] (cfl=3)
4/15 = 0 + 1/(3 + 1/(1 + 1/3))
4/15 = 0.266666666…
contfrac(7/16) = [0; 2, 3, 2] (cfl=3)
7/16 = 0 + 1/(2 + 1/(3 + 1/2))
7/16 = 0.4375
contfrac(4/17) = [0; 4, 4] (cfl=2)
4/17 = 0 + 1/(4 + 1/4)
4/17 = 0.235294117…
Again, I wondered which of these fractions set successive records for the length of their palindromic continued fractions. Here’s the answer:
contfrac(1/2) = [0; 2] (cfl=1)
1/2 = 0 + 1/2
1/2 = 0.5
contfrac(2/5) = [0; 2, 2] (cfl=2)
2/5 = 0 + 1/(2 + 1/2)
2/5 = 0.4
contfrac(3/8) = [0; 2, 1, 2] (cfl=3)
3/8 = 0 + 1/(2 + 1/(1 + 1/2))
3/8 = 0.375
contfrac(5/13) = [0; 2, 1, 1, 2] (cfl=4)
5/13 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/2)))
5/13 = 0.384615384…
contfrac(8/21) = [0; 2, 1, 1, 1, 2] (cfl=5)
8/21 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/(1 + 1/2))))
8/21 = 0.380952380…
contfrac(13/34) = [0; 2, 1, 1, 1, 1, 2] (cfl=6)
13/34 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/(
1 + 1/(1 + 1/2)))))
13/34 = 0.382352941..
contfrac(21/55) = [0; 2, 1, 1, 1, 1, 1, 2] (cfl=7)
21/55 = 0 + 1/(2 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + 1/2))))))
21/55 = 0.381818181…
contfrac(34/89) = [0; 2, 1, 1, 1, 1, 1, 1, 2] (cfl=8)
contfrac(55/144) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=9)
contfrac(89/233) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=10)
contfrac(144/377) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=11)
contfrac(233/610) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=12)
contfrac(377/987) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=13)
contfrac(610/1597) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=14)
contfrac(987/2584) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=15)
contfrac(1597/4181) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=16)
contfrac(2584/6765) = [0; 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] (cfl=17)
[…]
Now it’s the successive Fibonacci skip-one fractions, fib(i)/fib(i+2), that set records for the length of their palindromic continued fractions. But I think you’d have to be very good at maths not to be surprised by that result.
After that, I continued to be compelled by the Call of CFulhu and started to look at the CFs of Fibonacci skip-n fractions in general. That’s contfrac(fib(i)/fib(i+n)) for n = 1,2,3,… And I’ve found more interesting patterns, as I’ll describe in a follow-up post.
This is how you form the famous Koch snowflake, in which at each stage you erect a new triangle on the middle of each line whose sides are 1/3 the length of the line:

Koch snowflake #1
Koch snowflake #2
Koch snowflake #3
Koch snowflake #4
Koch snowflake #5
Koch snowflake #6
Koch snowflake #7
Koch snowflake (animated)
Here’s a variant of the Koch snowflake, with new mid-triangles whose sides are 1/2 the length of the lines:
Koch snowflake (1/2 side) #1
Koch snowflake (1/2 side) #2
Stage #3
Stage #4
Stage #5
Stage #6
Stage #7
Stage #8
Koch snowflake (1/2 side) (animated)
But why stop at triangles? This is a Koch square, in which at each stage you erect a new 1/3 square on the middle of each line:
Koch square #1
Koch square #2
Koch square #3
Koch square #4
Koch square #5
Koch square #6
Koch square (animated)
And a Koch pentagon, in which at each stage you erect a pentagon on the middle of each line whose sides are 1 – (1/φ^2 * 2) = 0·236067977… the length of the line (I used 55/144 as an approximation of 1/φ^2):
Koch pentagon (side 55/144) #1
Koch pentagon #2
Koch pentagon #3
Koch pentagon #4
Koch pentagon #5
Koch pentagon #6
Koch pentagon (animated)
In this close-up, you can see how precisely the sprouting pentagons kiss at each stage:

Koch pentagon (close-up) #1
Koch pentagon (close-up) #2
Koch pentagon (close-up) #3
Koch pentagon (close-up) #4
Koch pentagon (close-up) #5
Koch pentagon (close-up) #6
Koch pentagon (close-up) (animated)
How wide is a number? The obvious answer is to count digits and say that 1 and 9 are one digit wide, 11 and 99 are two digits wide, 111 and 999 are three digits wide, and so on. But that isn’t a very good answer. 111 and 999 are both three digits wide, but 999 is nine larger times than 111. And although 111 and 999 are both one digit wider than 11 and 99, 111 is much closer to 99 than 999 is to 111.
So there’s got to be a better answer to the question. I came across it indirectly, when I started looking at carries in powers. I wanted to know how fast a number grew in digit-width as it was multiplied repeatedly by, say, 2. For example, 2^3 = 8 and 2^4 = 16, so there’s been a carry at the far left and 2^4 = 16 has increased in digit-width by 1 over 2^3 = 8. After that, 2^6 = 64 and 2^7 = 128, so there’s another carry and another increase in digit-width. I wrote a program to sum the carries and divide them by the power. If I were better at math, I would’ve known what the value of carries / power was going to be. Here’s the program beginning to find it (it begins with a carry of 1, to mark 2^0 = 1 as creating a digit ex nihilo, as it were):
8 = 2^3
16 = 2^4 → 2 / 4 = 0.5
64 = 2^6
128 = 2^7 → 3 / 7 = 0.4285714285714285714285714286
512 = 2^9
1024 = 2^10 → 4 / 10 = 0.4
8192 = 2^13
16384 = 2^14 → 5 / 14 = 0.3571428571428571428571428571
65536 = 2^16
131072 = 2^17 → 6 / 17 = 0.3529411764705882352941176471
524288 = 2^19
1048576 = 2^20 → 7 / 20 = 0.35
8388608 = 2^23
16777216 = 2^24 → 8 / 24 = 0.3...
67108864 = 2^26
134217728 = 2^27 → 9 / 27 = 0.3...
536870912 = 2^29
1073741824 = 2^30 → 10 / 30 = 0.3...
8589934592 = 2^33
17179869184 = 2^34 → 11 / 34 = 0.3235294117647058823529411765
68719476736 = 2^36
137438953472 = 2^37 → 12 / 37 = 0.3243243243243243243243243243
549755813888 = 2^39
1099511627776 = 2^40 → 13 / 40 = 0.325
8796093022208 = 2^43
17592186044416 = 2^44 → 14 / 44 = 0.318...
70368744177664 = 2^46
140737488355328 = 2^47 → 15 / 47 = 0.3191489361702127659574468085
562949953421312 = 2^49
1125899906842624 = 2^50 → 16 / 50 = 0.32
9007199254740992 = 2^53
18014398509481984 = 2^54 → 17 / 54 = 0.3148...
72057594037927936 = 2^56
144115188075855872 = 2^57 → 18 / 57 = 0.3157894736842105263157894737
576460752303423488 = 2^59
1152921504606846976 = 2^60 → 19 / 60 = 0.316...
9223372036854775808 = 2^63
18446744073709551616 = 2^64 → 20 / 64 = 0.3125
73786976294838206464 = 2^66
147573952589676412928 = 2^67 → 21 / 67 = 0.3134328358208955223880597015
590295810358705651712 = 2^69
1180591620717411303424 = 2^70 → 22 / 70 = 0.3142857...
9444732965739290427392 = 2^73
18889465931478580854784 = 2^74 → 23 / 74 = 0.3108...
75557863725914323419136 = 2^76
151115727451828646838272 = 2^77 → 24 / 77 = 0.3116883...
604462909807314587353088 = 2^79
1208925819614629174706176 = 2^80 → 25 / 80 = 0.3125
9671406556917033397649408 = 2^83
19342813113834066795298816 = 2^84 → 26 / 84 = 0.3095238095238095238095238095
77371252455336267181195264 = 2^86
154742504910672534362390528 = 2^87 → 27 / 87 = 0.3103448275862068965517241379
618970019642690137449562112 = 2^89
1237940039285380274899124224 = 2^90 → 28 / 90 = 0.31...
9903520314283042199192993792 = 2^93
19807040628566084398385987584 = 2^94 → 29 / 94 = 0.3085106382978723404255319149
79228162514264337593543950336 = 2^96
158456325028528675187087900672 = 2^97 → 30 / 97 = 0.3092783505154639175257731959
633825300114114700748351602688 = 2^99
1267650600228229401496703205376 = 2^100 → 31 / 100 = 0.31
After calculating 2^p higher and higher (I discarded trailing digits of 2^p), I realized that the answer — carries / power — was converging on a value of slightly less than 0.30103. In the end (doh!), I realized that what I was calculating was the logarithm of 2 in base 10:
log(2) = 0.3010299956639811952137388947...
10^0.301029995663981... = 2
You can use then same carries-and-powers method to approximate the values of other logarithms:
log(1) = 0
log(2) = 0.3010299956639811952137388947...
log(3) = 0.4771212547196624372950279033...
log(4) = 0.6020599913279623904274777894...
log(5) = 0.6989700043360188047862611053...
log(6) = 0.7781512503836436325087667980...
log(7) = 0.8450980400142568307122162586...
log(8) = 0.9030899869919435856412166842...
log(9) = 0.9542425094393248745900558065...
I also realized logarithms are a good answer to the question I raised above: How wide is a number? The logs of the powers of 2 are multiples of log(2):
log(2^1) = log(2) = 0.301029995663981195213738894
log(2^2) = log(4) = 0.602059991327962390427477789 = 2 * log(2)
log(2^3) = log(8) = 0.903089986991943585641216684 = 3 * log(2)
log(2^4) = log(16) = 1.204119982655924780854955579 = 4 * log(2)
log(2^5) = log(32) = 1.505149978319905976068694474 = 5 * log(2)
log(2^6) = log(64) = 1.806179973983887171282433368 = 6 * log(2)
log(2^7) = log(128) = 2.107209969647868366496172263 = 7 * log(2)
log(2^8) = log(256) = 2.408239965311849561709911158 = 8 * log(2)
log(2^9) = log(512) = 2.709269960975830756923650053 = 9 * log(2)
log(2^10) = log(1024) = 3.010299956639811952137388947 = 10 * log(2)
4 is 2 times larger than 2 and, in a sense, the width of 4 is 0.301029995663981… greater than the width of 2. As you can see, when the integer part of the log-sum increases by 1, so does the digit-width of the power:
log(2^3) = log(8) = 0.903089986991943585641216684 = 3 * log(2)
log(2^4) = log(16) = 1.204119982655924780854955579 = 4 * log(2)[...]
log(2^6) = log(64) = 1.806179973983887171282433368 = 6 * log(2)
log(2^7) = log(128) = 2.107209969647868366496172263 = 7 * log(2)[...]
log(2^9) = log(512) = 2.709269960975830756923650053 = 9 * log(2)
log(2^10) = log(1024) = 3.01029995663981195213738894 = 10 * log(2)
In other words, powers of 2 are increasing in width by 0.301029995663981… units. When the increase flips the integer part of the log-sum up by 1, the digit-width or digit-count also increases by 1. To find the digit-count of a number, n, in a particular base, you simply take the integer part of log(n,b) and add 1. In base 10, the log of 123456789 is 8.091514… The integer part is 8 and 8+1 = 9. But it also makes perfect sense that log(1) = 0. No matter how many times you multiply a number by 1, the number never changes. That is, its width stays the same. So you can say that 1 has a width of 0, while 2 has a width of 0.301029995663981…
Logarithms also answer a question pre-previously raised on Overlord of the Über-Feral: Why are the Fibonacci numbers so productive in base 11 for digsum(fib(k)) = k? In base 10, such numbers are quickly exhausted:
digsum(fib(1)) = 1 = digsum(1)
digsum(fib(5)) = 5 = digsum(5)
digsum(fib(10)) = 10 = digsum(55)
digsum(fib(31)) = 31 = digsum(1346269)
digsum(fib(35)) = 35 = digsum(9227465)
digsum(fib(62)) = 62 = digsum(4052739537881)
digsum(fib(72)) = 72 = digsum(498454011879264)
digsum(fib(175)) = 175 = digsum(1672445759041379840132227567949787325)
digsum(fib(180)) = 180 = digsum(18547707689471986212190138521399707760)
digsum(fib(216)) = 216 = digsum(619220451666590135228675387863297874269396512)
digsum(fib(251)) = 251 = digsum(12776523572924732586037033894655031898659556447352249)
digsum(fib(252)) = 252 = digsum(20672849399056463095319772838289364792345825123228624)
digsum(fib(360)) = 360
digsum(fib(494)) = 494
digsum(fib(540)) = 540
digsum(fib(946)) = 946
digsum(fib(1188)) = 1188
digsum(fib(2222)) = 2222
In base 11, such numbers go on and on:
digsum(fib(1),b=11) = 1 = digsum(1) (k=1)
digsum(fib(5),b=11) = 5 = digsum(5) (k=5)
digsum(fib(12),b=11) = 12 = digsum(1A2) (k=13)
digsum(fib(38),b=11) = 38 = digsum(855138A1) (k=41)
digsum(fib(49)) = 49 = digsum(2067A724762) (k=53) (c=5)
digsum(fib(50)) = 50 = digsum(542194A6905) (k=55)
digsum(fib(55)) = 55 = digsum(54756364A280) (k=60)
digsum(fib(56)) = 56 = digsum(886283256841) (k=61)
digsum(fib(82)) = 82 = digsum(57751318A9814A6410) (k=90)
digsum(fib(89)) = 89 = digsum(140492673676A06482A2) (k=97)
digsum(fib(144)) = 144 = digsum(401631365A48A784A09392136653457871) (k=169) (c=10)
digsum(fib(159)) = 159 = digsum(67217257641069185100889658A1AA72A0805) (k=185)
digsum(fib(166)) = 166 = digsum(26466A3A88237918577363A2390343388205432) (k=193)
digsum(fib(186)) = 186 = digsum(6A963147A9599623A20A05390315140A21992A96005) (k=215)
digsum(fib(221)) = 221 (k=265) (c=15)
digsum(fib(225)) = 225 (k=269)
digsum(fib(2A1)) = 2A1 (k=353)
digsum(fib(2A3)) = 2A3 (k=355)[...]
digsum(fib(39409)) = 39409 (k=56395)
digsum(fib(3958A)) = 3958A (k=56605) (c=295)
digsum(fib(3965A)) = 3965A (k=56693)
digsum(fib(3A106)) = 3A106 (k=57360)
digsum(fib(3AA46)) = 3AA46 (k=58493)
digsum(fib(40140)) = 40140 (k=58729)
digsum(fib(4222A)) = 4222A (k=61500) (c=300)
digsum(fib(42609)) = 42609 (k=61961)
digsum(fib(42775)) = 42775 (k=62155)
digsum(fib(4287A)) = 4287A (k=62281)
digsum(fib(430A2)) = 430A2 (k=62669)
digsum(fib(43499)) = 43499 (k=63149) (c=305)
digsum(fib(435A9)) = 435A9 (k=63281)[...]
digsum(fib(157476)) = 157476 (k=244140) (c=525)
digsum(fib(158470)) = 158470 (k=245465)
digsum(fib(159037)) = 159037 (k=246275)
digsum(fib(159285)) = 159285 (k=246570)
digsum(fib(159978)) = 159978 (k=247409)
digsum(fib(162993)) = 162993 (k=252750) (c=530)
digsum(fib(163A32)) = 163A32 (k=254135)
digsum(fib(164918)) = 164918 (k=255329)
digsum(fib(166985)) = 166985 (k=258065)
digsum(fib(167234)) = 167234 (k=258493)
digsum(fib(167371)) = 167371 (k=258655) (c=535)
digsum(fib(1676A5)) = 1676A5 (k=259055)
digsum(fib(16992A)) = 16992A (k=261997)[...]
When do these numbers run out in base 11? I don’t know, but I do know why there are so many of them. The answer involves the logarithm of a special number. The most famous aspect of Fibonacci numbers is that the ratio, fib(k) / fib(k-1), of successive numbers converges on an irrational constant known as Φ. Here are the first Fibonacci numbers, where fib(k) = fib(k-2) + fib(k-1) (in other words, 1+1 = 2, 1+2 = 3, 2+3 = 5, and so on):
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, ...
And here are the first ratios:
1 / 1 = 1
2 / 1 = 2
3 / 2 = 1.5
5 / 3 = 1.6...
8 / 5 = 1.6
13 / 8 = 1.625
21 / 13 = 1.6153846...
34 / 21 = 1.619047...
55 / 34 = 1.617647058823529411764705882
89 / 55 = 1.618...
144 / 89 = 1.617977528089887640449438202
233 / 144 = 1.61805...
377 / 233 = 1.618025751072961373390557940
610 / 377 = 1.618037135278514588859416446
987 / 610 = 1.618032786885245901639344262
1597 / 987 = 1.618034447821681864235055724
2584 / 1597 = 1.618033813400125234815278648
4181 / 2584 = 1.618034055727554179566563468
6765 / 4181 = 1.618033963166706529538387946
[...]
The ratios get closer and closer to Φ = 1.618033988749894848204586834… = (√5 + 1) / 2. In other words, fib(k) ≈ fib(k-1) * Φ = fib(k-1) * 1.618… in base 10. This means that the digit-length of fib(k) ≈ integer(k * log(&Phi)) + 1. In base b, the average value of a digit in a Fibonacci number is (b^2-b) / 2b. Therefore in base 10, the average value of a digit is (10^2-10) / 20 = 90 / 20 = 4.5. The average value of digsum(fib(k)) ≈ 4.5 * log(&Phi) * k = 4.5 * 0.20898764… * k = 0.940444… * k. It isn’t surprising that as fib(k) gets larger, digsum(fib(k)) tends to get smaller than k.
In base 10, anyway. But what about base 11? In base 11, log(Φ) = 0.20068091818623… and the average value of a base-11 digit in fib(k) is 5 = 110 / 22 = (11^2 – 11) / 22. Therefore the average value of digsum(fib(k)) in base 11 is 5 * log(&Phi) * k = 5 * 0.20068091818623… * k = 1.00340459… * k. The average value of digsum(fib(k)) is much closer to k and it’s not surprising that for so many fib(k) in base 11, digsum(fib(k)) = k. In base 11, log(Φ) ≈ 1/5 and because the average digval is 5, digsum(fib(k)) ≈ 5 * 1/5 * k = 1 * k = k. As we’ve seen, that isn’t true in base 10. Nor is it true in base 12, where log(Φ) = 0.1936538843826… and average digval is 5.5 = (12^2 – 12) / 24 = 132 / 24. Therefore the average value in base 12 of digsum(fib(k)) = 1.0650963641… * k. The function digsum(fib(k)) = k rapidly dries up in base 12, just as it does in base 10:
digsum(fib(1),b=12) = 1 = digsum(1) (k=1)
digsum(fib(5),b=12) = 5 = digsum(5) (k=5)
digsum(fib(11) = 11 = digsum(175) (k=13)
digsum(fib(12) = 12 = digsum(275) (k=14)
digsum(fib(75) = 75 = digsum(976446538A0863811) (k=89) (c=5)
digsum(fib(80) = 80 = digsum(1B3643B50939808B400) (k=96)
digsum(fib(A3) = A3 = digsum(35147A566682BB9529034402) (k=123)
digsum(fib(165) = 165 (k=221)
digsum(fib(283) = 283 (k=387)
digsum(fib(2AB) = 2AB (k=419) (c=10)
digsum(fib(39A) = 39A (k=550)
digsum(fib(460) = 460 (k=648)
digsum(fib(525) = 525 (k=749)
digsum(fib(602) = 602 (k=866)
digsum(fib(624) = 624 (k=892) (c=15)
digsum(fib(781) = 781 (k=1105)
digsum(fib(1219) = 1219 (k=2037)
Previously Pre-Posted…
• Mötley Vüe — more on digsum(fib(k)) = k
Here’s a useless fact that nobody interested in mathematics would ever forget: digsum(fib(2222)) = 2222. That is, if you add the digits of the 2222nd Fibonacci number, you get 2222:
fib(2222) = 104,966,721,620,282,584,734,867,037,988,863,914,269,721,309,244,628,258,918,225,835,217,264,239,539,186,480,867,849,267,122,885,365,019,934,494,625,410,255,045,832,359,715,759,649,385,824,745,506,982,513,773,397,742,803,445,080,995,617,047,976,796,168,678,756,479,470,761,439,513,575,962,955,568,645,505,845,492,393,360,201,582,183,610,207,447,528,637,825,187,188,815,786,270,477,935,419,631,184,553,635,981,047,057,037,341,800,837,414,913,595,584,426,355,208,257,232,868,908,837,817,478,483,039,310,790,967,631,454,123,105,472,742,221,897,397,857,677,674,619,381,961,429,837,434,434,636,098,678,708,225,493,682,469,5612222 = 1 + 0 + 4 + 9 + 6 + 6 + 7 + 2 + 1 + 6 + 2 + 0 + 2 + 8 + 2 + 5 + 8 + 4 + 7 + 3 + 4 + 8 + 6 + 7 + 0 + 3 + 7 + 9 + 8 + 8 + 8 + 6 + 3 + 9 + 1 + 4 + 2 + 6 + 9 + 7 + 2 + 1 + 3 + 0 + 9 + 2 + 4 + 4 + 6 + 2 + 8 + 2 + 5 + 8 + 9 + 1 + 8 + 2 + 2 + 5 + 8 + 3 + 5 + 2 + 1 + 7 + 2 + 6 + 4 + 2 + 3 + 9 + 5 + 3 + 9 + 1 + 8 + 6 + 4 + 8 + 0 + 8 + 6 + 7 + 8 + 4 + 9 + 2 + 6 + 7 + 1 + 2 + 2 + 8 + 8 + 5 + 3 + 6 + 5 + 0 + 1 + 9 + 9 + 3 + 4 + 4 + 9 + 4 + 6 + 2 + 5 + 4 + 1 + 0 + 2 + 5 + 5 + 0 + 4 + 5 + 8 + 3 + 2 + 3 + 5 + 9 + 7 + 1 + 5 + 7 + 5 + 9 + 6 + 4 + 9 + 3 + 8 + 5 + 8 + 2 + 4 + 7 + 4 + 5 + 5 + 0 + 6 + 9 + 8 + 2 + 5 + 1 + 3 + 7 + 7 + 3 + 3 + 9 + 7 + 7 + 4 + 2 + 8 + 0 + 3 + 4 + 4 + 5 + 0 + 8 + 0 + 9 + 9 + 5 + 6 + 1 + 7 + 0 + 4 + 7 + 9 + 7 + 6 + 7 + 9 + 6 + 1 + 6 + 8 + 6 + 7 + 8 + 7 + 5 + 6 + 4 + 7 + 9 + 4 + 7 + 0 + 7 + 6 + 1 + 4 + 3 + 9 + 5 + 1 + 3 + 5 + 7 + 5 + 9 + 6 + 2 + 9 + 5 + 5 + 5 + 6 + 8 + 6 + 4 + 5 + 5 + 0 + 5 + 8 + 4 + 5 + 4 + 9 + 2 + 3 + 9 + 3 + 3 + 6 + 0 + 2 + 0 + 1 + 5 + 8 + 2 + 1 + 8 + 3 + 6 + 1 + 0 + 2 + 0 + 7 + 4 + 4 + 7 + 5 + 2 + 8 + 6 + 3 + 7 + 8 + 2 + 5 + 1 + 8 + 7 + 1 + 8 + 8 + 8 + 1 + 5 + 7 + 8 + 6 + 2 + 7 + 0 + 4 + 7 + 7 + 9 + 3 + 5 + 4 + 1 + 9 + 6 + 3 + 1 + 1 + 8 + 4 + 5 + 5 + 3 + 6 + 3 + 5 + 9 + 8 + 1 + 0 + 4 + 7 + 0 + 5 + 7 + 0 + 3 + 7 + 3 + 4 + 1 + 8 + 0 + 0 + 8 + 3 + 7 + 4 + 1 + 4 + 9 + 1 + 3 + 5 + 9 + 5 + 5 + 8 + 4 + 4 + 2 + 6 + 3 + 5 + 5 + 2 + 0 + 8 + 2 + 5 + 7 + 2 + 3 + 2 + 8 + 6 + 8 + 9 + 0 + 8 + 8 + 3 + 7 + 8 + 1 + 7 + 4 + 7 + 8 + 4 + 8 + 3 + 0 + 3 + 9 + 3 + 1 + 0 + 7 + 9 + 0 + 9 + 6 + 7 + 6 + 3 + 1 + 4 + 5 + 4 + 1 + 2 + 3 + 1 + 0 + 5 + 4 + 7 + 2 + 7 + 4 + 2 + 2 + 2 + 1 + 8 + 9 + 7 + 3 + 9 + 7 + 8 + 5 + 7 + 6 + 7 + 7 + 6 + 7 + 4 + 6 + 1 + 9 + 3 + 8 + 1 + 9 + 6 + 1 + 4 + 2 + 9 + 8 + 3 + 7 + 4 + 3 + 4 + 4 + 3 + 4 + 6 + 3 + 6 + 0 + 9 + 8 + 6 + 7 + 8 + 7 + 0 + 8 + 2 + 2 + 5 + 4 + 9 + 3 + 6 + 8 + 2 + 4 + 6 + 9 + 5 + 6 + 1
Numbers like this, where k = digsum(fib(k)), are rare. And 2222 is almost certainly the last of them. These are the relevant listings at the Online Encyclopedia of Integer Sequences:
0, 1, 5, 10, 31, 35, 62, 72, 175, 180, 216, 251, 252, 360, 494, 504, 540, 946, 1188, 2222 — A020995, Numbers k such that the sum of the digits of Fibonacci(k) is k.0, 1, 5, 55, 1346269, 9227465, 4052739537881, 498454011879264, 1672445759041379840132227567949787325, 18547707689471986212190138521399707760, 619220451666590135228675387863297874269396512... — A067515, Fibonacci numbers with index = digit sum.
At least, they’re rare in base 10. What about other bases? Well, they’re rare in all other bases except one: base 11. When I looked there, I quickly found more than 450 numbers where digsum(fib(k),b=11) = k. So here’s an interesting little problem: Why is base 11 so productive? Or maybe I should say: Φ is base 11 so productive?
Here’s a pentagon:
Stage #1
And here’s the pentagon with smaller pentagons on its vertices:
Stage #2
And here’s more of the same:
Stage #3
Stage #4
Stage #5
Stage #6
Stage #7
Stage #8
Animated fractal
At infinity, the smaller pentagons have reached out like arms to exactly fill the gaps between themselves without overlapping. But how much smaller is each set of smaller pentagons than its mother-pentagon when the gaps are exactly filled? Well, if the radius of the mother-pentagon is r, then the radius of each daughter-pentagon is r * 1/(φ^2) = r * 0·38196601125…
But what happens if the radius relationship of mother to daughter is r * 1/φ = r * 0·61803398874 = r * (φ-1)? Then you get this fractal:
Stage #1
Stage #2
Stage #3
Stage #4
Stage #5
Stage #6
Stage #7
Stage #8
Stage #9
Animated fractal
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)
Suppose a café offers you free drinks for three days. You can have tea or coffee in any order and any number of times. If you want tea every day of the three, you can have it. So here’s a question: how many ways can you choose from two kinds of drink in three days? One simple way is to number each drink, tea = 1, coffee = 2, then count off the choices like this:
1: 111
2: 112
3: 121
4: 122
5: 211
6: 212
7: 221
8: 222
Choice #1 is 111, which means tea every day. Choice #6 is 212, which means coffee on day 1, tea on day 2 and coffee on day 3. Now look at the counting again and the way the numbers change: 111, 112, 121, 122, 211… It’s really base 2 using 1 and 2 rather than 0 and 1. That’s why there are 8 ways to choose two drinks over three days: 8 = 2^3. Next, note that you use the same number of 1s to count the choices as the number of 2s. There are twelve 1s and twelve 2s, because each number has a mirror: 111 has 222, 112 has 221, 121 has 212, and so on.
Now try the number of ways to choose from three kinds of drink (tea, coffee, orange juice) over two days:
11, 12, 13, 21, 22, 23, 31, 32, 33 (c=9)
There are 9 ways to choose, because 9 = 3^2. And each digit, 1, 2, 3, is used exactly six times when you write the choices. Now try the number of ways to choose from three kinds of drink over three days:
111, 112, 113, 121, 122, 123, 131, 132, 133, 211, 212, 213, 221, 222, 223, 231, 232, 233, 311, 312, 313, 321, 322, 323, 331, 332, 333 (c=27)
There are 27 ways and (by coincidence) each digit is used 27 times to write the choices. Now try three drinks over four days:
1111, 1112, 1113, 1121, 1122, 1123, 1131, 1132, 1133, 1211, 1212, 1213, 1221, 1222, 1223, 1231, 1232, 1233, 1311, 1312, 1313, 1321, 1322, 1323, 1331, 1332, 1333, 2111, 2112, 2113, 2121, 2122, 2123, 2131, 2132, 2133, 2211, 2212, 2213, 2221, 2222, 2223, 2231, 2232, 2233, 2311, 2312, 2313, 2321, 2322, 2323, 2331, 2332, 2333, 3111, 3112, 3113, 3121, 3122, 3123, 3131, 3132, 3133, 3211, 3212, 3213, 3221, 3222, 3223, 3231, 3232, 3233, 3311, 3312, 3313, 3321, 3322, 3323, 3331, 3332, 3333 (c=81)
There are 81 ways to choose and each digit is used 108 times. But the numbers don’t have represent choices of drink in a café. How many ways can a point inside an equilateral triangle jump four times half-way towards the vertices of the triangle? It’s the same as the way to choose from three drinks over four days. And because the point jumps toward each vertex in a symmetrical way the same number of times, you get a nice even pattern, like this:
vertices = 3, jump = 1/2
Every time the point jumps half-way towards a particular vertex, its position is marked in a unique colour. The fractal, also known as a Sierpiński triangle, actually represents all possible choices for an indefinite number of jumps. Here’s the same rule applied to a square. There are four vertices, so the point is tracing all possible ways to choose four vertices for an indefinite number of jumps:
v = 4, jump = 1/2
As you can see, it’s not an obvious fractal. But what if the point jumps two-thirds of the way to its target vertex and an extra target is added at the centre of the square? This attractive fractal appears:
v = 4 + central target, jump = 2/3
If the central target is removed and an extra target is added on each side, this fractal appears:
v = 4 + 4 midpoints, jump = 2/3
That fractal is known as a Sierpiński carpet. Now up to the pentagon. This fractal of endlessly nested contingent pentagons is created by a point jumping 1/φ = 0·6180339887… of the distance towards the five vertices:
v = 5, jump = 1/φ
With a central target in the pentagon, this fractal appears:
v = 5 + central, jump = 1/φ
The central red pattern fits exactly inside the five that surround it:
v = 5 + central, jump = 1/φ (closeup)
v = 5 + c, jump = 1/φ (animated)
For a fractal of endlessly nested contingent hexagons, the jump is 2/3:
v = 6, jump = 2/3
With a central target, you get a filled variation of the hexagonal fractal:
v = 6 + c, jump = 2/3
And for a fractal of endlessly nested contingent octagons, the jump is 1/√2 = 0·7071067811… = √½:
v = 8, jump = 1/√2
Previously pre-posted: