How to derive a closed form of a recursion (maybe using generating functions) Let $a_0=9$ and consider the following recurrence relation: $$a_n=36(n+1)2^{n-2}+2a_{n-1},$$ I'm looking for the closed form of $\{a_n\}.$
I have tried using generator functions:
\begin{align*}
f(x)&=\sum_{n=0}^\infty a_nx^n\\
&=9 +\sum_{n=1}^\infty \left(4.5(n+1)2^{n+1}+2a_{n-1}\right)x^n\\
&=9 +4.5\sum_{n=1}^\infty (n+1)2^{n+1}x^n+2\sum_{n=1}^\infty a_{n-1}x^n\\
&=9 +\frac{4.5}{x}\sum_{n=1}^\infty (n+1)2^{n+1}x^{n+1} + 2x\sum_{n=1}^\infty a_{n-1}x^{n-1}\\
&=9 +\frac{4.5}{x}\sum_{n=2}^\infty n2^{n}x^{n} + 2xf(x)
\end{align*}
What should I do next? Is there a quicker way to solve this?
Thanks in advance

An easy way to solve this recurrence.
As the recurrence is linear, we have that
$$
a_n = a_n^h + a_n^p
$$
such that
$$
\cases{a_n^h= 2 a_{n-1}^h\\ a_n^p = 2 a_{n-1}^p+36(n+1)2^{n-2}}
$$
so $a_n^h = c_0 2^n$. Now assuming $a_n^p = c_0(n)2^n$ after substitution into the complete equation, we have
$$
c_0(n)2^n = 2c_0(n-1)2^{n-1}+36(n+1)2^{n-2}
$$
or
$$
c_0(n) = c_0(n-1)+9(n+1)
$$
hence
$$
c_0(n) = 9\frac{(n+1)(n+2)}{2}
$$
then
$$
a_n^p = 9\frac{(n+1)(n+2)}{2}2^n
$$
and finally
$$
a_n = \left(9\frac{(n+1)(n+2)}{2}+c_0\right)2^n
$$
