Faux-Fib Funcs for Phiday

Today isn’t Friday, let alone Phriday. But it is Phiday, that is, it’s a date when the digits of the day of the month, the 23rd, reproduce two successive terms 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,…

The rule for the Fibonacci sequence is very simple. If n(i) represents the i-th term of the sequence, n(i) = n(i-1) + n(i-2). So 8, the sixth term, equals the sum of 3 and 5, the fourth and fifth terms, respectively. Dividing successive terms in the sequence, n(i)/n(i-1), gives you closer and closer approximations to a famous constant called the golden ratio or phi or φ, which equals 1.6180339887498948482045868343656381177203091798… So the Phidays in a month are the 11th, the 12th and the 23rd (except in other bases, where you can get 112 in base 3 = 14 in base 10 and 123 in b4 = 27 in b10). Obviously, you can try variants on the Fibonacci sequence. Here’s one I hadn’t tried before, summing the reciprocals of the two previous terms (1/x is the reciprocal of x) and seeded with (1,1):

f(i) = 1/f(i-1) + 1/f(i-2)

A good mathematician might not be surprised by what happens when you apply that function, but I was. Here’s the sequence in action:

1/1 + 1/1 = 1 + 1 = 2
1/2 + 1/1 = 1/2 + 1 = 3/2 = 1.5
1/2 + 1/(3/2) = 1/2 + 2/3 = 7/6 = 1.1666666666666666…
1/(3/2) + 1/(7/6) = 2/3 + 6/7 = 32/21 = 1.5238095238095…
1/(7/6) + 1/(32/21) = 6/7 + 21/32 = 339/224 = 1.51339285714285…
1/(32/21) + 1/(339/224) = 14287/10848 = 1.3170169616519174…
1/(339/224) + 1/(14287/10848) = 6877760/4843293 = 1.4200586254…
1/(14287/10848) = 1/(6877760/4843293) = 143806067571/98262557120 = 1.4634879427713391…

And here’s the sequence as a list:

1, 1, 2, 1.5, 1.16666666…, 1.52380952…, 1.51339286…, 1.31701696…, 1.42005863…, 1.46348794…, 1.38749538…, 1.40402222…, 1.43296256…, 1.41009438…, 1.40702733…, 1.41989064…, 1.41499784…, 1.41099445…, 1.41543487…, 1.41521666…, 1.41310224…, 1.41426846…, 1.41474221…, 1.41392189…, 1.4140952…, 1.41441861…, 1.41417024…, 1.41413272…, 1.41427565…, 1.41422294…, 1.41417783…, 1.41422674…, 1.41422484…, 1.41420133…, 1.41421404…, 1.41421944…, 1.41421039…, 1.41421221…, 1.41421583…, 1.41421311…, 1.41421266…, 1.41421424…, 1.41421367…, 1.41421317…, 1.4142137…, 1.41421369…, 1.41421343…, 1.41421357…, 1.41421363…, 1.41421353…, 1.41421355…, 1.41421359…

The successive terms themselves (not the division of two successive terms) get closer and closer to another famous constant, 1.4142135623… = sqrt(2) = √2 = the square root of 2. That is, 2 = 1.4142135623…^2 = √2 * √2 = 2.

Now try this faux-Fibonacci function, which sums the reciprocals of three previous terms and is seeded with (1,1,1):

f(i) = 1/f(i-1) + 1/f(i-2) + 1/f(i-3)

1, 1, 1, 3, 2.33333333…, 1.76190476…, 1.32947233…, 1.74831712…, 1.8917243…, 1.85277499…, 1.64032782…, 1.67798344…, 1.74531862…, 1.77854896…, 1.73117082…, 1.71286113…, 1.72371834…, 1.74160342…, 1.73814321…, 1.7296513…, 1.72766133…, 1.73229495…, 1.73423726…, 1.73270842…, 1.73102242…, 1.73144679…, 1.7323761…, 1.73248681…, 1.73199851…, 1.73181453…, 1.73200171…, 1.73216337…, 1.73210842…, 1.73201045…, 1.73200754…, 1.73205948…, 1.73207579…, 1.73205401…, 1.73203852…, 1.73204551…, 1.7320556…, 1.73205507…, 1.73204955…, 1.73204821…, 1.73205067…, 1.73205214…, 1.73205128…, 1.73205025…, 1.73205039…, 1.73205097…, 1.73205108…, 1.7320508…, 1.73205066…

This time the terms are approximating √3 = 1.7320508075688772…

The pattern should be becoming clear. Here’s a faux-Fibonacci function summing the reciprocals of four previous terms and seeded with (1,1,1,1):

