322. Limit of a Sum. Calculate the value of the expression

$$
\lim _{n \rightarrow \infty} \sum_{k=0}^{n} \frac{k^{2}+3 k+1}{(k+2)!}
$$
322. 

$$
\begin{gathered}
\sum_{k=0}^{n} \frac{k^{2}+3 k+1}{(k+2)!}=\sum_{k=0}^{n}\left(\frac{1}{k!}-\frac{1}{(k+2)!}\right)= \\
=\left(\frac{1}{0!}+\frac{1}{2!}\right)+\left(\frac{1}{1!}-\frac{1}{3!}\right)+\cdots+\left(\frac{1}{n!}-\frac{1}{(n+2)!}\right)= \\
=\frac{1}{0!}+\frac{1}{1!}-\frac{1}{(n+1)!}-\frac{1}{(n+2)!}=2-\frac{n+3}{(n+2)!}
\end{gathered}
$$

From this, it follows that the desired limit is 2.

[E. Just and H. Geck, M. M., 44, 56 (January 1971).]