Theo đề ta có:
\(n+5⋮n+1\)
\(\Rightarrow\left(n+1\right)+4⋮n+1\)
\(\Rightarrow4⋮n+1\)
\(\Rightarrow n+1\inƯ\left(4\right)=\left\{1;2;4\right\}\) ( vì \(n\in N\) )
\(\Rightarrow\left\{{}\begin{matrix}n+1=1\Rightarrow n=0\\n+1=2\Rightarrow n=1\\n+1=4\Rightarrow n=3\end{matrix}\right.\)
Vậy \(n\in\left\{0;1;3\right\}\)