<s>[INST] Evaluating $\sum_{n=1}^\infty \frac{n^2}{3^n} $ The following series converges to 3/2 but I do not know why.
$$ \sum_{n=1}^\infty \frac{n^2}{3^n} = \frac{3}{2} $$
Searching via Google did not yield anything useful. I'm wondering if there's some sort of algorithm that can be used to solve this, or better yet, a closed-form equation for evaluating infinite sums that are in a form similar to
$$ \sum_{n=1}^\infty \frac{n^a}{b^n} $$
Or maybe it's just a Taylor series that I don't recognize.
 [/INST] A solution using only the fact that $\sum_{n=0}^\infty q^n = \frac{1}{1-q}$ when $|q|<1$:
Let $S_1 = \sum_{n=1}^\infty\dfrac{n^2}{3^n}$, then $3S_1 = \sum_{n=0}^\infty\dfrac{(n+1)^2}{3^n}$, so we have $$2S_1 = 3S_1 - S_1 = 1 + \sum_{n=1}^\infty\dfrac{2n+1}{3^n} = 1 + 2S_2 + \sum_{n=1}^\infty\dfrac{1}{3^n} = 1 + 2S_2  + \frac{1}{2}$$
where $S_2 = \sum_{n=1}^\infty\dfrac{n}{3^n}$
Similarly we have $$2S_2 = 3S_2 - S_2 = \sum_{n=0}^\infty\dfrac{n+1}{3^n} - \sum_{n=1}^\infty\dfrac{n}{3^n} = \sum_{n=0}^\infty\dfrac{1}{3^n} = \frac{3}{2}$$
So $S_1 = \dfrac{1+\frac{3}{2}+ \frac{1}{2}}{2} =\dfrac{3}{2}$
</s>