Find the $n$ such that $n^{2}+1 \mid n^{5}+3$.

 untranslated text has been translated while preserving the original formatting and structure.
On a $n\left(n^{2}+1\right)\left(n^{2}-1\right)=n^{5}-n$, so $n^{2}+1 \mid n^{5}+3-\left(n^{5}-n\right)=n+3$. For $n \geqslant 3, n^{2}+1 \geqslant$ $3 n+1 \geqslant n+6+1>n+3$, so $n \leqslant 2$. Conversely, $n=0,1,2$ are all three solutions.