# What's the value of $\sum\limits_{k=1}^{\infty}\frac{k^2}{k!}$?

For some series, it is easy to say whether it is convergent or not by the "convergence test", e.g., ratio test. However, it is nontrivial to calculate the value of the sum when the series converges. The question is motivated from the simple exercise to determining whether the series $\sum\limits_{k=1}^{\infty}\frac{k^2}{k!}$ is convergent. One may immediately get that it is convergent by the ratio test. So here is my question:

What's the value of $$\sum_{k=1}^{\infty}\frac{k^2}{k!}?$$

• In general, $$\sum_{n=0}^{\infty} \frac{n^k}{n!} = B_k e,$$ where $B_k$ is the $k$-th Bell-number. This is called the Dobinski's formula. This can be computed by expanding $n^k$ into the sum of falling factorials as in Olivier Oloa's answer. – Sangchul Lee Jan 19 at 2:43
• If $R>0$ and a power series $\sum_{j=0}^{\infty}a_jx^j$ converges to $f(x)$ for each $x\in (-R,R)$ then $f$ is differentiable on $(-R,R)$ and $\sum_{j=1}^{\infty}ja_jx^{j-1} =f'(x)$ for all $(-R,R).$ Notice also that the previous sentence now applies with $f$ replaced by $f'$. For example, for $|x|<2$ let $f(x) =1/(1-x)=\sum_{j=0}^{\infty}x^j .$ Then $\sum_{j=1}^{\infty}jx^{j-1}=f'(x)=1/(1-x)^2,$ and $\sum_{j=2}^{\infty}j(j-1)x^{j-2}=f''(x)=2/(1-x)^3.$ – DanielWainfleet Jan 19 at 3:33
• – lab bhattacharjee Jan 19 at 4:05

The sum is equal to $2e$. First of all, the term $k^2/k!$ may be partly canceled as $k/(k-1)!$. Second, this can be written as $(k-1+1)/(k-1)!$. The term $k-1+1$ is divided to two terms. In the first term, the $k-1$ may be canceled again, giving us $e$. The second term leads to $e$ immediately. So the total sum is $2\exp(1)$.

In a similar way, one may easily calculate the sum even if $k^2$ is replaced by $k^n$, any positive integer power of $k$. The result is always a multiple of $e$.

The value of $T_n := \displaystyle\sum_{k=1}^{\infty} \frac{k^n}{k!}$ is $B_n \cdot e$, where $B_n$ is the $n^{th}$ Bell number.

To see this, note that

\begin{align} T_{n+1} = \sum_{k=1}^{\infty} \frac{k^{n+1}}{k!} &= \sum_{k=0}^{\infty} \frac{(k+1)^n}{k!} \\ &= \sum_{k=0}^{\infty} \frac{1}{k!} \sum_{j=0}^n {n \choose j} k^j \\ &= \sum_{j=0}^n {n \choose j} \sum_{k=1}^{\infty} \frac{k^j}{k!} \\ &= \sum_{j=0}^{n} {n \choose j} T_j \end{align}

This is precisely the recursion formula that the Bell numbers follow, except that every term here is being multiplied by $e$.

Edit: I was unaware at the time I posted my answer, but the argument I gave goes by the name of Dobiński's formula.

Wolfram Alpha says it is $$2e$$. Another derivation is to start with $$e^x=\sum \limits_{n=0}^\infty \frac{x^n}{n!}$$, apply $$\frac{d}{dx}x\frac{d}{dx}$$ to both sides, and evaluate at $$x=1$$.

• $\frac{d}{dx}x\frac{d}{dx}$, typo? – Jack Jun 8 '11 at 17:46
• It means: differentiate, then multiply by $x$, then differentiate. – GEdgar Jun 8 '11 at 17:54

Hint 1: $k^2=k(k-1)+k$. Hint 2: simplify the fractions $k(k-1)/k!$ and $k/k!$. Hint 3: write the series expansion around $x=0$ of the function $x\mapsto\exp(x)$.

One may write \begin{align} \sum_{n = 1}^{ \infty}\frac{n^2}{n!}&=\sum_{n = 1}^{ \infty}\frac{n(n-1)+n}{n!} \\\\&=\sum_{n = 1}^{ \infty}\frac{n(n-1)}{n!}+\sum_{n = 1}^{ \infty}\frac{n}{n!} \\\\&=\sum_{n = 2}^{ \infty}\frac{1}{(n-2)!}+\sum_{n = 1}^{ \infty}\frac{1}{(n-1)!} \end{align}Can you take it from here?

