math.wiki
Logic, proof and discrete math › Recurrence relations › Two-term recurrences with a repeated root
Open on the map
Discrete Mathematics and Proof

Two-term recurrences with a repeated root

When the characteristic equation of a two-term rule has only one root, the method of two powers has only one power to work with. What takes the place of the missing one?

Where you are 6 in Recurrence relations

When you reach for it

The rule

a_n = c_1 a_{n-1} + c_2 a_{n-2} \quad (n \ge 2), \qquad c_2 \ne 0,

has characteristic equation x^2 - c_1 x - c_2 = 0, as in Solving and checking a two-term recurrence (written here in the letter x, so that r can name the root). Its discriminant is c_1^2 + 4c_2 (The discriminant and the number of real solutions). When that is 0, the equation has only one root, a double root (or repeated root) \displaystyle r = \frac{c_1}{2}, and the quadratic is (x - r)^2 = x^2 - 2rx + r^2. Comparing coefficients, c_1 = 2r and c_2 = -r^2. So every rule with a double root has the form

a_n = 2r\,a_{n-1} - r^2 a_{n-2},

with r \ne 0 because c_2 \ne 0. The distinct-roots theorem of Solving and checking a two-term recurrence needs two different roots, so it says nothing about these rules. Reach for this move whenever c_1^2 + 4c_2 = 0, as in a_n = 6a_{n-1} - 9a_{n-2}, where 6^2 + 4(-9) = 0 and x^2 - 6x + 9 = (x - 3)^2.

The procedure

One power is not enough

The sequence r^n is still a solution, since r is a characteristic root. But the family the distinct-roots method would write, Ar^n + Br^n = (A + B)r^n, has only one free constant, C = A + B. At n = 0 and n = 1 it gives a_0 = C and a_1 = Cr, so it fits only those starting values with a_1 = r\,a_0. For a_n = 6a_{n-1} - 9a_{n-2} with a_0 = 2 and a_1 = 9 it would need 9 = 3 \cdot 2, which is false. A second solution, not a multiple of r^n, is needed.

The second solution

Claim. If r is a double root, then t_n = n\,r^n is a solution.

Proof. Let n \ge 2. Using c_1 = 2r and c_2 = -r^2,

\begin{aligned} c_1 t_{n-1} + c_2 t_{n-2} &= 2r(n-1)r^{n-1} - r^2(n-2)r^{n-2} \\ &= r^n\big(2(n-1) - (n-2)\big) \\ &= n\,r^n = t_n. \end{aligned}

\square

Both facts about the double root were used: c_2 = -r^2 makes every term a multiple of r^n, and the 2 in c_1 = 2r makes 2(n-1) - (n-2) come out to exactly n. For a root that is not double, n\,r^n is not a solution (Exercise 13).

The theorem

By the combination fact of Solving and checking a two-term recurrence, Ar^n + Bnr^n = (A + Bn)r^n is a solution for any constants A and B.

Theorem (double root). Suppose the characteristic equation of a_n = c_1 a_{n-1} + c_2 a_{n-2}, with c_2 \ne 0, has a double root r. Then for every solution (a_n) there is exactly one pair of constants A, B with

a_n = (A + Bn)\,r^n \quad \text{for every } n \ge 0.

Proof. Let (a_n) be a solution. Any pair that works must fit n = 0 and n = 1:

A = a_0, \qquad (A + B)\,r = a_1.

Since r \ne 0, these force A = a_0 and \displaystyle B = \frac{a_1}{r} - a_0, so at most one pair works. Let b_n = (A + Bn)r^n with this pair. Then (b_n) is a solution, and b_0 = a_0, b_1 = a_1. We prove a_n = b_n for every n \ge 0 by Strong induction and well-ordering. The cases n = 0 and n = 1 hold. Let n \ge 2 and assume a_k = b_k for every k < n. Both sequences obey the rule, so

