Computing $\sum_{n=1}^ \infty n^2 \cdot \left(\frac{2}{3}\right)^n$ I've been dealing with the following series for a while now, without real progress.
$$\sum_{n=1}^ \infty n^2 \cdot \left(\frac{2}{3}\right)^n$$
After using WolframAlpha, I know it converges to $30$, but I can't see how to calculate it by myself.
Any leads would be greatly appreciated!

Substitute $2/3$ by a variable $x$. Then the series defined by
$$\sum_{k=1}^\infty k^2 x^k$$
converges locally uniformly for $|x|<1$, hence we can integrate and differentiate it termwise so
$$\sum_{k=1}^\infty k^2 x^k=x\sum_{k=1}^\infty k^2 x^{k-1}=x\sum_{k=1}^\infty k\frac{d}{dx}( x^k)=x\frac{d}{dx}\left(\sum_{k=1}^\infty kx^k\right)\\=x\frac{d}{dx}\left(x\sum_{k=1}^\infty k x^{k-1}\right)=x\frac{d}{dx}\left(x\sum_{k=1}^\infty \frac{d}{dx}(x^k)\right)=x\frac{d}{dx}\left(x\frac{d}{dx}\sum_{k=1}^\infty x^k\right)=\left[x\frac{d}{dx}\right]^2\frac{x}{1-x}\\=\left[x\frac{d}{dx}\right]\frac{x}{(1-x)^2}=x\left(\frac{1}{(1-x)^2}+\frac{2x}{(1-x)^3}\right)=\frac{x(1+x)}{(1-x)^3}$$
Hence
$$\sum_{k=1}^\infty k^2(2/3)^k=\left[\sum_{k=1}^\infty k^2 x^k\right]_{x=2/3}=\frac{x(1+x)}{(1-x)^3}\bigg|_{x=2/3}=\frac{10}9\cdot 3^3=3\cdot 10=30$$
