Giải:
Ta có:
\(n+4⋮n+2\)
\(\Rightarrow\left(n+2\right)+2⋮n+2\)
\(\Rightarrow2⋮n+2\)
\(\Rightarrow n+2\in\left\{1;-1;2;-2\right\}\)
+) \(n+2=1\Rightarrow n=-1\)
+) \(n+2=-1\Rightarrow n=-3\)
+) \(n+2=2\Rightarrow n=0\)
+) \(n+2=-2\Rightarrow n=-4\)
Vậy \(n\in\left\{-1;-3;0;-4\right\}\)
\(n+4⋮n+2\)
\(\Rightarrow\left(n+2\right)+2⋮n+2\)
Do \(n+2⋮n+2\) nên để \(n+4⋮n+2\) thì \(2⋮n+2\)
\(\Rightarrow n+2\inƯ\left(2\right)\)
\(\Rightarrow n+2\in\left\{1;2\right\}\)
\(\Rightarrow n\in\left\{-1;0\right\}\)
n+4\(⋮\)n+2
(n+2)+2\(⋮\)n+2
Vì n+2\(⋮\)n+2
Buộc 2\(⋮\)n+2 mà n+2\(\ge\)2=>n+2ϵƯ(2)={2}
Với n+2=2=>n=0
Vậy n=0