Assume that $(a_n)^{\infty}_{n=0}$ is a sequence given by $a_0=1$ and $a_{n+1}=2a_{n}+n$ for all $n \ge 0$, what is the formula for $a_n$?
we know that $F(x)=a_0+a_1x+a_2x^2+a_3x^3+\dots$
and our sequence is $1, 2, 5, 12, 27, 58, \dots$
to find the generating function for the sequence I started with
$F(x)=a_0+(\underline{2a_0}+\widetilde0)x+(\underline{2a_1}+\widetilde1)x^2+(\underline{2a_2}+\widetilde2)x^3+\dots$
after distributing the variables into the parenthesis, i separated the terms with $\underline{}$ and $\widetilde{}$
$\underline{} = 2a_0x+2a_1x^2+2a_2x^3+2a_3x^4+\dots$
$\underline{} = 2x(a_0+a_1x^1+a_2x^2+a_3x^3+\dots)$
$\underline{} = 2x \times F(x)$
$\widetilde{} = x^2 + 2x^3 + 3x^4 + 4x^5$
now I don't know what to do with this part, if I had used $n$ earlier instead of putting in the numbers I could just factor out $nx^2$ and get $\widetilde{} = nx^2(\frac{1}{1-x})$ but I don't think I can have $n$ when solving for the generating function of the sequence?
Any ideas of how to get past just this part?
You must note that $a_0=1$ which is unaccounted for...
Using the fact that
$$\frac{d}{dx}\left(\frac{1}{1-x}\right)=\frac{1}{(1-x)^2}=1+2x+3x^2+...$$
you now should get
$$F(x)=1+2xF(x)+x^2\frac{1}{(1-x)^2}$$ $$F(x)(1-2x)=1+\frac{x^2}{(1-x)^2}$$ $$F(x)=\frac{1-2x+2x^2}{(1-2x)(1-x)^2}$$
Now use partial fraction decomposition to obtain three power series and look at the coefficients.