\(\frac{n^2-7}{n+3}=\frac{n\left(n+3\right)-3n-7}{n+3}=\frac{n\left(n+3\right)}{n+3}-\frac{3n+7}{n+3}=n-\frac{3n+7}{n+3}\in Z\)
Suy ra \(3n+7⋮n+3\)
\(\frac{3n+7}{n+3}=\frac{3\left(n+3\right)-2}{n+3}=\frac{3\left(n+3\right)}{n+3}-\frac{2}{n+3}=3-\frac{2}{n+3}\in Z\)
Suy ra \(2⋮n+3\Rightarrow n+3\inƯ\left(2\right)=\left\{1;-1;2;-2\right\}\)
\(\Rightarrow n\in\left\{-2;-4;-1;-5\right\}\)