Calculating the sum of $\sum\frac{n^2-2}{n!}$

Hint: Write $$ \frac{n^2-2}{n!}=\frac{n(n-1)}{n!}+\frac{n}{n!}-\frac2{n!} $$


Note that by throwing out terms which are zero, $$ \sum_{n=0}^\infty\frac{n(n-1)}{n!}=\sum_{n=2}^\infty\frac{n(n-1)}{n!} $$ and $$ \sum_{n=0}^\infty\frac{n}{n!}=\sum_{n=1}^\infty\frac{n}{n!} $$


I thought it might be instructive to present a way forward that can be applied to a wide class of problems.


The Taylor series representation of he exponential function is given by

$$\bbox[5px,border:2px solid #C0A000]{e^x=\sum_{n=0}^\infty \frac{x^n}{n!}} \tag 1$$

Differentiating $(1)$ term-by-term, we see that

$$\frac{d\,e^x}{dx}=e^x=\sum_{n=0}^\infty \frac{n x^{n-1}}{n!} \tag2$$

whereby multiplying $(2)$ by $x$ reveals

$$xe^x =\sum_{n=0}^\infty \frac{nx^n}{n!} \tag 3$$


Differentiating $(3)$, multiplying by $x$, and subtracting $2e^x$, we obtain

$$(x^2+x-2)e^x=\sum_{n=0}^\infty \frac{(n^2-2)\,x^{n}}{n!} \tag 4$$

Finally, setting $x=1$ in $(4)$ yields

$$\bbox[5px,border:2px solid #C0A000]{\sum_{n=0}\frac{n^2-2}{n!}=0}$$

and we are done!