Key idea of this section
aₙ = c₁aₙ₋₁ + ⋯ + cd an−d, χ(t) = td − c₁td−1 − ⋯ − cd = ∏ (t − rᵢ)mᵢ ⟹ aₙ = ∑ᵢ Pᵢ(n) rᵢⁿ, deg Pᵢ < mᵢ
The structure theorem
A sequence (aₙ)ₙ≥₀ of complex numbers satisfies a linear recurrence of order d with constant coefficients if aₙ = c₁aₙ₋₁ + ⋯ + cd an−d for all n ≥ d, with cd ≠ 0. The solutions form a complex vector space V of dimension d, since a solution is determined freely by its initial values a₀, …, ad−1. The characteristic polynomial is χ(t) = td − c₁td−1 − ⋯ − cd.
Theorem 4.1. Suppose χ(t) = ∏ᵢ (t − rᵢ)mᵢ with distinct nonzero roots rᵢ. Then the sequences nʲ rᵢⁿ, for 0 ≤ j < mᵢ, form a basis of V. Equivalently, every solution has the form aₙ = ∑ᵢ Pᵢ(n) rᵢⁿ with Pᵢ a polynomial of degree less than mᵢ.
Proof. Let E be the shift operator (Ea)ₙ = aₙ₊₁ on the space of all sequences. Then V is the kernel of χ(E). Because the factors (E − rᵢ)mᵢ commute and are pairwise coprime polynomials in E, the kernel of their product is the direct sum of their kernels (by Bézout, write 1 = ∑ uᵢ(E) ∏ⱼ≠ᵢ (E − rⱼ)mⱼ and project). It remains to show that the kernel of (E − r)m has basis nʲ rⁿ, 0 ≤ j < m. Substituting aₙ = rⁿ bₙ, one checks ((E − r)a)ₙ = rⁿ⁺¹(bₙ₊₁ − bₙ) = rⁿ⁺¹(Δb)ₙ, so (E − r)m a = 0 if and only if Δm b = 0, i.e. bₙ is a polynomial in n of degree less than m. The sequences found are linearly independent (their total number is d = dim V, and they span by the direct-sum decomposition), so they form a basis. ∎
Fibonacci numbers and Binet's formula
For F₀ = 0, F₁ = 1, Fₙ = Fₙ₋₁ + Fₙ₋₂, the characteristic polynomial is t² − t − 1, with roots φ = (1 + √5)/2 and ψ = (1 − √5)/2. Solving for the constants with the initial values gives Binet's formula
Fₙ = (φⁿ − ψⁿ)/√5.
Because |ψ| < 1, Fₙ is the integer nearest to φⁿ/√5. Combinatorially, Fₙ₊₁ counts tilings of a 1 × n strip by squares and dominoes, i.e. compositions of n into parts 1 and 2; counting tilings with k dominoes gives the identity Fₙ₊₁ = ∑ₖ C(n − k, k).
A repeated root
Worked example 4.2. Solve aₙ = 4aₙ₋₁ − 4aₙ₋₂ with a₀ = 1, a₁ = 6. Here χ(t) = (t − 2)², so aₙ = (α + βn)2ⁿ. From a₀ = 1 we get α = 1, and from a₁ = 2(1 + β) = 6 we get β = 2. Thus aₙ = (2n + 1)2ⁿ. Check: a₂ = 4 · 6 − 4 · 1 = 20 = 5 · 4.
Inhomogeneous recurrences
If aₙ = c₁aₙ₋₁ + ⋯ + cd an−d + g(n), the general solution is a particular solution plus the general homogeneous solution. When g(n) = Q(n) sⁿ with Q a polynomial, one tries a particular solution R(n) sⁿ with deg R = deg Q, multiplied by nm when s is a root of χ of multiplicity m (resonance). The justification is the annihilator method: (E − s)deg Q + 1 kills g, so a satisfies a homogeneous recurrence whose characteristic polynomial is χ(t)(t − s)deg Q + 1, and Theorem 4.1 applies.
Worked example 4.3. Solve aₙ = 3aₙ₋₁ + 2ⁿ with a₀ = 0. Try c·2ⁿ: c·2ⁿ = 3c·2ⁿ⁻¹ + 2ⁿ gives c = 3c/2 + 1, so c = −2. Hence aₙ = α3ⁿ − 2ⁿ⁺¹, and a₀ = 0 forces α = 2: aₙ = 2·3ⁿ − 2ⁿ⁺¹. Check: a₁ = 2, a₂ = 3·2 + 4 = 10 = 18 − 8.
Domino tilings of a 3 × n board
Let aₙ be the number of domino tilings of a 3 × n rectangle and bₙ the number of tilings of a 3 × n rectangle with one corner cell removed. Examining the leftmost column gives aₙ = aₙ₋₂ + 2bₙ₋₁ and bₙ = aₙ₋₁ + bₙ₋₂. Eliminating b yields aₙ = 4aₙ₋₂ − aₙ₋₄ for even n, with a₀ = 1, a₂ = 3, so a₄ = 11, a₆ = 41, a₈ = 153, and aₙ = 0 for odd n. The characteristic polynomial λ⁴ − 4λ² + 1 has roots with λ² = 2 ± √3, so aₙ grows like a constant times (2 + √3)n/2.
Exercise
- (a)Solve aₙ = aₙ₋₁ + 6aₙ₋₂ with a₀ = 2, a₁ = 1.
- (b)Solve aₙ = 6aₙ₋₁ − 9aₙ₋₂ with a₀ = 1, a₁ = 6.
- (c)Solve aₙ = 2aₙ₋₁ + 3ⁿ with a₀ = 1.
Show solution
Answers: (a) Roots 3 and −2; aₙ = 3ⁿ + (−2)ⁿ. (b) Double root 3; aₙ = (n + 1)3ⁿ. (c) A particular solution is 3ⁿ⁺¹; then aₙ = 3ⁿ⁺¹ + α2ⁿ with 3 + α = 1, so aₙ = 3ⁿ⁺¹ − 2ⁿ⁺¹.