Giải thích các bước giải:
$n^{2} + 4 \vdots n + 1$
$\Leftrightarrow n^{2} + n + 4 - n \vdots n + 1$
$\Leftrightarrow n(n + 1) + 4 - n \vdots n + 1$
$\Leftrightarrow 4 - n \vdots n + 1$
$\Leftrightarrow -1 - n + 5 \vdots n + 1$
$\Leftrightarrow -(n + 1) + 5 \vdots n + 1$
$\Leftrightarrow 5 \vdots n + 1$
$\Leftrightarrow n + 1 \in Ư(5)$
$\Leftrightarrow n + 1 \in \left \{ -5; -1; 1; 5 \right \}$
$\Leftrightarrow n \in \left \{ -6; -2; 0; 4 \right \}$