A sequence satisfies an=an−1+6an−2a_n = a_{n-1} + 6a_{n-2}an=an−1+6an−2 for n≥2n \ge 2n≥2, with a0=3a_0 = 3a0=3 and a1=4a_1 = 4a1=4. Its closed form can be written as an=A⋅3n+B⋅(−2)na_n = A\cdot 3^n + B\cdot(-2)^nan=A⋅3n+B⋅(−2)n. Find the exact integer values of the constants AAA and BBB, and use the closed form to find the exact integer value of a5a_5a5.
Unlock full course notes by signing up
Solving a recurrence by unrolling
The running time of a simple loop-based algorithm satisfies T(n)=T(n−1)+nT(n) = T(n-1) + nT(n)=T(n−1)+n for n≥2n \ge 2n≥2, with T(1)=1T(1) = 1T(1)=1. A student finds a closed form by repeatedly substituting the recurrence into itself, which is called unrolling or iteration. Put the student's steps in the order they must be carried out.
Recurrence with a repeated characteristic root
A sequence satisfies an=4an−1−4an−2a_n = 4a_{n-1} - 4a_{n-2}an=4an−1−4an−2 for n≥2n \ge 2n≥2, with initial values a0=1a_0 = 1a0=1 and a1=6a_1 = 6a1=6. Find a closed form for ana_nan and use it to find a10a_{10}a10. Give your answer as an exact integer.
Modelling a counting problem with a recurrence
Let ana_nan be the number of binary strings of length nnn that contain no two consecutive 1s. For example, 0110 is not allowed, but 0101 is. Which recurrence, together with its initial values, correctly describes ana_nan?
Second-order recurrence with a constant forcing term
A sequence satisfies an=5an−1−6an−2+4a_n = 5a_{n-1} - 6a_{n-2} + 4an=5an−1−6an−2+4 for n≥2n \ge 2n≥2, with a0=4a_0 = 4a0=4 and a1=9a_1 = 9a1=9.
Its general solution has the form an=A⋅r1 n+B⋅r2 n+pa_n = A \cdot r_1^{\,n} + B \cdot r_2^{\,n} + pan=A⋅r1n+B⋅r2n+p. Here r1<r2r_1 < r_2r1<r2 are the roots of the characteristic equation of the associated homogeneous recurrence, and ppp is a constant particular solution.
Give each of the following as an exact integer: