A recurrence relation for a sequence \(\seq{a_n}{n}\) is an equation that expresses \(a_n\) in terms of one or more of the previous terms of the sequence.
Suppose we deposit \(P_0\) dollars in a savings account that yields 3% interest per year, compounded annually. Find a formula for the amount in the account after \(n\) years.
Suppose \(\seq{a_n}{n}\) is a sequence that satisfies the recurrence relation \(a_n = -a_{n - 1} + 1\) for \(n = 1, 2, 3, \dots\text{,}\) and suppose \(a_0 = 2\text{.}\)
We call a solution \(\seq{a_n}{n}\) to a recurrence relation a closed formula if the expression for \(a_n\) can be evaluated in a fixed finite number of operations on \(n\text{.}\)
Is \(\seq{a_n}{n}\text{,}\) where \(a_n = 3n\) for \(n = 0, 1, 2, \dots\) a solution of the recurrence relation \(a_n = 2a_{n - 1} - a_{n - 2}\) for \(n = 2,3, \dots\) ?
Note: It is easy to check that the sequence \(\seq{b_n}{n}\text{,}\) defined by \(b_n = 5\) for \(n = 0, 1, 2, \dots\) is also a solution of the recurrence relation. In particular, a recurrence relation can have more than one solution.
Example2.4.3.6.Factorial as the solution of a recurrence relation.
The sequence \(\seq{a_n}{n}\) defined by \(a_n = n!\) for \(n = 1, 2, 3,\dots\) is a solution to the recurrence relation \(a_n = n a_{n - 1}\text{,}\) since \(n! = n((n - 1)!)\text{.}\)
The Fibonacci sequence \(f_0, f_1, f_2, \dots\) is defined by the initial conditions \(f_0 = 0\text{,}\)\(f_1 = 1\text{,}\) and the recurrence relation
Using linear algebra, we can find a closed formula for the terms of the Fibonacci sequence. We will not derive this formula in this course, but you will be asked to prove it in ExerciseΒ 3.2.3.5.
Figure2.4.3.9.Tabletop Roleplaying by Randall Munroe (https://xkcd.com/244/). I may have also tossed one of a pair of teleportation rings into the ocean, with interesting results.