User Tools

Site Tools

This is an old revision of the document!


The Fibonacci number or sequence is:

$1,\;1,\;2,\;3,\;5,\;8,\;13,\;21,\;34,\;55,\;89,\;144,\; \ldots\;$

Each number is the sum of the previous two numbers. In mathematical terms:

$F_n = F_{n-1} + F_{n-2}$


$F_1 = 1,\; F_2 = 1$

Recursive Algorithm

The recursive algorithm to calculate a fibonacci number is very simple and copied directly from the mathematics. Unfortunately it is very slow.

λ fibonacci-recursive

fibonacci.1360454712.txt.gz · Last modified: 2015/02/02 08:24 (external edit)