Calculating $\sum_{k=1}^\infty \frac{k^2}{2^k}=\frac{1}{2}+\frac{4}{4}+\frac{9}{8}+\frac{16}{16}+\frac{25}{32}+\cdots+\frac{k^2}{2^k}+\cdots$ I want to know the value of $$\sum_{k=1}^\infty \frac{k^2}{2^k}=\frac{1}{2}+\frac{4}{4}+\frac{9}{8}+\frac{16}{16}+\frac{25}{32}+\cdots+\frac{k^2}{2^k}+\cdots$$
I added up to $k=50$ and got the value $5.999999999997597$, so it seems that it converges to $6.$ But, I don't know how to get the exact value. Is there any other simple method to calculate it?

If we start with the power series
$$ \sum_{k=0}^{\infty}x^k=\frac{1}{1-x} $$
(valid for $|x|<1$) and differentiate then multiply by $x$, we get
$$ \sum_{k=1}^{\infty}kx^k=\frac{x}{(1-x)^2}$$
If we once again differentiate then multiply by $x$, the result is
$$ \sum_{k=1}^{\infty}k^2x^k=\frac{x(x+1)}{(1-x)^3}$$
and setting $x=\frac{1}{2}$ shows that
$$ \sum_{k=1}^{\infty}k^22^{-k}=\frac{\frac{3}{4}}{\frac{1}{8}}=6 $$
as you guessed.
