Apparent Contradiction by WolframAlpha in Calcuation of $\sum_{k=1}^\infty k^{k-1} e^{-k} / k!$

185 Views Asked by At

Consider the infinite sum $$S = \sum_{k=1}^\infty \frac{k^{k-1} e^{-k}}{k!}.$$ Note that a basic version of Stirling's formula says that $k! \ge (k/e)^k \sqrt{2\pi k}$, and this tells us that $$S_N = \sum_{k=1}^N \frac{k^{k-1} e^{-k}}{k!} \le \sum_{k=1}^N \frac{k^{k-1} e^{-k}}{k^k e^{-k} \sqrt{2\pi k}} = \frac{1}{\sqrt{2\pi}} \sum_{k=1}^N k^{-3/2},$$ and so $S_N \to S$ with $S$ a convergent series. Moreover, a stronger form of Stirling's formula says that $k! \ge (k/e)^k \sqrt{2\pi k} e^{1/(12k + 1)}$. Plugging this in similarly gives $$S \le \frac{1}{\sqrt{2\pi}} \sum_{k=1}^\infty k^{-3/2} e^{-1/(12k+1)}.$$

WolframAlpha tells us here that this sum has numerical value approximately $0.95$, and specifically $S<1$. However, when asking WolframAlpha what $S$ is directly here, it says that $S = 1$.

As far as I can see, these two claims by WolframAlpha cannot be consistent. That is, unless I've made a mistake somewhere... Note that I haven't used an approximation for all $k$ which is only valid for large $k$: Wikipedia claims (via this paper) that the above stronger form holds for all positive integers $k$, not just sufficiently large ones.

If someone could enlighten me, I'd be most appreciative!


Note that this SE question along with the fact that $z \mapsto z e^{-z}$ is uniquely maximised at $z = 1$ tells us that $S = 1$. Indeed, taking $x = 1/e$ there gives us that $S$ satisfies $S e^{-S} = e^{-1}$, and the only $S$ satisfying this is $S = 1$, by the maximisation property mentioned above.

Thus it does appear that WolframAlpha is getting stung by rounding rounding errors. Thanks everyone for the comments.

2

There are 2 best solutions below

5
On BEST ANSWER

The original sum is exactly 1. The numeric approximation of the last sum in your question is actually $$1.0017976085327493751120130443778945039608311925192\ldots,$$ which is greater than $1$, so that particular input was not evaluated properly.

I leave it as an exercise to show that $$\sum_{k=1}^\infty \frac{k^{k-1} e^{-k}}{k!} = 1.$$

Incidentally, the sum arising from the coarser form of Stirling's approximation is $\zeta(3/2)/\sqrt{2\pi} \approx 1.04219$.

2
On

Lambert's W function has series $$W(x)=\sum_{k=1}^\infty \frac{(-1)^{k-1}\,k^{k-1}}{k!}x^k \tag 1$$

which has radius of convergence $1/e$. The series in $(1)$ can be obtained using Lagrange's Inversion Theorem.

Since we have $-W(-1/e)=1$, then from $(1)$ we see that

$$\sum_{k=1}^\infty \frac{(-1)^{k-1}\,k^{k-1}}{k!}\left(-\frac1e\right)^k=1$$

from which we recover the identity

$$\sum_{k=1}^\infty \frac{k^{k-1}e^{-k}}{k!}=1$$