f(i) = 1/f(i-1) + 1/f(i-2) + 1/f(i-3) + 1/f(i-4) = f(i) = sum(j=1,4,1/f(i-j)) → 1, 1, 1, 1, 4, 3.25…, 2.55769231…, 1.94866975…, 1.46184034…, 1.89590957…, 2.11566858…, 2.19735496…, 2.13927698…, 1.9226554…, 1.91531809…, 1.96476075…, 2.01863597…, 2.04657233…, 2.0150802…, 1.98923188…, 1.98297066…, 1.99188053…, 2.00529681…, 2.00771794…, 2.00308927…, 1.99802424…, 1.99648053…, 1.99868265…, 2.00093427…, 2.00147194…, 2.0006098…, 1.99957598…, 1.99935245…, 1.99974785…, 2.00017861…, 2.00028636…, 2.00010876…, 1.99991963…, 1.99987668…, 1.99995216…, 2.0000357…, 2.00005396…, 2.00002038…, 1.99998445…, 1.99997638…, 1.99999121…, 2.0000069…, 2.00001027…, 2.00000381…, 1.99999695…, 1.99999552…, 1.99999836…, 2.00000134…, 2.00000196…

It’s approximating √4 = 2. Finally, a faux-Fibonacci function summing five previous terms and seeded with (1,1,1,1,1):

f(i) = sum(j=1,5,1/f(i-j)) → 1, 1, 1, 1, 1, 5, 4.2, 3.43809524…, 2.72895396…, 2.09539474…, 1.57263179…, 2.00850854…, 2.26829518…, 2.41829618…, 2.46536969…, 2.39375132…, 2.1756289…, 2.13738424…, 2.1643861…, 2.2128966…, 2.25917432…, 2.28405957…, 2.26223931…, 2.2364176…, 2.22153651…, 2.21977901…, 2.22763471…, 2.23872439…, 2.24336745…, 2.24198222…, 2.23787719…, 2.23423394…, 2.23290801…, 2.23407155…, 2.23592634…, 2.2371344…, 2.23728276…, 2.23667283…, 2.235919…, 2.23554916…, 2.23562462…, 2.23592649…, 2.23619761…, 2.23629263…, 2.2362179…, 2.23608413…, 2.23599221…, 2.23597907…, 2.23602277…, 2.23607674…, 2.23610497…, 2.2361008…, 2.23607908…, 2.23605908…, 2.23605182…

f(i) = sum(j=1,5,1/f(i-j)) → √5 = 2.2360679774997896964…

What’s going on? Why does a faux-Fibonacci function summing the reciprocals of n previous terms approximate √n? Simple. It’s because √n/n = 1/√n, so:

√2 = 1/√2 + 1/√2
√3 = 1/√3 + 1/√3 + 1/√3
√4 = 1/√4 + 1/√4 + 1/√4 + 1/√4
√5 = 1/√5 + 1/√5 + 1/√5 + 1/√5 + 1/√5
√6 = 1/√6 + 1/√6 + 1/√6 + 1/√6 + 1/√6 + 1/√6
√7 = 1/√7 + 1/√7 + 1/√7 + 1/√7 + 1/√7 + 1/√7 + 1/√7

Now try a variant of this variant on the standard Fibonacci function. Rather than summing the reciprocals of n previous terms, that is, adding all the reciprocals, you can try adding some, subtracting others and leaving others out. When I played with add-subtract-ignore, I had another surprise. Consider the faux-Fibonacci function using four terms where you add f(i-4), subtract f(i-3) and f(i-2), and neither add nor subtract f(i-1). If it’s seeded with (1,1,1,1), it behaves like this (note that subtracting a negative number is the same as adding its positive form):

f(i) = 1/f(i-4) – 1/f(i-3) – 1/f(i-2) = f(i) = -1/f(i-2) – 1/f(i-3) + 1/f(i-4)

1, 1, 1, 1, -1, -1, 1, 3, -1, -2.33333333…, 1.66666667…, 1.76190476…, -1.17142857…, -1.596139…, 0.886090969…, 2.04773796…, -1.35569898…, -2.24340789…, 1.37783544…, 1.67172102…, -1.01765253…, -1.76971243…, 1.11024382…, 2.14590316…, -1.31829317…, -1.93177087…, 1.19325541…, 1.7422206…, -1.07894042…, -1.92968341…, 1.19089866…, 2.01903508…, -1.24831753…, -1.85320783…, 1.14549415…, 1.83596921…, -1.13445903…, -1.95726202…, 1.20979165…, 1.93706664…, -1.19714822…, -1.85375091…, 1.14566257…, 1.89100976…, -1.16872901…, -1.94112216…, 1.19966969…, 1.89961427…, -1.17402719…, -1.87515137…, 1.15890915…, 1.91148197…, -1.18135916…, -1.91932498…, 1.18620874…, 1.89065342…, -1.16848806…, -1.89295612…, 1.16991105…, 1.91299871…, -1.18229835…, -1.90577961…, 1.17783653…, 1.89326935…, -1.1701048…, -1.90192076…, 1.17545169…, 1.90859542…, -1.17957683…, -1.90046656…, 1.17455293…, 1.89789374…, -1.17296284…, -1.90447424…, 1.17702981…, 1.90452112…, -1.17705878…, -1.89974183…, 1.17410502…, 1.90102893…, -1.17490049…, -1.9041308…, 1.17681755…, 1.90234084…, -1.1757113…, -1.90059155…, 1.17463018…, 1.90236908…, -1.17572875…, -1.90314411…, 1.17620774…, 1.90164296…, -1.17527998…, -1.9014973…, 1.17518996…, 1.90262351…, -1.17588599…, -1.90241767…, 1.17575878…, 1.90165956…, -1.17529024…, -1.902018…, 1.17551177…, 1.90246751…

