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?

Start with the geometric series $\frac{1}{1-x} = \sum_i x^i$. Differentiate it once to get $\frac{d}{dx} \left[ \frac{1}{1-x} \right] = \frac{d}{dx} \sum_i x^i = \sum_i i x^{i-1}$. Differentiate again to get $\frac{d^2}{dx^2} \left[ \frac{1}{1-x} \right] = \frac{d^2}{dx^2} \sum_i x^i = \sum_i i (i-1)  x^{i-2}$.
Now, plug in $x= \frac{1}{2}$ and adjust indices in teh summations. 