• Further hints: Since $e^1 = \sum_{n=0}^{\infty} \frac{1}{n!}$, we have $$\sum_{n=2}^{\infty} \frac{1}{(n-2)!}= 1 + \frac{1}{2} + \frac{1}{3!} + .... = \sum_{n=0}^{\infty} \frac{1}{n!}$$ and $$\sum_{n=1}^{\infty} \frac{1}{(n-1)!} = 1 + \frac{1}{2} + \frac{1}{3!} + .... = \sum_{n=0}^{\infty} \frac{1}{n!}$$ So, ans: $\boxed{ 2 \mathrm{e} }$ – James Jan 19 at 2:39
• Ok both expressions sum to $e$, i get it, thanks a lot – user601297 Jan 19 at 2:45

A basic technique in real (complex) analysis is term by term differentiation of power series:

$$e^z=\sum_{k=0}^\infty\frac{z^k}{k!},\quad e^z=(e^z)'=\sum_{k=1}^\infty k\cdot\frac{z^{k-1}}{k!},\quad e^z=(e^z)''=\sum_{k=1}^\infty k(k-1)\frac{z^{k-2}}{k!}.$$ Evaluating at $z=1$, one immediately has $$e=\sum_{k=0}^\infty\frac{1}{k!},\quad e=\sum_{k=1}^\infty k\cdot\frac{1}{k!},\quad e=\sum_{k=1}^\infty (k^2-k)\frac{1}{k!}.$$ Combining the second and third equalities, we have the answer.

Just to give a slightly different approach,

$$\sum_{n=1}^\infty{n^2\over n!}=\sum_{n=1}^\infty{n\over(n-1)!}=\sum_{m=0}^\infty{m+1\over m!}=\sum_{m=0}^\infty{m\over m!}+e=\sum_{m=1}^\infty{m\over m!}+e=\sum_{m=1}^\infty{1\over(m-1)!}+e=\sum_{k=0}^\infty{1\over k!}+e=e+e$$

The trick in reading this is to note what changes across each equal sign as you proceed from left to right and understand what justifies the equality for each change.

$$e^x-1=\sum_{n\geq1}\frac{x^n}{n!}$$ Taking $$d/dx$$ on both sides, $$e^x=\sum_{n\geq1}\frac{n}{n!}x^{n-1}$$ Multiplying both sides by $$x$$, $$xe^x=\sum_{n\geq1}\frac{n}{n!}x^n$$ Then taking $$d/dx$$ on both sides again, $$(x+1)e^x=\sum_{n\geq1}\frac{n^2}{n!}x^{n-1}$$ Then plug in $$x=1$$: $$\sum_{n\geq1}\frac{n^2}{n!}=2e$$

Edit

This is a really neat trick that is widely used. Whenever you see an $$n^k$$ in the numerator, think applying the $$x\frac{d}{dx}$$ operator $$k$$ times. Example: $$e^x-1=\sum_{n\geq1}\frac{x^n}{n!}$$ Apply $$x\frac{d}{dx}$$: $$xe^x=\sum_{n\geq1}\frac{x}{n!}x^n$$ Apply $$x\frac{d}{dx}$$: $$x(x+1)e^x=\sum_{n\geq1}\frac{n^2}{n!}x^n$$ The pattern continues: $$\left(x\frac{d}{dx}\right)^k[e^x-1]=\sum_{n\geq1}\frac{n^k}{n!}x^n$$

A similar thing can be done with integration. Example:

Evaluate $$S=\sum_{n\geq0}\frac{(-1)^n}{(2n+2)(2n+1)}$$ Start by recalling that (use geometric series) $$\frac1{1+t^2}=\sum_{n\geq0}(-1)^nt^{2n}$$ Then integrate both sides from $$0$$ to $$x$$ to get $$\arctan x=\sum_{n\geq0}\frac{(-1)^n}{2n+1}x^{2n+1}$$ integrate both sides from $$0$$ to $$1$$ now to produce $$S=\sum_{n\geq0}\frac{(-1)^n}{(2n+2)(2n+1)}=\frac\pi4-\frac12\log2$$

• Amazing, this is exactly what I was looking for – user601297 Jan 19 at 2:51
• @user601297 you are very welcome :) – clathratus Jan 19 at 2:53