<s>[INST] How to compute the sum $\sum_{n=0}^\infty \tfrac{n^2}{2^n}$? 
How to find this sum :
$\sum_{n=0}^\infty \dfrac{n^2}{2^n}$

$\sum_{n=0}^\infty \dfrac{n^2}{2^n}=\dfrac{1}{2}+\dfrac{4}{4}+\dfrac{9}{8}+\dfrac{16}{16}+\dfrac{25}{32}+\dfrac{36}{64}+\dfrac{49}{128}+\dots$
Now $\sum_{n=0}^\infty \dfrac{n}{2^n}\leqslant \sum_{n=0}^\infty \dfrac{n^2}{2^n}$
And I know that $\sum_{n=0}^\infty \dfrac{n}{2^n}=2$.
But how to find this sum ? I am confused.Please give some hints.
 [/INST] Hint: For $|x|<1$
\begin{align*}
\sum_{n=0}^{\infty }n^{2}x^{n}&=\sum_{n=0}^{\infty }n\left ( n+1 \right )x^{n}-\sum_{n=0}^{\infty }nx^{n} \\
&=x\sum_{n=0}^{\infty }n\left ( n+1 \right )x^{n-1}-x\sum_{n=0}^{\infty }nx^{n-1}\\
&=x\left ( \sum_{n=0}^{\infty }x^{n+1} \right )''-x\left ( \sum_{n=0}^{\infty }x^{n} \right )'\\
&=-\frac{x\left ( x+1 \right )}{\left ( x-1 \right )^{3}}
\end{align*}
then let $x=\dfrac{1}{2}$ you will get the answer.
</s>