Evaluate $\sum_{k=1}^\infty \frac{k^2}{(k-1)!}$. [duplicate]

Let's start with $e^x=\sum_{k=1}^\infty \frac{x^{k-1}}{(k-1)!}$ then : $$x\,e^x=\sum_{k=1}^\infty \frac{x^k}{(k-1)!}$$ $$x(x\,e^x)'=x\,e^x+x^2\,e^x=\sum_{k=1}^\infty \frac{k\,x^k}{(k-1)!}$$ $$x(x(x\,e^x)')'=x(e^x+3x\,e^x+x^2\,e^x)=\sum_{k=1}^\infty \frac{k^2\,x^k}{(k-1)!}$$ Set $x=1$ to get : $$5\,e=\sum_{k=1}^\infty \frac{k^2}{(k-1)!}$$


The most elementary calculation is probably this one:

$$\begin{align*} \sum_{k\ge 0}\frac{(k+1)^2}{k!}&=1+\sum_{k\ge 1}\frac{k^2+2k+1}{k!}\\ &=\color{red}{1}+\sum_{k\ge 1}\frac{k}{(k-1)!}+2\sum_{k\ge 1}\frac1{(k-1)!}+\color{red}{\sum_{k\ge 1}\frac1{k!}}\\ &=\sum_{k\ge 1}\frac{k-1+1}{(k-1)!}+2\sum_{k\ge 0}\frac1{k!}+\color{red}{\sum_{k\ge 0}\frac1{k!}}\\ &=\color{blue}{1}+\sum_{k\ge 2}\frac1{(k-2)!}+\color{blue}{\sum_{k\ge 2}\frac1{(k-1)!}}+3\sum_{k\ge 0}\frac1{k!}\\ &=\color{blue}{\sum_{k\ge 0}\frac1{k!}}+4\sum_{k\ge 0}\frac1{k!}\\ &=5\sum_{k\ge 0}\frac1{k!}\\ &=5e\;. \end{align*}$$

One can also make use of the identity $$x^n=\sum_k{n\brace k}x^{\underline k}\;,$$ where ${n\brace k}$ is a Stirling number of the second kind and $x^{\underline k}\triangleq x(x-1)(x-2)\dots(x-k+1)$ is a falling power. In particular,

$$\begin{align*} k^3&=\sum_{k=0}^3{3\brace i}k^i\\ &=0\cdot k^{\underline 0}+1\cdot k^{\underline 1}+3\cdot k^{\underline 2}+1\cdot k^{\underline 3}\\ &=k+3k(k-1)+k(k-1)(k-2)\;, \end{align*}$$

whence

$$\begin{align*} \frac{k^2}{(k-1)!}&=\frac{k^3}{k!}=\frac{k+3k(k-1)+k(k-1)(k-2)}{k!}\\ &=\frac1{(k-1)!}+\frac3{(k-2)!}+\frac1{(k-3)!}\;, \end{align*}$$

and summing over $k$ yields $5e$ as before.