Question: $\sum\limits\_{n=1}^{\infty}(2n-1)^2(\frac{1}{2})^n$

I know via Wolfram that the sum is 17, but I'm not sure I've ever found the sum of such a series before. Any help is appreciated.

Answer: 
For completeness sake, the following are useful. For $|k|<1$ we have:

$\sum\limits\_{n=0}^\infty k^n = \frac{1}{1-k}$

Deriving each side with respect to $k$, we get:

$\sum\limits\_{n=0}^\infty nk^{n-1} = \frac{1}{(1-k)^2}$

Multiplying by $k$ yields

$\sum\limits\_{n=0}^\infty nk^n = \frac{k}{(1-k)^2}$

Deriving the expression by $k$ yields

$\sum\limits\_{n=0}^\infty n^2k^{n-1} = \frac{(1-k)^2 + 2k(1-k)}{(1-k)^4}$

Simplifying and multiplying by $k$ yields

$\sum\limits\_{n=0}^\infty n^2k^n = \frac{k^2+k}{(1-k)^3}$

Note further that the first term of each series except the original is zero, so we may start the summation from one instead without changing the result.

We have the series in question simplifies to $4\left(\sum\limits\_{n=1}^\infty n^2(\frac{1}{2})^n\right) - 4\left(\sum\limits\_{n=1}^\infty n(\frac{1}{2})^n\right) + \left(\sum\limits\_{n=1}^\infty(\frac{1}{2})^n\right)$

which by the above results simplifies to $4\frac{k^2+k}{(1-k)^3}-4\frac{k}{(1-k)^2} + \frac{k}{1-k}$. (*we use $\frac{k}{1-k}$ instead since we start at $n=1$ not $n=0$ for the final summation*)

Plugging in $k=\frac{1}{2}$ and finishing simplifying the arithmetic yields the desired result.

$4\frac{\frac{1}{4}+\frac{1}{2}}{\frac{1}{8}} - 4\frac{\frac{1}{2}}{\frac{1}{4}} + \frac{\frac{1}{2}}{\frac{1}{2}} = 24 - 8 + 1 = 17$
In the same spirit as other answers, when you have an expression such that $$S=\sum\_{n=1}^\infty P(n)x^n$$ where $P(n)$ is a polynomial in $n$, first expand $P(n)$ and it will become something like $$P(n)=\sum\_{i=0}^m a\_i n^i$$ Now rewrite the successive powers of $n^i$ such as $$n^2=n(n-1)+n$$ $$n^3=n(n-1)(n-2)+3n(n-1)+n$$ $$n^4=n(n-1)(n-2)(n-3)+6n(n-1)(n-2)+7n(n-1)+n$$ and so on.

Replacing in $S$, you will identify the successive derivatives of $$f=\sum\_{n=1}^\infty x^n=\frac{x}{1-x}$$ Suppose that $$P(n)=a\_0+a\_1n+a\_2n^2+a^3 n^3$$ Taking into account the above, we shall have $$P(n)=a\_0+a\_1n+a\_2\Big(n(n-1)+n \Big)+a\_3\Big(n(n-1)(n-2)+3n(n-1)+n\Big)$$ that is to say $$P\_n=a\_0+(a\_1+a\_2+a\_3)n+(a\_2+3a\_3)n(n-1)+a\_3n(n-1)(n-2)$$ which makes $$S=a\_0\sum\_{n=1}^\infty x^n+(a\_1+a\_2+a\_3)x\sum\_{n=1}^\infty nx^{n-1}+(a\_2+3a\_3)x^2\sum\_{n=1}^\infty n(n-1)x^{n-2}+$$ $$a\_3 x^3\sum\_{n=1}^\infty n(n-1)(n-2)x^{n-3}$$ that is to say $$S=a\_0f+(a\_1+a\_2+a\_3)xf'+(a\_2+3a\_3)x^2f''+a\_3x^3f'''$$