I am trying to determine the sequence of $a_n, n=0,1,2,...$ that satisfies the difference equation
$$a_{n+2}-a_{n+1}-2a_n=12 \cdot 2^n - 4n.$$
I have found the roots to the homogeneous equation, and they are $r=2$ and $r=-1$, so the general solution should be $a_n^{(h)} = A\left(2\right)^n + B\left(-1\right)^n,$ but I haven't managed to find a particular solution that works.
This is usually where I struggle when working with these problems. Often I end up finding it by basically guessing but this time I haven't been able to.
Since $2$ is a root of multiplicity $1$, the $12\cdot2^n$ term wants a particular solution of the form $cn^12^n$. (If $2$ were not a root, it would want $c2^n$.) $1$ is not a root, so the linear $-4n$ term just wants a particular solution of the form $d+en$. Putting the two together, we’re looking for a particular solution of the form
$$cn2^n+d+en\;.$$
Substitute into the original recurrence, and you will be able to solve for $c,d$, and $e$.