Question: Evaluate
$$ \sum_{i=0}^n i^2 2^{n-i}$$
In the previous questions on my question paper I have got:
$$\sum_{i=1}^n a^i = \frac{a(1-a^n)}{1-a}$$ and $$\sum_{i=1}^nia^i=\frac{a(1-a^n)}{1-a}-na^{n+1}$$
My step for this evaluation is below:
Let $ 2^{n-1} \rightarrow a^{n-i}$
$$\therefore \sum_{i=1}^ni^2a^{n-i}$$ $$a^n\sum_{i=1}^ni^2a^{-i}$$
Let $b = {1 \over a}$
$$\therefore S_n=({1 \over b})^n\sum_{i=1}^ni^2b^i$$
I am trying to use the "multiply b by both sides" method and eliminate $S_n-bS_n$
The result is like this:
$bS_n-S_n=(b-1)S_n=(b^2+2^2b^3+3^2b^4+\cdots+n^2b^{n+1})-(b+2^2b^2+3^2b^3+\cdots+n^2b^n)$
Which is
$$b+(2^2-1)b^2+(3^2-2^2)b^3+\cdots+(n^2-(n-1)^2)b^n-n^2b^{n+1}$$ Expand: $$b+2^2b^2-b^2+3^2b^3-2^2b^3+\cdots+n^2b^n-(n-1)^2b^n-n^2b^{n+1}$$
I am now stuck at this step. Did I do anything wrong?
PS: I heard that we could use the answers in the previous questions but I couldn't see the patterns. Would anyone help? Thanks.