The Palindrome

The Palindrome

The non-recursive formula for Fibonacci numbers

(via the magic of power series and generating functions)

Tivadar Danka's avatar
Tivadar Danka
Feb 07, 2023
∙ Paid

The Fibonacci numbers form one of the most famous integer sequences, known for their intimate connection to the golden ratio, sunflower spirals, mating habits of rabbits, and several other things.

By definition, the Fibonacci numbers are defined by a simple second-order recursion.

The Fibonacci sequence
The Fibonacci sequence

This is usually also the example illustrating that recursive functions are not always a good idea in computing.

For instance, consider the following function. (It is written in Python, but it is easy to translate to other programming languages.)

User's avatar

Continue reading this post for free, courtesy of Tivadar Danka.

Or purchase a paid subscription.
© 2025 Tivadar Danka · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture