How can I evaluate this series? I have to evaluate the following sum:
$$\sum_{n=0}^{\infty} \frac{n^{2}-5n+2}{n!}$$
Could you recommend some guide for solving this?  I have not found any information that I could use for this type of exercise.
 A: $$\frac{n^2-5n+2}{n!}=\frac{n^2}{n!}-5\frac n{n!}+2\frac1{n!}$$

$$\frac{n^2}{n!}=\frac{n(n-1)+n}{n!}=\frac1{(n-2)!}+\frac1{(n-1)!}$$

$$\frac n{n!}=\frac1{(n-1)!}$$

where $\frac1{(-2)!}=\frac1{(-1)!}=0$ so that we have

$$S=\sum_{n=0}^\infty\frac1{(n-2)!}-\frac4{(n-1)!}+\frac2{n!}=e-4e+2e=-e$$

A: Let us make the problem more general considering $$F(x)=\sum_{n=0}^{\infty} \frac{an^{2}+bn+c}{n!}x^n$$ First, write $$an^2+bn+c=a(n(n-1)+n)+bn+c=an(n-1)+(a+b)n+c$$ $$F(x)=a\sum_{n=0}^{\infty} \frac{n(n-1)}{n!}x^n+(a+b)\sum_{n=0}^{\infty} \frac{n}{n!}x^n+c\sum_{n=0}^{\infty} \frac{x^n}{n!}$$ $$F(x)=ax^2\sum_{n=0}^{\infty} \frac{n(n-1)}{n!}x^{n-2}+(a+b)x\sum_{n=0}^{\infty} \frac{n}{n!}x^{n-1}+c\sum_{n=0}^{\infty} \frac{x^n}{n!}$$ $$F(x)=ax^2\left(\sum_{n=0}^{\infty} \frac{x^n}{n!}\right)''+(a+b)x\left(\sum_{n=0}^{\infty} \frac{x^n}{n!}\right)'+c \left(\sum_{n=0}^{\infty} \frac{x^n}{n!}\right)$$ $$F(x)=ax^2e^x+(a+b)xe^x+c e^x$$ $$F(1)=(2a+b+c)\,e$$
If you had faced the problem of $$G(x)=\sum_{n=0}^{\infty} \frac{an^{3}+bn^2+cn+d}{n!}x^n$$ writing $n^3=n(n-1)(n-2)+3n(n-1)+n$ and applying the same approach, you would obtain $$G(1)= (5 a+2 b+c+d)\,e$$ and so on.
