Hi,

I were reviewing some induction and saw this:

prove that for all integers n:

$\displaystyle \sum_{k=1}^n \frac{k^2}{2^k} = 6-\frac{n^2+4n+6}{2^n}$

And the solution looks like this:

$\displaystyle \sum_{k=1}^{n+1} \frac{k^2}{2^k}6-~\frac{n^2+4n+6}{2^n} + \frac{(n+1)^2}{2^{n+1}} \longrightarrow$

$\displaystyle \frac{2n^2+8r+12-r^2-2r-1}{2^{r+1}}=...$

Whats going on here? why did they subtract $\displaystyle r^2+2r+1$

And the reason they multiplied the expression by 2 where to get the same denominator, but the denominator in the new expression is still $\displaystyle 2^{n+1}$ why?