[Math] Deriving Closed Form for a Recursion via Generating Functions

combinatoricsgenerating-functionsrecurrence-relations

Consider (1) $a_{n+2} = 2a_{n+1} – a_n + 4n3^n$ with $a_0 = a_1 = 1$.

Using generating functions and setting $A(x) = \sum a_nx^n$ we obtain

$$\begin{align*}&\quad\sum a_{n+2}x^{n+2} = \sum2a_{n+1}x^{n+2} – \sum a_nx^{n+2} + \sum 4n3^nx^{n+2}\\ &\implies [A(x) – a_0 – a_1x] = 2x[A(x)-a_0] – x^2A(x) + \sum_n 4n3^nx^{n+2}\end{align*}$$

Is this correct so far? Is there always a best way to go about rearranging the obtained generating function, or does it vary from problem to problem? Further, is it simpler to use this method here or to instead obtain a particular solution through undetermined coefficients? Any help is much appreciated.

Is it possible to decompose $4n3^nx^{n+2}$ into $x^2$$\sum 4n \times 1/(1-3x)$ and does this help?

Best Answer

Everything is OK except $\sum_n 4n3^n x^{n+2}$. Let $B(x)=\sum_{n=1}^\infty 4n3^n x^{n+2}$. Then $$ \frac{1}{12x^3}B(x)=\sum_{n=1}^\infty n (3x)^{n-1}. $$ Using the fact that $\sum_{n=1}^\infty nx^{n-1}=\frac{1}{(1-x)^2}$ for $|x|<1$, we have $$\frac{1}{12x^3}B(x)=\frac{1}{(1-3x)^2}$$ or $$B(x)=\frac{12x^3}{(1-3x)^2}.$$