# Exponential identity

How can one show the following identity $ne^n = \sum_{k=0}^{\infty}n^k(n - k)^2/k!$ ?

-

It is convenient to replace $n$ by $\lambda$. Then, you want to show that $$\sum\limits_{k = 0}^\infty {\frac{{\lambda ^k (\lambda - k)^2 }}{{k!}}} = \lambda e^\lambda .$$ Starting as Didier suggested, write the left-hand side as $$\sum\limits_{k = 0}^\infty {\frac{{\lambda ^k (\lambda - k)^2 }}{{k!}}} = \lambda ^2 e^\lambda \sum\limits_{k = 0}^\infty {e^{ - \lambda } \frac{{\lambda ^k }}{{k!}}} - 2\lambda e^\lambda \sum\limits_{k = 0}^\infty {ke^{ - \lambda } \frac{{\lambda ^k }}{{k!}}} + e^\lambda \sum\limits_{k = 0}^\infty {k^2 e^{ - \lambda } \frac{{\lambda ^k }}{{k!}}}.$$ Now, if $X$ is a Poisson random variable with mean $\lambda$, then $${\rm E}(X) = \sum\limits_{k = 0}^\infty {ke^{ - \lambda } \frac{{\lambda ^k }}{{k!}}}$$ and $${\rm E}(X^2) = \sum\limits_{k = 0}^\infty {k^2 e^{ - \lambda } \frac{{\lambda ^k }}{{k!}}} .$$ From the facts that ${\rm E}(X) = \lambda$ and ${\rm E}(X^2) = {\rm Var}(X) + {\rm E}^2 (X) = \lambda + \lambda^2$ (and noting that $\sum\nolimits_{k = 0}^\infty {e^{ - \lambda } \frac{{\lambda ^k }}{{k!}}} = 1$), it follows that $$\sum\limits_{k = 0}^\infty {\frac{{\lambda ^k (\lambda - k)^2 }}{{k!}}} = e^\lambda (\lambda ^2 - 2\lambda ^2 + \lambda + \lambda ^2 ) = \lambda e^\lambda .$$
By developing the square as $(n-k)^2=n^2-(2n-1)k+k(k-1)$ and evaluating each of the three resulting sums over $k$.