\(n+4⋮n+1\)
\(\Rightarrow n+1+3⋮n+1\)
\(\Rightarrow3⋮n+1\)
\(\Rightarrow n+1\inƯ\left(3\right)\)
\(\RightarrowƯ\left(3\right)=\left\{1;3\right\}\)
Ta có: \(n+1=1\Rightarrow n=0\)
\(n+1=3\Rightarrow n=2\)
\(\Rightarrow n\in\left\{0;2\right\}\)
\(n+6⋮n-1\)
\(\Rightarrow n-1+7⋮n-1\)
\(\Rightarrow7⋮n-1\)
\(\Rightarrow n-1\inƯ\left(7\right)\)
\(\RightarrowƯ\left(7\right)=\left\{1;7\right\}\)
Ta có: \(n-1=1\Rightarrow n=0\)
\(n-1=7\Rightarrow n=8\)
\(\Rightarrow n\in\left\{0;8\right\}\)