a_n = c_1 a_{n-1} + c_2 a_{n-2} = c_1 b_{n-1} + c_2 b_{n-2} = b_n.

Hence a_n = b_n for every n \ge 0. \square

This is the distinct-roots proof with n\,r^n in place of the second power. Only the two equations for A and B changed, and they can be solved because r \ne 0. A formula found any other way is checked exactly as in Solving and checking a two-term recurrence: two base cases and the identity f(n) = c_1 f(n-1) + c_2 f(n-2), then strong induction.

Why the factor n appears (intuition, not proof)

Picture a nearby rule whose roots r and s are different but close. By the distinct-roots theorem, \displaystyle \frac{1}{s - r}s^n - \frac{1}{s - r}r^n solves that rule, and for n \ge 1

\frac{s^n - r^n}{s - r} = s^{n-1} + s^{n-2}r + \dots + r^{n-1}.

The right side has n terms, each tending to r^{n-1} as s approaches r, so this solution tends to n\,r^{n-1}, and r times it to n\,r^n. As the two roots merge, r^n and s^n become the same solution, but their difference quotient survives as a new one. This is a picture, not a proof: a limit of solutions of other rules is not automatically a solution of this one. The substitution above is the proof. Exercises 7 and 10 put numbers on the picture.

Rules that look back three places

For a_n = c_1 a_{n-1} + c_2 a_{n-2} + c_3 a_{n-3} the characteristic equation is the cubic x^3 - c_1 x^2 - c_2 x - c_3 = 0. If it is (x - r)^3 = 0, a triple root, then every solution has the form

a_n = (A + Bn + Cn^2)\,r^n,

with A, B, C fixed by three starting values. This is stated here without proof. The pattern continues: a root repeated m times brings r^n, n\,r^n, \dots, n^{m-1}r^n.

Worked examples

Example 1

A double root at 3

Solve a_n = 6a_{n-1} - 9a_{n-2} with a_0 = 2 and a_1 = 9, and find a_{10}.

Solution

The characteristic equation x^2 - 6x + 9 = 0 is (x - 3)^2 = 0, with the double root 3. As shown above, C \cdot 3^n cannot fit these starting values, since 9 \ne 3 \cdot 2. By the theorem a_n = (A + Bn)3^n, and the starting values give

A = 2, \qquad 3(A + B) = 9.

So A + B = 3 and B = 1:

a_n = (n + 2)\,3^n \quad \text{for every } n \ge 0.

Check. The rule gives a_2 = 6 \cdot 9 - 9 \cdot 2 = 36 and a_3 = 6 \cdot 36 - 9 \cdot 9 = 135; the formula gives 4 \cdot 9 = 36 and 5 \cdot 27 = 135. Then a_{10} = 12 \cdot 3^{10}, which is 12 \cdot 59{,}049 = 708{,}588. Each term is \displaystyle \frac{3(n+2)}{n+1} times the one before: a little more than three times, by a margin that shrinks.

Example 2

A sequence that rises and then falls

Solve 4a_n = 4a_{n-1} - a_{n-2} with a_0 = 0 and a_1 = 1, and find its largest terms.

Solution

Dividing by 4, \displaystyle a_n = a_{n-1} - \frac{1}{4}a_{n-2}, so c_1 = 1, \displaystyle c_2 = -\frac{1}{4} and c_1^2 + 4c_2 = 0. The characteristic equation \displaystyle x^2 - x + \frac{1}{4} = \left(x - \frac{1}{2}\right)^2 = 0 has the double root \displaystyle \frac{1}{2}. With \displaystyle a_n = (A + Bn)\left(\frac{1}{2}\right)^n, the starting values give A = 0 and \displaystyle \frac{B}{2} = 1, so B = 2 and

a_n = \frac{2n}{2^n} = \frac{n}{2^{n-1}}.

The terms are \displaystyle 0, 1, 1, \frac{3}{4}, \frac{1}{2}, \frac{5}{16}, and the rule agrees: \displaystyle a_3 = 1 - \frac{1}{4} = \frac{3}{4}. To compare neighbors, for n \ge 1

