Show with induction that $\sum_{k=1}^{n} \frac{k^{2}}{2^{k}} = 6 - \frac{n^2+4n+6}{2^{n}}$ Show with induction that
$\sum_{k=1}^{n} \frac{k^{2}}{2^{k}} = 6 - \frac{n^2+4n+6}{2^{n}}$
n = 1
$LHS = \frac{1}{2}$
$RHS = 6 - \frac{1+4+6}{2} = \frac{1}{2}$
n = p
$LHS_{p} = \frac{1^{2}}{2^{1}} + \frac{2^{2}}{2^{2}} + \frac{3^{2}}{2^{3}} + ... \frac{p^{2}}{2^{p}}$
$RHS_{p} = 6 - \frac{P^2+4p+6}{2^{p}}$
n = p + 1
$LHS_{p+1} = \frac{1^{2}}{2^{1}} + \frac{2^{2}}{2^{2}} + \frac{3^{2}}{2^{3}} + ... \frac{p^{2}}{2^{p}} + \frac{(p+1)^{2}}{2^{(p+1)}}$
$RHS_{p+1} = 6 - \frac{(p+1)^2+4(p+1)+6}{2^{(p+1)}}$
Show that, $RHS_{p+1} = RHS +  \frac{(p+1)^{2}}{2^{(p+1)}}$
$6 - \frac{(p+1)^2-4(p+1)+6}{2^{(p+1)}} =  6 - \frac{P^2+4p+6}{2^{p}} + \frac{(p+1)^{2}}{2^{(p+1)}}$

Hint: The left-hand side is given by $$\frac{(k+1)^2}{2^{k+1}}-\frac{k^2-4k+6}{2^k}=-2^{-k-1} \left(k^2-10 k+11\right)$$
and the right-hand side: $$-{\frac {{k}^{2}-2\,k+3}{{2}^{k+1}}}$$ so your formula is not true.
