Proof of the equality $\sum\limits_{k=1}^{\infty} \frac{k^2}{2^k} = 6$

Show that for $k$ running over positive integers $$ \sum_{k=1}^\infty \frac{k^2}{2^k}=6 .$$ We can use finite calculus.


Different people describe the techniques of finite calculus differently. I like the version presented in Section 2.6 of Graham, Knuth, & Patashnik, Concrete Mathematics, because it shows very clearly the similarity to ordinary calculus. In their notation what you want is $\sum_1^\infty k^2 2^{-k} \delta k$. This is analogous to the ordinary calculus integral $\int_1^\infty x^2 e^{-x} dx$, which you’d do by integrating by parts twice to reduce the $x^2$ factor to a constant. You can do the same thing here using summation by parts. Since this is homework, I’ll do a similar but slightly simpler problem, $\sum_1^\infty k 2^{-k} \delta k$.

First replace the infinite sum by a finite one; we’ll take the limit later. Then you have $\sum_1^n k 2^{-k} \delta k$, or in ordinary summation notation $\sum\limits_{k=1}^{n-1} k 2^{-k}$. Let $u = k$ and $\Delta v = 2^{-k} = (1/2)^k$; then $\Delta u = 1$, and $v = \left(\frac12\right)^k / \left(\frac12 - 1\right)= -\left(\frac12\right)^{k-1}$, so $E(v) = -\left(\frac12\right)^k$, and

$$\begin{align*} \textstyle\large\sum_1^n k 2^{-k} \delta k &= \left[-k\left(\frac12\right)^{k-1}\right]_1^n + \textstyle\large\sum_1^n \left(\frac12\right)^k \delta k\\ &= 1 - \frac{n}{2^{n-1}} + \textstyle\large\sum_1^n \left(\frac12\right)^k \delta k\\ &= 1 - \frac{n}{2^{n-1}} + \left[-\left(\frac12\right)^{k-1} \right]_1^n\\ &= 1 - \frac{n}{2^{n-1}} - \left(\frac{1}{2^{n-1}} - 1\right)\\ &= 2 - \frac{n+1}{2^{n-1}}. \end{align*}$$

Now just take the limit: $$\sum_{k=1}^\infty \frac{k}{2^k} = \lim_{n\to\infty}\left(2 - \frac{n+1}{2^{n-1}}\right) = 2.$$

This of course had only one summation by parts, and you’ll need two, but the principle is exactly the same.


Alternative way of solving this problem. Using some basic calculus of the power series. Starting from $\sum \limits_{k \geq 1} k^2\left(\frac12\right)^k$, consider a power series $\sum \limits_{k \geq 1} k^2x^k= x\sum \limits_{k \geq 1} k^2x^{k-1}$ which converges uniformly whenever $|x| <1$. We get our sum by standard differentiation and integration of the power series. You can integrate $\sum \limits_{k \geq 1} k^2x^{k-1}$ term by term so $\sum \limits_{k \geq 1} \int_0^x k^2t^{k-1}\mathrm dt=\sum \limits_{k \geq 0}kx^k $. Again, $\sum \limits_{k \geq 0}kx^k= 1+x \sum \limits_{k \geq 1}kx^{k-1}$, by integrating term by term $\sum \limits_{k \geq 1}\int_0^x kt^{k-1}\mathrm dt= \sum\limits_{k \geq 0}x^k=\frac{1}{1-x}$. Now, we must take the derivative so $\left(\frac1{1-x}\right)^{\prime}=\frac1{(1-x)^2}$ so $$1+x \sum \limits_{k \geq 1}kx^{k-1}= 1+\frac{x}{(1-x)^2}.$$ Taking again the derivative $\left( 1+\frac{x}{(1-x)^2}\right)^{\prime}=\frac{1+x}{(1-x)^3}$ so $$\sum \limits_{k \geq 1} k^2x^k = \frac{x(1+x)}{(1-x)^3}.$$ Finally, by putting $x=\frac12$ we get that $\sum \limits_{k \geq 1} k^2\left(\frac12\right)^k=6$.


For starters, you know that $\displaystyle \sum_{k=1}^\infty {1\over 2^k} = 1$, yes? If you don't have that much, then you likely won't be able to follow the rest of the proof.

Now, consider $\displaystyle S=\sum_{k=1}^\infty {k\over 2^k}$. Then $\displaystyle {S\over 2} = \sum_{k=1}^\infty {k\over 2*2^k} = \sum_{k=1}^\infty {k\over 2^{k+1}} = \sum_{l=2}^\infty {l-1\over 2^l} = \sum_{l=1}^\infty {l-1\over 2^l}$. (The reason why the last equality is true is because the $l=1$ term is ${1-1\over 2^1}=0$, so we can add it in without changing the sum.) This means that $\displaystyle S-{S\over 2} = \sum_{k=1}^\infty {k\over 2^k} - \sum_{k=1}^\infty {k-1\over 2^k} = \sum_{k=1}^\infty {k-(k-1)\over 2^k} = \sum_{k=1}^\infty {1\over 2^k} = 1$, or in other words $S=2$. Now, can you see how to use a similar technique on your sum? The terms will be a little more complicated, but using the formula for $\sum_{k=1}^\infty {k\over 2^k}$ will help.


Consider the series $$ \sum_{k=0}^\infty\;\frac{x^k}{2^k}=\frac{1}{1-x/2} $$ Take a derivative $$ \sum_{k=0}^\infty\;k\frac{x^{k-1}}{2^k}=\frac{1/2}{(1-x/2)^2}\tag{1} $$ Take another derivative $$ \sum_{k=0}^\infty\;k(k-1)\frac{x^{k-2}}{2^k}=\frac{1/2}{(1-x/2)^3}\tag{2} $$ Adding $(1)$ and $(2)$ at $x=1$, we get $$ \sum_{k=0}^\infty\;\frac{k^2}{2^k}=6 $$