Find all integers $n$ such that $\frac{n^{3}-n+5}{n^{2}+1}$ is an integer.

Initial 241
Solution: Notice that
$$
\begin{array}{l}
n^{3}-n+5=n\left(n^{2}+1\right)-(2 n-5) . \\
\text { Then } \frac{n^{3}-n+5}{n^{2}+1} \in \mathbf{Z} \Leftrightarrow \frac{2 n-5}{n^{2}+1} \in \mathbf{Z} \\
\Leftrightarrow \frac{n(2 n-5)}{n^{2}+1} \in \mathbf{Z}\left(n \text { and } n^{2}+1 \text { are coprime }\right) \\
\Leftrightarrow \frac{2\left(n^{2}+1\right)-(5 n+2)}{n^{2}+1} \in \mathbf{Z} \\
\Leftrightarrow \frac{5 n+2}{n^{2}+1} \in \mathbf{Z} .
\end{array}
$$

From equations (1) and (2), we get
$$
\begin{array}{l}
\frac{n^{3}-n+5}{n^{2}+1} \in \mathbf{Z} \\
\Rightarrow \frac{2(5 n+2)-5(2 n-5)}{n^{2}+1} \in \mathbf{Z} \\
\Rightarrow \frac{29}{n^{2}+1} \in \mathbf{Z}(29 \text { is a prime number) } \\
\Rightarrow n^{2}+1=1 \text { or } 29 \\
\Rightarrow n^{2}=0 \text { or } 28(28 \text { is not a perfect square) } \\
\Rightarrow n=0 .
\end{array}
$$

Clearly, $n=0$ satisfies the condition.
Therefore, the integer $n=0$.
Note: Alternatively, we can use $n^{2}+1 \leqslant|2 n-5|$ to estimate the range of $n$, and then check each value to solve this problem.