Show recursion in closed form I've got following sequence formula:
$ a_{n}=2a_{n-1}-a_{n-2}+2^{n}+4$
where $ a_{0}=a_{1}=0$
I know what to do when I deal with sequence in form like this:
$ a_{n}=2a_{n-1}-a_{n-2}$
  -  when there's no other terms but previous terms of the sequence.
Can You tell me how to deal with this type of problems? 
What's the general algorithm behind solving those?

$$\begin{align}
a_{n+2} - 2a_{n+1} + a_{n} &= 4 \cdot 2^{n} + 4 \\
a_{n+1} - 2a_{n} + a_{n-1} &= 2 \cdot 2^{n} + 4 \\
a_{n} - 2a_{n-1} + a_{n-2} &= 1 \cdot 2^{n} + 4 \\
\end{align}$$
$$
\begin{bmatrix}
1 & -2 & 1 & 0 & 0 \\
0 & 1 & -2 & 1 & 0 \\
0 & 0 & 1 & -2 & 1 \\
\end{bmatrix}
\begin{bmatrix} 
a_{n + 2} \\ a_{n + 1} \\ a_{n} \\ a_{n - 1} \\ a_{n - 2}
\end{bmatrix} = 
\begin{bmatrix} 
4 & 1 \\
2 & 1 \\
1 & 1 \\
\end{bmatrix} \begin{bmatrix} 2^n \\ 4 \end{bmatrix}$$
$$
\begin{bmatrix} 1 & -3 & 2 \end{bmatrix}
\begin{bmatrix}
1 & -2 & 1 & 0 & 0 \\
0 & 1 & -2 & 1 & 0 \\
0 & 0 & 1 & -2 & 1 \\
\end{bmatrix}
\begin{bmatrix} 
a_{n + 2} \\ a_{n + 1} \\ a_{n} \\ a_{n - 1} \\ a_{n - 2}
\end{bmatrix} = 
\begin{bmatrix} 1 & -3 & 2 \end{bmatrix}
\begin{bmatrix} 
4 & 1 \\
2 & 1 \\
1 & 1 \\
\end{bmatrix} \begin{bmatrix} 2^n \\ 4 \end{bmatrix}$$
$$
\begin{bmatrix} 1 & -3 & 2 \end{bmatrix}
\begin{bmatrix}
1 & -2 & 1 & 0 & 0 \\
0 & 1 & -2 & 1 & 0 \\
0 & 0 & 1 & -2 & 1 \\
\end{bmatrix}
\begin{bmatrix} 
a_{n + 2} \\ a_{n + 1} \\ a_{n} \\ a_{n - 1} \\ a_{n - 2}
\end{bmatrix} = 
\begin{bmatrix} 0 \end{bmatrix}$$
So the characteristic equation of the linear recursion is
$$(x^2 - 3x + 2)(x^2 - 2x + 1)$$
with roots $[2, 1, 1, 1]$, so the general solution is
$$a_n = C_0 2^n + (C_1 + C_2n + C_3n^2)1^n$$
where the coefficients $C$ can be determined form the initial conditions.
