Q:

Recurrence problem for $a_5$

Assume that the sequence $\{a_0,a_1,a_2,\ldots\}$ satisﬁes the recurrence $a_{n+1} = a_n + 2a_{n−1}$. We know that $a_0 = 4$ and $a_2 = 13$. What is $a_5$?

A:

First find $a_1$: using the equation with $n=1$:
$$
13 = a_1 + 2\times 4\implies a_1 = 5
$$
Then compute $a_3, a_4, a_5$:
$$
a_3 = 13 + 2\times 5 = 23;\\
a_4 = 23 + 2\times 13 = 49;\\
a_5 = 49 + 2\times 23 = 95.\\
$$

Another solution is to find $a_n$ for each $n$: the caracteristic equation
is $r^2 - r- 2 = 0$, hence
$$
a_n = A(-1)^n + B2^n;\\
\begin{cases}
13 &=& A+4B\\
4 &=& A+B \end{cases}\implies (A,B) = (1,3)\\
a_5 = -1 + 3\times 2^5=95.
$$