\frac{a_{n+1}}{a_n} = \frac{n + 1}{2n},

which is 1 at n = 1 and at most \displaystyle \frac{3}{4} for n \ge 2, since \displaystyle n + 1 \le \frac{3}{2}n there. So a_1 = a_2 = 1 are the largest terms. After that each term is at most \displaystyle \frac{3}{4} of the one before, so \displaystyle a_n \le \left(\frac{3}{4}\right)^{n-2} for n \ge 2, and the terms fall toward 0.

0 0.5 1 0 1 2 3 4 5 6 7 8 9 10 n
\displaystyle a_n = \frac{n}{2^{n-1}}
Figure 1The terms a_n = n/2^{n-1} of Example 2. The factor n lifts them for two steps before the factor \displaystyle \left(\frac{1}{2}\right)^n takes over for good.
Example 3

A negative double root

Solve a_n = -4a_{n-1} - 4a_{n-2} with a_0 = 3 and a_1 = 2, and describe the signs of the terms.

Solution

Here c_1^2 + 4c_2 = 16 - 16 = 0, and x^2 + 4x + 4 = (x + 2)^2, so the double root is -2; indeed c_1 = 2(-2) and c_2 = -(-2)^2. With a_n = (A + Bn)(-2)^n,

A = 3, \qquad -2(A + B) = 2,

so A + B = -1, B = -4, and

a_n = (3 - 4n)(-2)^n.

The terms are 3, 2, -20, 72, -208, 544; the rule gives a_2 = -8 - 12 = -20 and a_3 = 80 - 8 = 72. For n \ge 1 the factor 3 - 4n is negative, so a_n has the sign opposite to (-2)^n: positive for odd n, negative for even n \ge 2. The terms alternate in sign from n = 1 on, yet a_0 and a_1 are both positive, because the factor A + Bn changed sign between them. A linear factor changes sign at most once, so it can break the alternation only once.

Example 4

Fennimore’s growing deposits

Fennimore opens a savings account with \$2000. At the end of each year the account pays 5\% interest, and then he deposits 5\% more than his previous deposit, so the deposit in year n is 2000(1.05)^n dollars. Let b_n be the balance just after the deposit in year n, so b_0 = 2000. Find a two-term rule for b_n, solve it, and find the first year in which the balance passes \$50{,}000.

Solution

The balance obeys b_n = 1.05\,b_{n-1} + D_n with D_n = 2000(1.05)^n, which is not of our form because of the added D_n. But D_n = 1.05\,D_{n-1}, so for n \ge 2

b_n - 1.05\,b_{n-1} = 1.05\,(b_{n-1} - 1.05\,b_{n-2}),

that is,

b_n = 2.1\,b_{n-1} - 1.1025\,b_{n-2},

with b_0 = 2000 and b_1 = 2100 + 2100 = 4200. Here c_1 = 2(1.05) and c_2 = -(1.05)^2: a double root at 1.05. So b_n = (A + Bn)(1.05)^n with A = 2000 and 1.05(A + B) = 4200, which give A + B = 4000, B = 2000, and

b_n = 2000\,(n + 1)(1.05)^n.

The formula can be read directly: the deposit of year k, 2000(1.05)^k, earns interest for n - k years and is worth 2000(1.05)^n, and there are n + 1 deposits. The balance passes \$50{,}000 when (n + 1)(1.05)^n > 25. Since 13(1.05)^{12} \approx 23.35 and 14(1.05)^{13} \approx 26.40, the first such year is n = 13, with b_{13} \approx \$52{,}798.18.

The double root is no accident: interest and deposits grow at the same rate. With different rates the roots differ (Exercise 7).

Example 5

A solution with a zero

A sequence obeys a_n = 8a_{n-1} - 16a_{n-2} for n \ge 2, with a_3 = 0 and a_4 = 256. Find a_0 and a_1. Then prove that a solution of a double-root rule that is not zero at every n is zero for at most one n.

