Unit 9, lesson 102

Recursive Sequences and the Fibonacci Sequence

How starting values and a rule that uses earlier terms define a sequence, how to generate its terms and the Fibonacci numbers, and why such a rule need not settle on a limit.

  • Theory part 203
  • Practice part 204
  • Sequences

Put 100 dollars in a jar and add 20 more every week. Nobody describes that jar with a formula in the week number. You say what it holds now and how next week’s amount comes from this week’s. Many sequences arise exactly like this, one step at a time from the terms before.

Key terms

Recursive rule

Definition A recursive rule, or recurrence relation, expresses each term of a sequence after the first few through earlier terms. A rule of order kk gives ana_n from the index nn and the kk terms just before it,

an=g(n,an−1,an−2,…,an−k)for every n≥n0+k,\begin{gathered} a_n = g(n, a_{n-1}, a_{n-2}, \dots, a_{n-k}) \\[0.4em] \text{for every } n \ge n_0 + k, \end{gathered}

where n0n_0 is the first index. At every step the rule has to produce a real number, so for instance it may never call for a division by 00.

In plain words A recursive rule tells you how to get the next term from the ones you already have. It says nothing about where to start.

Example If the jar holds ana_n dollars after nn weeks, its rule is an=an−1+20a_n = a_{n-1} + 20 for n≥1n \ge 1, a rule of order 11. Many books, and the calculus lessons, write the same rule one index higher, as an+1=an+20a_{n+1} = a_n + 20 for n≥0n \ge 0. A rule can also break down. Take a1=2a_1 = 2 and

an=1an−1−1for n≥2.a_n = \frac{1}{a_{n-1} - 1} \quad \text{for } n \ge 2.

Then a2=1a_2 = 1, and the next step asks for 1/01/0, so there is no a3a_3.

Initial value

Definition The initial values of a recursively defined sequence are the terms given directly, before the rule takes over. A rule of order kk needs kk initial values an0,an0+1,…,an0+k−1a_{n_0}, a_{n_0 + 1}, \dots, a_{n_0 + k - 1}. When these are given and the rule produces a real number at every step, exactly one sequence has these initial values and satisfies the rule.

In plain words The rule says how to take a step. The initial values say where you stand before the first step, and a different start gives a different sequence.

Example The jar starts with a0=100a_0 = 100, so its amounts are 100,120,140,160,…100, 120, 140, 160, \dots dollars. The table runs one rule, an=2an−1a_n = 2a_{n-1} for n≥2n \ge 2, from three different initial values.

Initial valueFirst five terms
a1=3a_1 = 33,6,12,24,483, 6, 12, 24, 48
a1=−1a_1 = -1−1,−2,−4,−8,−16-1, -2, -4, -8, -16
a1=0a_1 = 00,0,0,0,00, 0, 0, 0, 0

Generating terms

Definition To generate the terms of a recursively defined sequence of order kk, start from the kk initial values and apply the rule for n=n0+kn = n_0 + k, then n=n0+k+1n = n_0 + k + 1, and so on in order. Each new term needs only the kk most recent terms, but reaching ana_n this way requires every term before it.

In plain words Work forward one term at a time and keep the last few terms in view, as many as the rule looks back. There is no skipping ahead.

Example Take a1=1a_1 = 1, a2=3a_2 = 3 and an=an−1+2an−2a_n = a_{n-1} + 2a_{n-2} for n≥3n \ge 3. Each step uses the two latest terms and then forgets the older one.

nnTerms usedana_n
33a2=3a_2 = 3 and a1=1a_1 = 13+2⋅1=53 + 2 \cdot 1 = 5
44a3=5a_3 = 5 and a2=3a_2 = 35+2⋅3=115 + 2 \cdot 3 = 11
55a4=11a_4 = 11 and a3=5a_3 = 511+2⋅5=2111 + 2 \cdot 5 = 21
66a5=21a_5 = 21 and a4=11a_4 = 1121+2⋅11=4321 + 2 \cdot 11 = 43

Fibonacci recurrence

Definition The Fibonacci sequence is the sequence of order two given by

F1=1,F2=1,Fn=Fn−1+Fn−2for n≥3.\begin{gathered} F_1 = 1, \qquad F_2 = 1, \\[0.4em] F_n = F_{n-1} + F_{n-2} \quad \text{for } n \ge 3. \end{gathered}

Many texts also use F0=0F_0 = 0, which fits the same rule since F2=F1+F0F_2 = F_1 + F_0.

In plain words Start with two ones. From then on each number is the sum of the two before it.

Example The first twelve Fibonacci numbers are

1,1,2,3,5,8,13,21,34,55,89,144.1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.

The ratios of neighboring terms swing above and below one value and close in on it.

nn1122334455661010
Fn+1/FnF_{n+1} / F_n11221.51.51.6671.6671.61.61.6251.6251.6181.618

It can be shown that these ratios approach the golden ratio

1+52≈1.618034.\frac{1 + \sqrt{5}}{2} \approx 1.618034.

Explicit versus recursive description

