The Palindrome

The Palindrome

Share this post

The Palindrome
The Palindrome
The non-recursive formula for Fibonacci numbers
Copy link
Facebook
Email
Notes
More

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
19

Share this post

The Palindrome
The Palindrome
The non-recursive formula for Fibonacci numbers
Copy link
Facebook
Email
Notes
More
1
Share

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.)

Keep reading with a 7-day free trial

Subscribe to The Palindrome to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Tivadar Danka
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More