Solution

Since c_2 \ne 0 the rule runs backward, \displaystyle a_{n-2} = \frac{8a_{n-1} - a_n}{16}, so a_3 and a_4 fix every earlier term, and the theorem applies to the sequence they fix. The characteristic equation x^2 - 8x + 16 = (x - 4)^2 = 0 has the double root 4, so a_n = (A + Bn)4^n. The values at n = 3 and n = 4 give

64(A + 3B) = 0, \qquad 256(A + 4B) = 256.

So A = -3B and A + 4B = 1, giving B = 1, A = -3 and a_n = (n - 3)4^n. Hence a_0 = -3 and a_1 = -8. Running the rule forward checks it: a_2 = -64 + 48 = -16, a_3 = -128 + 128 = 0 and a_4 = 0 + 256 = 256.

Proof. Let a_n = (A + Bn)r^n with r \ne 0, and suppose a_j = a_k = 0 with j \ne k. Since r^j \ne 0 and r^k \ne 0, both A + Bj = 0 and A + Bk = 0. Subtracting, B(j - k) = 0, so B = 0, and then A = 0: a_n = 0 for every n. \square

Distinct roots allow more zeros: (-1)^n + 1 obeys a_n = a_{n-2}, whose roots are 1 and -1, and it is zero at every odd n.

Boundaries

  • A double root only. The form (A + Bn)r^n is for c_1^2 + 4c_2 = 0. With two different roots n\,r^n is not a solution (Exercise 13), and the distinct-roots theorem applies.
  • c_2 \ne 0. It makes r \ne 0, which the proof needs to find B. If c_2 = 0 the rule looks back only one place.
  • Real coefficients give a real double root, namely \displaystyle \frac{c_1}{2}. Complex roots of a real quadratic always come as two different roots.
  • No added term. A rule such as a_n = 2r\,a_{n-1} - r^2 a_{n-2} + d is not homogeneous, and this lesson does not treat it. Example 4 removed an added term only because that term was itself geometric.
  • Three places back a triple root brings (A + Bn + Cn^2)r^n, stated here without proof.

Where this goes next

This finishes the two-term rules with constant coefficients: the characteristic equation has two different roots or one double root, and each case now has its theorem. The same pattern returns in differential equations, where y'' - 2ry' + r^2 y = 0 is solved by e^{rx} and x\,e^{rx}, with the same merging-roots picture behind it. In linear algebra, the matrix that steps (a_{n-1}, a_n) to (a_n, a_{n+1}) has a repeated eigenvalue but cannot be diagonalized, and the factor n comes out of its powers. The ratio argument of Exercise 14 is another use of Convergence of sequences.

Exercises

Solving with a double root

  1. Solve a_n = 10a_{n-1} - 25a_{n-2} with a_0 = 3 and a_1 = 20.
  2. Solve a_n = 14a_{n-1} - 49a_{n-2} with a_0 = 0 and a_1 = 7.
  3. Solve a_n = -6a_{n-1} - 9a_{n-2} with a_0 = 1 and a_1 = 0.
  4. Solve 9a_n = 6a_{n-1} - a_{n-2} with a_0 = 2 and a_1 = 2, and show that a_n approaches 0.
  5. A sequence has a_1 = 12, a_2 = 108 and a_n = 12a_{n-1} - 36a_{n-2} for n \ge 3. Find a closed formula valid for n \ge 1.
  6. Solve a_n = -12a_{n-1} - 36a_{n-2} with a_0 = -2 and a_1 = 6, and describe the signs of the terms.

