<s>[INST] Finding the closed form for a recurrence relation I'm having trouble finding a closed form for a geometric recurrence relation where the term being recursively multiplied is of the form (x+a) instead of just (x). 
Here's the recursive sequence:
$a_{n} = 4a_{n-1} + 5$ for $n \geq 1$ with the initial condition $a_{0} = 2$.
I know that in general the way to solve these problems is to start by writing out all of the arithmetic for the first few values of $a_{n}$, starting with the initial condition. Here's what I have:
$a_{0} = 2$
$a_{1} = 4 (2) + 5 \equiv ((2)(2)(2) + 5)$
$a_{2} = 4(4(2)+5)+5 \equiv (2)(2)((2)(2)(2)+5)+5$
$a_{3} = 4(4(4(2)+5)+5)+5 \equiv (2)(2)((2)(2)((2)(2)(2)+5)+5)+5$
$\ldots$ etc.
So at this point it's pretty clear to me that
$a_{n} = 2^{2n + 1} + something$
My problem is figuring out how to account for all of those 5's. Especially since the first 5 is being multiplied by $2^{3}$ and all of the other 5's are being multiplied by $2^{2}$. 
I guessed something like this:
$a_{n} = 2^{2n+1} + 5(4^{n-1}) + 5^{n-1}$
$\ldots$ and the results were close, but not exact.
Can anyone help me out with the correct method for solving these types of problems? Thanks very much for your time.
 [/INST] You have 
\begin{aligned}
a_n-4a_{n-1}&=5\\\\
4a_{n-1}-4^2a_{n-2}&=5\cdot4\\\\
4^2a_{n-2}-4^3a_{n-3}&=5\cdot4^2\\\vdots\\
4^{n-1}a_1-4^na_0&=5\cdot4^{n-1}
\end{aligned}
so
$a_n-4^na_0=5\sum\limits_{k=0}^{n-1}4^k=5\cdot\dfrac{4^n-1}{3}$
</s>