Use generating functions to solve the recurrence relation Use generating functions to solve $a_n = 3a_{n-1} - 2a_{n-2} + 2^n + (n+1)3^n$.
What I have so far, not sure if I forgot to do something or am missing out on something obvious:
Define $$G(x) = \sum_{n=0}^{\infty} a_nx^n$$ 
Then, $G(x) = a_0 + a_1x + a_2x^2 + \sum_{n=3}^{\infty} a_nx^n$ 
= $a_0 + a_1x + a_2x^2 + \sum_{n=3}^{\infty} (3a_{n-1} - 2a_{n-2} + 2^n + (n+1)3^n)x^n$
= $a_0 + a_1x + a_2x^2 + \sum_{n=3}^{\infty} 3a_{n-1}x^n - \sum_{n=3}^{\infty} 2a_{n-2}x^n + \sum_{n=3}^{\infty} 2^nx^n + \sum_{n=3}^{\infty} (n+1)3^nx^n$
= $a_0 + a_1x + a_2x^2 + 3\sum_{n=3}^{\infty} a_{n-1}x^n - 2\sum_{n=3}^{\infty} a_{n-2}x^n + \sum_{n=3}^{\infty} (2x)^n + \sum_{n=3}^{\infty} (n+1)(3x)^n$
=$a_0 + a_1x + a_2x^2 + 3x\sum_{n=3}^{\infty} a_{n-1}x^{n-1} - 2x^2\sum_{n=3}^{\infty} a_{n-2}x^{n-2} + \sum_{n=3}^{\infty} (2x)^n +  
 \sum_{n=3}^{\infty} (n+1)(3x)^n$
= $a_0 + a_1x + a_2x^2 + 3x\sum_{n=2}^{\infty} a_nx^n - 2x^2\sum_{n=1}^{\infty} a_nx^n + \sum_{n=3}^{\infty} (2x)^n +  
 \sum_{n=3}^{\infty} (n+1)(3x)^n$

Hint: if $G(x)$ is the generating function for $a_n$, what are $x G(x)$ and $x^2 G(x)$ the generating functions for?