Settings, limits and three places back

  1. Change Example 4 so that Fennimore’s deposits rise 3\% a year while the account still pays 5\%: the deposit in year n is 2000(1.03)^n, and b_0 = 2000. Find a two-term rule for b_n, its characteristic roots, and a closed formula.
  2. For which numbers c does a_n = c\,a_{n-1} - 81a_{n-2} have a double characteristic root? Give the root in each case.
  3. The rule a_n = 9a_{n-1} - 27a_{n-2} + 27a_{n-3} has characteristic equation (x - 3)^3 = 0. Using the form stated for a triple root, solve it with a_0 = 1, a_1 = 6 and a_2 = 45, and check a_3 against the rule.
  4. Compute \displaystyle \frac{s^4 - 3^4}{s - 3} for s = 3.1 and for s = 3.01, and compare with 4 \cdot 3^3.

Reasoning

  1. A sequence has a_0 = 2, a_1 = 6 and 4a_n = 12a_{n-1} - 9a_{n-2} for n \ge 2. Prove by induction, without solving, that \displaystyle a_n = \frac{(n + 1)\,3^n}{2^{n-1}} for every n \ge 0.
  2. Show that n^2\,5^n does not obey a_n = 10a_{n-1} - 25a_{n-2}, although 5^n and n\,5^n do.
  3. Let r \ne 0. Prove that n\,r^n obeys a_n = c_1 a_{n-1} + c_2 a_{n-2} only if c_1 = 2r and c_2 = -r^2, that is, only if r is a double root.
  4. Let a_n = (A + Bn)r^n with r \ne 0 and B \ne 0. Prove that a_{n+1}/a_n approaches r.
  5. Let r be a double root and d_n = a_n - r\,a_{n-1} for n \ge 1. Show that d_n = r\,d_{n-1} for n \ge 2, and deduce that a_n / r^n is an arithmetic sequence. This is a second proof of the theorem.
Answers
  1. a_n = (n + 3)5^n. The double root is 5; A = 3 and 5(3 + B) = 20 give B = 1.
  2. a_n = n\,7^n. The double root is 7; A = 0 and 7B = 7.
  3. a_n = (1 - n)(-3)^n. Here x^2 + 6x + 9 = (x + 3)^2; A = 1 and -3(1 + B) = 0 give B = -1. The terms are 1, 0, -9, 54.
  4. \displaystyle a_n = \frac{4n + 2}{3^n}. The equation 9x^2 - 6x + 1 = (3x - 1)^2 = 0 has the double root \displaystyle \frac{1}{3}; A = 2 and \displaystyle \frac{2 + B}{3} = 2 give B = 4. For n \ge 1, \displaystyle \frac{a_{n+1}}{a_n} = \frac{4n + 6}{3(4n + 2)} \le \frac{5}{9}, so \displaystyle a_n \le 2\left(\frac{5}{9}\right)^{n-1} and a_n \to 0.
  5. a_n = (n + 1)6^n. The double root is 6; n = 1, 2 give 6(A + B) = 12 and 36(A + 2B) = 108, so A + B = 2, A + 2B = 3, B = 1, A = 1. Check: a_3 = 1296 - 432 = 864 = 4 \cdot 216.
  6. a_n = (n - 2)(-6)^n. The double root is -6; A = -2 and -6(-2 + B) = 6 give B = 1. The terms are -2, 6, 0, -216, 2592: a_0 < 0, a_1 > 0, a_2 = 0, and from n = 3 on the sign is that of (-6)^n, positive for even n and negative for odd n.
  7. b_n - 1.05\,b_{n-1} = 1.03(b_{n-1} - 1.05\,b_{n-2}), so b_n = 2.08\,b_{n-1} - 1.0815\,b_{n-2}, with b_0 = 2000 and b_1 = 2100 + 2060 = 4160. The roots are 1.05 and 1.03. From A + B = 2000 and 1.05A + 1.03B = 4160, 0.02A = 2100, so A = 105{,}000, B = -103{,}000:
\begin{aligned} b_n &= 105{,}000(1.05)^n - 103{,}000(1.03)^n \\ &= 2000\,\frac{(1.05)^{n+1} - (1.03)^{n+1}}{1.05 - 1.03}. \end{aligned}

