Discrete Math & Number Theory · Fibonacci sequence

Fibonacci sequence

The Fibonacci sequence 1, 1, 2, 3, 5, 8, … starts with two 1s, and each later term is the sum of the two before it. The ratio of neighbouring terms approaches the golden ratio φ = (1 + √5)/2 ≈ 1.618, and so does any sequence built by the same rule from two positive numbers.

The Fibonacci sequence in this visualization

The Fibonacci sequence 1, 1, 2, 3, 5, 8, 13, … starts with two 1s, and each later term is the sum of the two before it. The same rule xk=xk−1+xk−2x_k = x_{k-1} + x_{k-2} can start from any two positive numbers x1=ax_1 = a and x2=bx_2 = b; from 2, 1 it gives the Lucas numbers (2, 1, 3, 4, 7, 11, …). Here you can build such a sequence as squares added to a rectangle, follow the ratio of neighbouring terms rk=xk/xk−1r_k = x_k / x_{k-1} as it closes in on the golden ratio φ, and see on a cobweb diagram why it gets there from any start.

The start is a rectangle a wide and b tall. Each new term is a square laid against a side as long as the newest term: a rectangle with sides xk−1x_{k-1} and xk−2x_{k-2} gains a square of side xk−1x_{k-1} and becomes xkx_k by xk−1x_{k-1}. So from the third term on, rkr_k is the long side over the short side: the rectangle’s shape. The picture keeps the rectangle the same size, so you watch its shape settle rather than its numbers grow.

A square changes the ratio by a fixed rule, rk+1=(xk+xk−1)/xk=1+1/rkr_{k+1} = (x_k + x_{k-1})/x_k = 1 + 1/r_k. A shape that a square leaves unchanged needs r=1+1/rr = 1 + 1/r, that is r2=r+1r^2 = r + 1, whose positive root is the golden ratio φ=(1+5)/2≈1.618\varphi = (1 + \sqrt5)/2 \approx 1.618. That is the golden rectangle: add a square and you get the same shape, φ times as large. The cobweb diagram draws the rule. From a ratio r, go up to the curve y=1+1/ry = 1 + 1/r to read the next ratio, then across to the diagonal y=ry = r to start the next step from it. Curve and diagonal cross at (φ, φ).

Why does the ratio alternate, and why does it arrive from every positive start? Since φ=1+1/φ\varphi = 1 + 1/\varphi, one step changes the gap to φ exactly by

The gap after one more square
rk+1−φ=−rk−φφ rkr_{k+1} - \varphi = -\frac{r_k - \varphi}{\varphi\, r_k}

The minus sign puts every ratio on the other side of φ from the one before, unless the start is exactly golden. From r3r_3 on every ratio is above 1, so each step multiplies the gap by less than 1/φ≈0.6181/\varphi \approx 0.618 and the gap shrinks to 0. Only the first step can move away: when r2=b/ar_2 = b/a is below 1/φ, the gap grows. Near φ the factor approaches −1/φ2≈−0.382-1/\varphi^2 \approx -0.382, the slope of the curve where it crosses the diagonal, so in the end each step leaves the gap about 0.382 times as large.

The terms themselves grow almost geometrically: each comes ever closer to φ times the one before. For the Fibonacci numbers F1=F2=1F_1 = F_2 = 1, Binet’s formula makes this exact:

Binet’s formula
Fn=φn−ψn5,ψ=1−52=−1φF_n = \frac{\varphi^n - \psi^n}{\sqrt5}, \qquad \psi = \frac{1 - \sqrt5}{2} = -\frac{1}{\varphi}

Because ∣ψ∣<1|\psi| < 1, FnF_n is the whole number nearest to φn/5\varphi^n/\sqrt5. On the eigenvector page the same two numbers appear as the eigenvalues of the matrix that takes one pair of neighbouring terms to the next.

Things to notice

  • A ratio equals φ only if the one before it did, because 1+1/r=φ1 + 1/r = \varphi exactly when r=φr = \varphi. So unless the start is golden, the ratio never reaches φ; it only comes closer. Neighbouring Fibonacci ratios differ by exactly 1/(FkFk−1)1/(F_k F_{k-1}).

Controls

  • Press or drag along the cobweb’s r axis to change b, and with it the start’s shape r2=b/ar_2 = b/a; b catches on whole numbers.

Related