What Is the Fibonacci Sequence?
By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.
The Fibonacci sequence is a list of numbers where each one is the sum of the two before it: 1, 1, 2, 3, 5, 8, 13, 21 and onwards. It genuinely appears in some parts of nature and is genuinely connected to the golden ratio, and it is also the subject of a great deal of exaggeration.
The rule, and where it came from
The rule is simply that each term equals the sum of the previous two. Starting from 1 and 1 gives 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 and so on, growing steadily faster.
It reached European mathematics through Leonardo of Pisa, known as Fibonacci, in a book published in 1202, where it appeared as a puzzle about breeding rabbits. The sequence was already known in Indian mathematics centuries earlier, in the context of counting patterns of long and short syllables in poetry.
The connection to the golden ratio
Divide any Fibonacci number by the one before it and the answer gets closer and closer to about 1.618, the golden ratio. The further along the sequence you go, the more precise the approximation becomes.
This is a real mathematical property with a proof behind it, not a coincidence or a mystical claim. It follows directly from the structure of the recurrence relation that defines the sequence.
Where it genuinely appears in nature
Some of the natural examples hold up well:
- •The number of spirals in a sunflower head is usually a Fibonacci number
- •Pine cones and pineapples show Fibonacci spiral counts
- •The arrangement of leaves around a stem often follows Fibonacci fractions
- •Many flowers have petal counts of 3, 5, 8, 13 or 21
Why plants do this
The reason is not mystical. Leaves and seeds grow at a consistent angle from the previous one, and an angle related to the golden ratio packs them most efficiently without any two lining up and shading each other.
The Fibonacci numbers appear because they emerge naturally from that packing process. This has been modelled mathematically and reproduced in physical experiments, so the mechanism is understood rather than merely observed.
Where the claims go too far
A lot of popular material about Fibonacci is unreliable. The claim that nautilus shells follow a golden spiral is not supported by measurement, since their growth ratio is typically nowhere near 1.618.
Claims about the golden ratio in the Parthenon, the pyramids and Renaissance paintings usually rely on selectively chosen measurement points, and there is no documentary evidence the builders used it. Similar caution applies to claims about stock markets and human faces. The genuine mathematics is interesting enough without the additions.
Where it appears in computing
The sequence has practical uses beyond curiosity. Fibonacci numbers appear in the analysis of certain algorithms and data structures, including Fibonacci heaps, which are used in some shortest path implementations.
Fibonacci search is a technique for locating a value in a sorted array using only addition and subtraction, which was useful on hardware where division was expensive. The sequence also serves as the standard teaching example for recursion, since its definition is naturally recursive, and as the standard demonstration of why naive recursion without memoisation can be catastrophically slow.
Converting miles to kilometres with Fibonacci
Here is a genuinely handy use of the sequence. One mile is about 1.609 kilometres, which happens to be close to the golden ratio of about 1.618. Because the ratio between neighbouring Fibonacci numbers approaches the golden ratio, each Fibonacci number in miles is roughly the next one in kilometres. Five miles is about eight kilometres, eight miles is about thirteen, and thirteen miles is about twenty-one. The real values are 8.05, 12.87 and 20.92 kilometres, so the shortcut is accurate to within about one percent.
For numbers that are not in the sequence, you can split them into Fibonacci numbers first. A result called Zeckendorf's theorem says every positive whole number can be written as a sum of Fibonacci numbers with no two neighbours used together. Thirty miles, for example, is 21 plus 8 plus 1. Shift each part up one place in the sequence to get 34 plus 13 plus 2, which is 49 kilometres. The true answer is about 48.3 kilometres. Running the trick backwards, shifting each part down one place, converts kilometres to miles.
Counting staircases and a vanishing square
A simple counting puzzle shows why the sequence keeps appearing. Suppose you climb a staircase taking either one step or two at a time. A staircase of one step can be climbed in 1 way, two steps in 2 ways and three steps in 3 ways. For four steps, your first move is either a single step, leaving three steps and 3 ways to finish, or a double step, leaving two steps and 2 ways. That gives 5 ways, and every longer staircase follows the same addition rule. The old Indian problem of combining short and long syllables in poetry is exactly the same puzzle in disguise.
The sequence also powers a famous geometric trick. Cut an 8 by 8 square, with an area of 64, into two triangles and two trapezoids using the lengths 3, 5 and 8, then rearrange them into a 5 by 13 rectangle. The rectangle seems to have an area of 65, so a square appears from nowhere. The extra unit hides in a long, thin gap along the diagonal, where the pieces do not quite line up because their slopes differ very slightly. The trick works because for any three Fibonacci numbers in a row, the outer two multiplied together always differ from the middle one squared by exactly 1.
The rabbit puzzle, and a formula that skips the adding
In Fibonacci's book the puzzle runs roughly like this. Someone places a pair of rabbits in an enclosure. Each pair produces a new pair every month, a newborn pair starts breeding from its second month, and no rabbit ever dies. The counts follow the sequence for a neat reason: the pairs alive this month are all the pairs alive last month, since none die, plus one new pair for every pair old enough to breed, which is everyone alive two months ago. Fibonacci's own table reaches 377 pairs after a year, though real rabbits obviously ignore such tidy rules.
You do not need to add your way along the list to find a distant term. A formula usually credited to the nineteenth-century French mathematician Jacques Binet gives any Fibonacci number directly. In its simplest practical form, raise the golden ratio, about 1.618, to the power n, divide by the square root of 5, and round to the nearest whole number. For n equal to 10, 1.618 to the power 10 is about 123, and dividing by about 2.236 gives about 55, the tenth term. The formula also shows why each term is roughly 1.618 times the one before.
The takeaway
The Fibonacci sequence adds each pair of terms to get the next, its ratios approach the golden ratio, and it appears in plant growth for a well understood packing reason, while many popular claims about it in art and architecture do not survive scrutiny.