<s>[INST] Prove that: $\sum\limits_{n=1}^\infty \frac{n^2}{2^n}=6$. Prove that: $$\sum\limits_{n=1}^\infty \dfrac{n^2}{2^n}=6.$$ I am trying to find the sum of this infinite series. Got stuck. Any help will be highly appreciated.
 [/INST] Just for variety, reindexing sums and using the geometric series formula:
$$\begin{align}
\sum_{n=1}^{\infty}\frac{n^2}{2^n}
&=\sum_{n=1}^{\infty}\frac{\sum_{k=1}^{n}(2k-1)}{2^n}\\
&=\sum_{k=1}^{\infty}(2k-1)\sum_{n=k}^{\infty}\frac{1}{2^n}\\
&=\sum_{k=1}^{\infty}(2k-1)\frac{(1/2)^k}{1-1/2}\\
&=2\sum_{k=1}^{\infty}\frac{(2k-1)}{2^k}\\
&=2\sum_{k=1}^{\infty}\frac{k}{2^{k-1}}-2\sum_{k=1}^{\infty}\frac{1}{2^k}\\
&=2\sum_{k=1}^{\infty}\frac{\sum_{j=1}^k1}{2^{k-1}}-2\frac{1/2}{1-1/2}\\
&=2\sum_{j=1}^{\infty}\sum_{k=j}^{\infty}\frac{1}{2^{k-1}}-2\\
&=2\sum_{j=1}^{\infty}\frac{1/2^{j-1}}{1-1/2}-2\\
&=4\sum_{j=1}^{\infty}\frac{1}{2^{j-1}}-2\\
&=4\frac{1}{1-1/2}-2\\
&=6
\end{align}$$
</s>