Evaluating $\frac{1^2}{2^1}+\frac{3^2}{2^2}+\frac{5^2}{2^3}+\cdots$ using sigma notation This question can be solved by method of difference
but I want to solve solve it using sigma notation:
$$\frac{1^2}{2^1}+\frac{3^2}{2^2}+\frac{5^2}{2^3}+\cdots+\frac{(2r +1)^2}{2^r}+\cdots$$
I used the geometric progression summation for the $(1/2)^r$ part, and opened $(2r+1)^2$ to $(4r^2 + 1 + 4r)$. If I now express this in sigma notation, it becomes
$$\frac{4n(n+1)(2n+1)}{6} + n + \frac{4(n\cdot n+1)}{2}$$ but I getting problem while putting upper limit infinity.
Where did I go wrong? Please explain.
Answer = $17$
 A: A simple answer to the question
Note that
\begin{multline*}
S\equiv\sum_{n\geq1}\frac{(2n-1)^{2}}{2^{n}}=\sum_{n\geq1}\frac{4n^{2}-4n+1}{2^{n}}=4\sum_{n\geq1}\frac{n^{2}}{2^{n}}-4\sum_{n\geq1}\frac{n}{2^{n}}+\sum_{n\geq1}\frac{1}{2^{n}}\equiv4I_2-4I_1+I_0.
\end{multline*}
since each of the series on the right hand side are convergent.
First, note that $I_0$ is a geometric series with $I_0=1$ (you can find an exposition to geometric series on Wikipedia).
As for $I_1$,
\begin{align*}
I_1 & =\frac{1}{2^{1}}+\frac{2}{2^{2}}+\frac{3}{2^{3}}+\cdots\\
\frac{1}{2}I_1 & =\frac{0}{2^{1}}+\frac{1}{2^{2}}+\frac{2}{2^{3}}+\cdots\\
\frac{1}{2}I_1=I_1-\frac{1}{2}I_1 & =\frac{1}{2^{1}}+\frac{1}{2^{2}}+\frac{1}{2^{3}}+\cdots
\end{align*}
and hence $\frac{1}{2}I_1$ is once again a geometric series with $\frac{1}{2}I_1=1$ so that $I_1=2$.
As for $I_2$, note that
\begin{align*}
I_2 & =\frac{1}{2^{1}}+\frac{4}{2^{2}}+\frac{9}{2^{3}}+\cdots\\
\frac{1}{2}I_2 & =\frac{0}{2^{1}}+\frac{1}{2^{2}}+\frac{4}{2^{3}}+\cdots\\
\frac{1}{2}I_2=I_2-\frac{1}{2}I_2 & =\frac{1}{2^{1}}+\frac{3}{2^{2}}+\frac{5}{2^{3}}+\cdots
\end{align*}
In other words,
$$
\frac{1}{2}I_2=\sum_{n\geq1}\frac{2n-1}{2^{n}}=2I_1-I_0=2\cdot2-1=3.
$$
Putting this all together,
$$
S=4\cdot6-4\cdot2+1=24-8+1=17.
$$

Generalizing the above
We can generalize the approach above. Fix a constant $c\in\mathbb{C}$ with $|c|>1$. For each nonnegative integer $m$, let
$$
\boxed{I_{m}=\sum_{n\geq1}n^{m}c^{-n}}
$$
Note that $I_{0}=(c-1)^{-1}$. If $m>0$, then
\begin{multline*}
\left(c-1\right)c^{-1}I_m=I_m-c^{-1}I_m=\sum_{n\geq1}n^{m}c^{-n}-\sum_{n\geq1}n^{m}c^{-n-1}\\
=\sum_{n\geq1}n^{m}c^{-n}-\sum_{n\geq1}\left(n-1\right)^{m}c^{-n}=\sum_{n\geq1}\left(n^{m}-\left(n-1\right)^{m}\right)c^{-n}\\
=\sum_{n\geq1}\left(n^{m}-\sum_{k=0}^{m}\binom{m}{k}n^{k}\left(-1\right)^{m-k}\right)c^{-n}
=\sum_{n\geq1}\left(\sum_{k=0}^{m-1}\binom{m}{k}n^{k}\left(-1\right)^{m-1-k}\right)c^{-n}\\
=\sum_{k=0}^{m-1}\binom{m}{k}\left(-1\right)^{m-1-k}I_{k}.
\end{multline*}
This yields the recurrence
$$
\boxed{I_{m}=\left(c-1\right)^{-1}c\sum_{k=0}^{m-1}\binom{m}{k}\left(-1\right)^{m-1-k}I_{k}\qquad\text{for }m\geq 1}
$$