Definition An explicit description gives ana_n as a formula in nn alone. A recursive description gives initial values and a rule in terms of earlier terms. Two descriptions define the same sequence when they agree at every index. An explicit formula fits a recursive description when it produces the initial values and turns the rule into an identity that holds for every nn the rule covers. These two checks prove that the formula gives every term, by mathematical induction.

In plain words An explicit formula lets you jump to any term. A recursive rule is often how the sequence actually arises, but you must walk to each term. When you have both, use whichever suits the question.

Example The rule a1=1a_1 = 1, an=an−1+2n−1a_n = a_{n-1} + 2n - 1 for n≥2n \ge 2 gives 1,4,9,16,251, 4, 9, 16, 25, which suggests an=n2a_n = n^2. The formula gives 12=11^2 = 1 at the start, and putting it into the right side of the rule gives

(n−1)2+2n−1=n2−2n+1+2n−1=n2,\begin{aligned} &(n - 1)^2 + 2n - 1 \\[0.4em] &\quad = n^2 - 2n + 1 + 2n - 1 \\[0.4em] &\quad = n^2, \end{aligned}

so it fits. Going the other way, the explicit formula bn=5⋅2nb_n = 5 \cdot 2^n for n≥0n \ge 0 has the recursive description b0=5b_0 = 5 and bn=2bn−1b_n = 2b_{n-1} for n≥1n \ge 1. The Fibonacci numbers have an explicit formula too, Binet’s formula

Fn=15[(1+52)n−(1−52)n].\begin{aligned} F_n = \frac{1}{\sqrt{5}}\Biggl[&\left(\frac{1 + \sqrt{5}}{2}\right)^n \\[0.8em] &\quad - \left(\frac{1 - \sqrt{5}}{2}\right)^n\Biggr]. \end{aligned}

It gives F10=55F_{10} = 55 exactly, although nothing in the simple rule hints at square roots.

Recursion alone does not guarantee convergence

Definition A sequence converges to a number LL when its terms get and stay as close to LL as you like once nn is large enough. The exact definition comes in the lesson on sequence behavior and limiting values. A recursive rule defines a sequence as long as every step is defined, but that sequence need not converge. It may grow without bound, swing back and forth, or repeat a cycle, and under one rule the outcome can depend on the initial value. For a rule an=g(an−1)a_n = g(a_{n-1}) where gg is a polynomial, or more generally a function continuous at LL, a sequence that converges to LL must have L=g(L)L = g(L). The converse is false, so a solution of L=g(L)L = g(L) does not show that the sequence converges.

In plain words Being able to compute terms forever does not mean they are heading anywhere. Solving L=g(L)L = g(L) only tells you where the sequence could settle, if it settles at all.

Example For the rule an=2an−1−1a_n = 2a_{n-1} - 1 with n≥2n \ge 2 the equation L=2L−1L = 2L - 1 has the single solution L=1L = 1.

Initial valueFirst five termsBehavior
a1=1a_1 = 11,1,1,1,11, 1, 1, 1, 1constant, converges to 11
a1=1.5a_1 = 1.51.5,2,3,5,91.5, 2, 3, 5, 9grows without bound
a1=0a_1 = 00,−1,−3,−7,−150, -1, -3, -7, -15decreases without bound

Only the start a1=1a_1 = 1 converges. Compare the rule

an=an−12+1for n≥2a_n = \frac{a_{n-1}}{2} + 1 \quad \text{for } n \ge 2

with a1=0a_1 = 0, which gives 0,1,1.5,1.75,1.8750, 1, 1.5, 1.75, 1.875 and does settle on 22. The convergence of sequences lesson in calculus makes this precise.

Check yourself

  1. Generate the first five terms of a1=2a_1 = 2, an=3an−1−2a_n = 3a_{n-1} - 2 for n≥2n \ge 2. Then check that an=3n−1+1a_n = 3^{n-1} + 1 fits this description.
Show the answer

The terms are 2,4,10,28,822, 4, 10, 28, 82. The formula gives 30+1=23^0 + 1 = 2 at the start, and

3(3n−2+1)−2=3n−1+1,3\left(3^{n-2} + 1\right) - 2 = 3^{n-1} + 1,

so it satisfies the rule as well.

  1. Find F12F_{12}, then add the first ten Fibonacci numbers. How does the sum compare with F12F_{12}?
Show the answer

From the list above F12=144F_{12} = 144. The sum is

1+1+2+3+5+8+13+21+34+55=143,\begin{aligned} &1 + 1 + 2 + 3 + 5 + 8 \\[0.4em] &\quad + 13 + 21 + 34 + 55 = 143, \end{aligned}

which is one less than F12F_{12}.

  1. Use the rule an=2−an−1a_n = 2 - a_{n-1} for n≥2n \ge 2 with a1=0a_1 = 0 and then with a1=1a_1 = 1. Which start gives a convergent sequence?
Show the answer

Starting at 00 gives 0,2,0,2,…0, 2, 0, 2, \dots, which keeps jumping and does not converge. Starting at 11 gives 1,1,1,…1, 1, 1, \dots, which converges to 11. The equation L=2−LL = 2 - L gives L=1L = 1 whatever the start, yet only one of the two starts settles there.

How this lesson connects

Where this leads in Calculus