As the 3\% rises toward 5\%, this difference quotient tends to 2000(n + 1)(1.05)^n. 8. A double root needs c^2 + 4(-81) = 0, so c = 18 (root 9) or c = -18 (root -9). 9. a_n = (1 + n^2)3^n. With a_n = (A + Bn + Cn^2)3^n: A = 1, 3(1 + B + C) = 6 and 9(1 + 2B + 4C) = 45, so B + C = 1 and B + 2C = 2, giving C = 1, B = 0. The rule gives a_3 = 405 - 162 + 27 = 270 = 10 \cdot 27. 10. For s = 3.1: \displaystyle \frac{92.3521 - 81}{0.1} = 113.521. For s = 3.01: \displaystyle \frac{82.08541201 - 81}{0.01} = 108.541201. Both approach 4 \cdot 3^3 = 108, since the quotient is s^3 + 3s^2 + 9s + 27. 11. Proof. Let \displaystyle f(n) = 2(n + 1)\left(\frac{3}{2}\right)^n, which equals the given formula. Then f(0) = 2 and f(1) = 6. For n \ge 2,

\begin{aligned} 12f(n-1) - 9f(n-2) &= \left(\tfrac{3}{2}\right)^{n-2}(36n - 18n + 18) \\ &= 8(n + 1)\left(\tfrac{3}{2}\right)^n = 4f(n). \end{aligned}

Strong induction, as in the theorem, finishes it. \square 12. Substituting n^2 5^n into the right side gives

\begin{aligned} &10(n-1)^2 5^{n-1} - 25(n-2)^2 5^{n-2} \\ &= 5^n\big(2(n-1)^2 - (n-2)^2\big) = 5^n(n^2 - 2), \end{aligned}

never n^2 5^n. The double root is 5, so 5^n and n\,5^n are solutions by the claim. 13. Proof. Suppose n\,r^n obeys the rule. For n \ge 2, dividing n\,r^n = c_1(n-1)r^{n-1} + c_2(n-2)r^{n-2} by r^{n-2} gives n(r^2 - c_1 r - c_2) + (c_1 r + 2c_2) = 0. This holds at n = 2 and n = 3; subtracting, r^2 - c_1 r - c_2 = 0, and then c_1 r = -2c_2. So r^2 = c_1 r + c_2 = -c_2, giving c_2 = -r^2 and \displaystyle c_1 = \frac{2r^2}{r} = 2r. \square 14. Proof. Since B \ne 0, A + Bn = 0 for at most one n; beyond it, \displaystyle \frac{a_{n+1}}{a_n} = r\left(1 + \frac{B}{A + Bn}\right). As |A + Bn| \to \infty, the fraction tends to 0, so the ratio tends to r. \square For Example 1 the ratios \displaystyle \frac{a_{n+1}}{a_n} = \frac{3(n+3)}{n+2} tend to 3, but slowly: the gap is \displaystyle \frac{3}{n+2}, while for distinct roots of different sizes the gap shrinks geometrically. 15. Proof. With c_1 = 2r and c_2 = -r^2, a_n - r\,a_{n-1} = r\,a_{n-1} - r^2 a_{n-2}, which is r(a_{n-1} - r\,a_{n-2}), so d_n = r\,d_{n-1} and d_n = d_1 r^{n-1}. Dividing a_n - r\,a_{n-1} = d_1 r^{n-1} by r^n gives \displaystyle \frac{a_n}{r^n} - \frac{a_{n-1}}{r^{n-1}} = \frac{d_1}{r}, a constant. So \displaystyle \frac{a_n}{r^n} = a_0 + \frac{d_1}{r}n and a_n = (A + Bn)r^n with A = a_0 and \displaystyle B = \frac{a_1 - r\,a_0}{r} = \frac{a_1}{r} - a_0, as in the theorem. \square

kg1128 · updated 2026-10-22 · CC-BY-SA-4.0