The function cycles through approximations of four constants consisting of successive pairs that are identical except for their sign (positive and negative). When you square those constants, you get this (multiplying two negative numbers is the same as multiplying their positive forms):

+1.1755705045849462583374119093…^2 = 1.3819660112501051517954131656…
+1.9021130325903071442328786668…^2 = 3.6180339887498948482045868343…
-1.1755705045849462583374119093…^2 = 1.3819660112501051517954131656…
-1.9021130325903071442328786668…^2 = 3.6180339887498948482045868343…

I was surprised to see that φ had appeared:

3.6180339887498948482045868344… = 2 + φ = 1 + φ^2
1.3819660112501051517954131656… = 1 + (φ-1)^2 = 1 + (1/φ)^2


Elsewhere Other-Accessible…

Friday is Φday — a first look at Phiday

Formulas Focal to the Flesh

Here’s an interesting formula:

fr(1) = 1/2; mx = 3
fr(i) = fr(i-1) + 1/fr(i-1)
if fr(i) > mx, fr(i) = fr(i) – mx

Early terms look like this:

0.5, 2.5, 2.9, 3.244827586…, 4.329334628…, 2.081590666…, 2.561992513…, 2.952313716…, 3.291031107…, 3.727089920…, 2.102435627…, 2.578074447…, 2.965960841…, 3.303119709…, 3.602146368…, 2.262872154…, 2.704788415…, 3.074503101…, 13.49676325…, 10.59203071…, 7.723747777…, 4.935444092…, 2.452121378…, 2.859931533…, 3.209590254…, 4.980804482…, 2.485649867…, 2.887959143…, 3.234224430…, 4.503633905…, 2.168689406…

Can you see any patterns emerging? I’d guess not. And I’d guess a thousand more terms wouldn’t help you see any better. It’s hard for humans to see patterns in a jumble of numbers. Our eyes don’t work as well on numbers as on shapes. That’s why you can make that formula focal to the flesh, as it were, by plotting the numbers on a graph. Or part of the numbers, anyway. Suppose you take the fractional parts of each pair of terms and use them to map (x,y) on a FractL (my name for a graph whose arms run from 0 to 1). For example, the terms 4.935444092… and 2.452121378… would yield x = 0.935444092… and y = 0.452121378… (or vice versa). The resultant graph makes the formula focal to the flesh. And it’s replete with patterns:

fr(i)+=1/fr(i-1); if fr(i)>3, fr(i)-=3; x = frac(fr(i)), y = frac(fr(i+1))


I can’t explain the patterns and they may arise from limited precision in the decimal digits. But I like them however they arise. The graph doesn’t change when mx = 4 (although it creates the lines in a different order):

if fr(i)>4, fr(i)-=4


But it does change when mx = 4/3. The lines almost vanish, except for a tiny comet-like mark towards the upper right-hand corner:

if fr(i)>4/3, fr(i)-=4/3


When mx = 7/2, the graph of mx = 3|4 is back in a slightly different form:

if fr(i)>7/2, fr(i)-=7/2


And again with 7/3:

if fr(i)>7/3, fr(i)-=7/3


There’s a big change with 7/4, Most of the lines disappear:

if fr(i)>7/4, fr(i)-=7/4


And only the main lines appear with 9/5:

if fr(i)>9/5, fr(i)-=9/5


And so on till you try fr -= 2/f, as noted below:

if fr(i)>11/5, fr(i)-=11/5


if fr(i)>11/6, fr(i)-=11/6


if fr(i)>15/8, fr(i)-=15/8


if fr(i)>29/15, fr(i)-=29/15


Now try fr += 2/fr and fr += 3/fr. This is what happens:

fr += 2/fr; if fr(i)>3, fr(i)-=3


fr += 2/fr; if fr(i)>8/3, fr(i)-=8/3


fr += 2/fr; if fr(i)>11/4, fr(i)-=11/4


fr += 3/fr; if fr(i)>6, fr(i)-=6


And what about these graphs?




They’re created by seeding a sum, s, with a fraction, then adding more fractions < 1 whose numerators = 1,2,3… and whose denominators are the prime numbers 1, s -= 1. When s > 1, s -= 1. Then you take the fractional parts of s(i) and s(i+1) and graph (x,y) as above.


Post-Performative Post-Scriptum

The title of this post refers to Morbid Angel’s Formulas Fatal to the Flesh (1998). I’ve never heard it, but I like Morbid Angel’s alphabetically alliterative album-titles.