# Fibonacci Calculator

Created by Davide Borchia
Last updated: Jul 09, 2022

Discover the most elegant sequence in math with our Fibonacci calculator. Simple sums starting from an unremarkable pair of numbers originate one of the most recognizable sequences of numbers, with a deep connection to other fields of math and, surprisingly, with our sense of aesthetics.

Here you will learn:

• What is the Fibonacci sequence?
• How to jump-start the Fibonacci sequence;
• How to calculate the Fibonacci sequence from the beginning;
• The mathematical peculiarity of the Fibonacci sequence; and
• How to calculate any Fibonacci number — without having to calculate all the ones before: the formula for the Fibonacci sequence.

## What is the Fibonacci sequence?

A Fibonacci number $F_n$ is a number part of the Fibonacci sequence, in its $n^{\text{th}}$ position. The Fibonacci sequence is a sequence of numbers in which the number in each position is the result of the sum of the two numbers right before it.

## Where does the Fibonacci sequence start?

The Fibonacci sequence needs two numbers to start: kind of a bummer! However, the natural choice for them is $F_0=0$ and $F_1=1$. Knowing this, we can proceed with the computation of the following Fibonacci numbers.

And we stumble on the first peculiarity of this sequence right away: given the Fibonacci sequence formula, the next Fibonacci number we find is:

$F_2=F_0+F_1=0+1=1$

That is $F_1$. Luckily, meeting the same number does not do any harm: it actually starts the calculations for the Fibonacci sequence!

## How to calculate the Fibonacci sequence?

Now that you know how to start the Fibonacci sequence, let's take a look at its first terms. We find the Fibonacci numbers by hand, it's not complicated and only tedious after a while:

\begin{align*} F_0&=0\\ F_1&=1\\ F_2&=0+1=1\\ F_3&=1+1=2\\ F_4&=2+1=3\\ F_5&=3+2=5\\ F_6&=5+3=8\\ F_7&=8+5=13 \end{align*}

And so on. The sequence progresses this way:

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

As you can see, it quickly explodes, following exponential growth.

## Fibonacci numbers and the golden ratio

Fibonacci numbers are, unexpectedly, related to the golden ratio. The golden ratio is defined using a pair of numbers for which the following equality holds:

$\frac{a+b}{a}=\frac{a}{b}:=\varphi$

In words, we can say that the ratio of the sum and the bigger number equals the ratio of the bigger and the smaller number. We can solve this equation for $\varphi$, the golden ratio, first, invert the second term:

$\frac{1}{\varphi}=\frac{b}{a}$

Then substitute it in the first term:

$\frac{a+b}{a}=\frac{a}{a}+\frac{b}{a}=1+\frac{1}{\varphi}=\varphi$

We obtain a quadratic equation, with solution:

$\varphi=\frac{1+\sqrt{5}}{2}\simeq 1.618033...$

You know the Fibonacci numbers by now: their definition (sum of numbers to obtain the following element) kinda resembles the definition of the golden ratio. In fact, taking the limit of the Fibonacci sequence gives us the golden ratio:

$\lim_{n\to \infty} \frac{F_{n+1}}{F_n} = \varphi$

Not surprisingly, we can find a closed-form expression of the Fibonacci numbers in terms of the golden ratio:

$F_n=\frac{\varphi^n-(-\varphi)^{-n}}{\sqrt{5}}$

Humans like the golden ratio, and since time immemorial, artists and scientists have tried to find it or build it in their work. We like to see it where it isn't, as in Nature, that likes mathematics but not to the extent of following this elegant ratio, just approximating it.

Why do we like the golden ratio? No-one knows! Researchers supposed that it's an effect of evolution, and the proportion $1:\varphi$ are simply the easiest ones to grasp by our brain.

## Mathematical whirlpool: Fibonacci spirals

If you take all the Fibonacci numbers and start plotting them using the squares with sides of corresponding length, you will find a single way to pack them tightly: first two squares with side $1$, side by side. This creates a side with length $2$, since we just summed the previous two terms of the sequence. Place the $2\times 2$ square there, and you will find a $3\times 3$ square. The construction is similar to the one of the golden rectangle.

Here it is:

If you draw a spiraling line tangent in every external point of contact between two squares, you will find a logarithmic spiral. Keep on doing this for long enough, and you will find a good approximation of the golden spiral.

This is the supposed shape of the shell of Nautilus: the truth is that the shell follows a logarithmic spiral, not necessarily "golden".

Davide Borchia
F0 = 0, F1 = 1,
Fn = Fn-2 + Fn-1
n
People also viewed…