Relationship to polylogarithm
Note that $I_{m}$ is related to the polylogarithm:
$$
\operatorname{Li}_{-m}(c^{-1})=\sum_{n\geq1}\frac{\left(c^{-1}\right)^{n}}{n^{-m}}=\sum_{n\geq1}\frac{c^{-n}}{n^{-m}}=\sum_{n\geq1}n^{m}c^{-n}=I_{m}.
$$
Expressing our identity in terms of the polylogarithm,
$$
\boxed{\operatorname{Li}_{-m}(z)=\left(1-z\right)^{-1}\sum_{k=0}^{m-1}\binom{m}{k}\left(-1\right)^{m-1-k}\operatorname{Li}_{-k}(z)\qquad\text{for }m\geq 1\text{ and }0<|z|<1}
$$
There are various other expressions for $\operatorname{Li}_{-m}(z)$
where $m$ is positive and $z$ is complex.
A: Hint:
For $a<1$, 
$$S_0(k):=\sum_{k=1}^\infty a^k=\frac a{1-a}.$$
Then
$$S_1(k):=\sum_{k=1}^\infty ka^k=\sum_{k=1}^\infty a^k+a\sum_{k=1}^\infty(k-1)a^{k-1},$$
$$S_1(k)=S_0(k)+aS_1(k)$$ and
$$S_1(k)=\frac a{(1-a)^2}.$$
Next,
$$S_2(k):=\sum_{k=1}^\infty k(k+1)a^k=\sum_{k=1}^\infty 2ka^k+a\sum_{k=1}^\infty(k-1)ka^{k-1},$$
$$S_2(k)=2S_1(k)+aS_2(k)$$ and
$$S_2(k)=\frac{2a}{(1-a)^3}.$$
You can continue with $k(k+1)(k+2)a^k\to\dfrac{3!a}{(1-a)^4}$ and so on.
Now, any polynomial in $k$, such as $(2k+1)^2$ can be expressed as a linear combination of $1,k,k(k+1),\cdots$ and the summation follows.
$$(2k-1)^2=4k(k+1)-8k+1,a=\frac12\to4\frac{\frac22}{\frac1{2^3}}-8\frac{\frac12}{\frac1{2^2}}+\frac{\frac12}{\frac12}=17.$$
A: Consider$$S_r=\sum_{n=1}^r(2n-1)^{2}x^n=\sum_{n=1}^r({4n^{2}-4n+1})x^n$$ Now, rewrite
$$n^2=n(n-1)+n$$ which makes
$$S_r=\sum_{n=1}^r(4n(n-1)+1)x^n=4x^2\sum_{n=1}^r n(n-1)x^{n-2}+\sum_{n=1}^r x^n$$ that is to say $$S_r=4x^2 \left(\sum_{n=1}^r x^n \right)''+\sum_{n=1}^r x^n$$
Recall that $$\sum_{n=1}^r x^n=\frac{x \left(1-x^r\right)}{1-x}$$ Compute the second derivative and simplify; when finished, make $x=\frac 12$ and take the limit for $r \to \infty$.
A: The general term is $\frac{(2k-1)^2}{2^k}$. Using that, we get
$$
\begin{align}
\sum_{k=1}^\infty\frac{(2k-1)^2}{2^k}
&=\sum_{k=1}^\infty\frac{4k(k-1)+1}{2^k}\tag1\\
&=\sum_{k=1}^\infty8\binom{k}{k-2}\left(\frac12\right)^k+\sum_{k=1}^\infty\binom{k-1}{k-1}\left(\frac12\right)^k\tag2\\
&=\sum_{k=1}^\infty8\binom{-3}{k-2}\left(-\frac12\right)^k-\sum_{k=1}^\infty\binom{-1}{k-1}\left(-\frac12\right)^k\tag3\\
&=2\left(1-\frac12\right)^{-3}+\frac12\left(1-\frac12\right)^{-1}\tag4\\[12pt]
&=17\tag5
\end{align}
$$
Explanation:
$(1)$: $(2k-1)^2=4k(k-1)+1$
$(2)$: $4k(k-1)=8\binom{k}{2}=8\binom{k}{k-2}$ for $k\ge2$ and $\binom{k-1}{k-1}=1$ for $k\ge1$
$(3)$: convert to negative binomial coefficients
$(4)$: Generalized Binomial Theorem
$(5)$: evaluate
