Infinite Geometric Series Involving Squares How to evaluate an expression of form
$$\sum_{n=1}^\infty \frac{n^2}{6^n}$$
Is there any way to generalize this for any natural number $i$?
$$\sum_{n=1}^\infty \frac{n^i}{6^n}$$
 A: $$\sum_{n\geq 1}\frac{e^{nx}}{6^n}=\frac{e^x}{6-e^x} $$
since the LHS is a geometric series. 
By differentiating $i$ times with respect to $x$, then evaluating at $x=0$, we get:
$$ \sum_{n\geq 1}\frac{n^i}{6^n} = \left.\frac{d^i}{dx^i}\left(\frac{e^x}{6-e^x}\right)\right|_{x=0} $$
that can be written in terms of Stirling numbers, too, since $n^i$ can be written as a linear combination of $\binom{n}{i},\binom{n}{i-1},\ldots,\binom{n}{0}$ and:
$$ \sum_{n\geq 1}\binom{n}{i}\frac{1}{6^n} =  \frac{6}{5^{i+1}}. $$
In the particular case $i=2$ we have:

$$ \sum_{n\geq 1}\frac{n^2}{6^n} = 2\sum_{n\geq 1}\binom{n}{2}\frac{1}{6^n}+\sum_{n\geq 1}\binom{n}{1}\frac{1}{6^n} = \frac{12}{125}+\frac{6}{25} = \color{red}{\frac{42}{125}}.$$

A: The function Polylogarithm provides a large generalization :
http://mathworld.wolfram.com/Polylogarithm.html
$$\sum_{n=1}^{\infty}n^r x^n = \text{Li}_{-r}(x)$$
Example :
$r=2\quad\to\quad \sum_{n=1}^{\infty}n^2 x^n = \text{Li}_{-2}(x)=\frac{x(x+1)}{(1-x)^3}\qquad$ Eq.(9) in the paper cited above.
If $x=\frac{1}{6}\quad\to\quad \sum_{n=1}^{\infty}\frac{n^2}{6^n} = \text{Li}_{-2}(\frac{1}{6})=\frac{\frac{1}{6} (\frac{1}{6}+1)}{(1-\frac{1}{6})^3}=\frac{42}{125}$
A: The infinite geometric series is pretty well known:
$$\sum_{i = 1}^{\infty} r^i = \frac{r}{1 - r} \;\;  0 \leq r < 1$$
The next more complicated sum is known as Gabriel's staircase or the Arithmetico-geometric series, and its sum is also well known:
$$\sum_{i = 1}^{\infty} ir^i = \frac{r}{(1 - r)^2}$$
The term you ask about, which is $\sum_{i = 1}^{\infty} \frac{i^2}{6^i}$ (I just changed your variable names) is a special case of this sequence:
$$S = \sum_{i = 1}^{\infty} i^2r^i$$
Where $r = \frac16$. The first part of your question then asks is there a general [closed form] formula for such sums? The answer is yes. Using the above results we can derive such a formula:
$$S(1 - r) = S - rS = \sum_{i = 1}^{\infty} i^2r^i - \sum_{i = 1}^{\infty} i^2r^{i+1} = \\
\sum_{i = 1}^{\infty} i^2r^i - \sum_{i = 1}^{\infty} (i - 1)^2r^i = \\
\sum_{i = 1}^{\infty} i^2r^i - (i - 1)^2r^i = \sum_{i = 1}^{\infty} (2i - 1)r^i = \\
2\sum_{i = 1}^{\infty} ir^i - \sum_{i = 1}^{\infty} r^i$$
Now we've reduced to terms we already know: a geometric series plus an arithmetico-geometric series. Applying the formulas we've already seen for those:
$$ = 2\left(\frac{r}{(1 - r)^2}\right) - \frac{r}{1 - r}$$
Remember this is the term for $S(1 - r)$ so to get $S$ we divide by $1 - r$ to get:
$$S = 2\left(\frac{r}{(1 - r)^3}\right) - \frac{r}{(1 - r)^2}$$
Now we see a clear pattern, and this leads us to the second part of your question. All series we've seen so far are special cases of the following series:
$$S_{k, r} = \sum_{i = 1}^{\infty} i^kr^i$$
Does a closed form formula exist for every $k$? There's good news and bad news. The good news is yes, I can prove constructively that for each $k$, there exists such a formula. However, I can't prove that there exists a single closed form formula that covers all values of $k$. Subtle difference in the quantifiers. That's not to say such a formula doesn't exist - it's just I, the author, don't know of one.
To prove the existence of a closed form formula for $S_{k, r}$, we do induction on $k$. Clearly we've already seen closed form formulas for $k = 0, 1, 2$, which is more than enough for our base case. So we only need to prove the inductive case. Take:
$$S_{k+1, r} = \sum_{i = 1}^{\infty} i^{k + 1}r^i$$
We now apply the trick of multiplying by $1 - r$ and apply the binomial theorem to reduce this to a closed form expression involving sums we already know, by our inductive hypothesis.
$$S_{k+1, r}(1 - r) = S_{k+1, r} - rS_{k+1, r} = \sum_{i = 1}^{\infty} i^{k+1}r^i - \sum_{i = 1}^{\infty} i^{k+1}r^{i+1} = \\
\sum_{i = 1}^{\infty} i^{k+1}r^i - \sum_{i = 1}^{\infty} (i - 1)^{k+1}r^i = \\
\sum_{i = 1}^{\infty} i^{k+1}r^i - (i - 1)^{k+1}r^i$$
At this point we notice that by expanding the second term via the binomial expansion, the two powers of $i^{k+1}r^i$ cancel each other out:
$$ = - \sum_{i = 1}^{\infty} \sum_{j = 1}^{k+1} {k + 1 \choose j} (-1)^j i^{k + 1 - j}r^i
$$
And since summation order can be interchanged:
$$ = - \sum_{j = 1}^{k+1}\sum_{i = 1}^{\infty} {k + 1 \choose j} (-1)^j i^{k + 1 - j}r^i
$$
But we can remove from the inner sum any constant w.r.t. the variable $i$ so:
$$ = - \sum_{j = 1}^{k+1}{k + 1 \choose j} (-1)^j\sum_{i = 1}^{\infty}  i^{k + 1 - j}r^i \\
= - \sum_{j = 1}^{k+1}{k + 1 \choose j} (-1)^jS_{k + 1 - j,r}
$$
But remember this was the term for $S_{k+1, r}(1 - r)$ so we have:
$$S_{k+1, r} = \frac{-1}{1 - r}\sum_{j = 1}^{k+1}{k + 1 \choose j} (-1)^jS_{k + 1 - j,r}$$
By our inductive hypothesis since each $S_{k + 1 - j,r}$ has a closed form expression, then the above is a closed form expression for any given $k$.
