\(\frac{n^2+2n+7}{n+1}=\frac{\left(n^2+2n+1\right)+6}{n+1}=\frac{\left(n+1\right)^2+6}{n+1}=\left(n+1\right)+\frac{6}{n+1}\)(n\(\ne\)-1)
Để \(\left(n^2+2n+7\right)⋮\left(n+1\right)\) thì n+1\(\in\)Ư(6)
Ta có bảng sau:
n+1 | -6 | -1 | 1 | 6 |
n | -7 | -2 | 0 | 5 |
Vậy n\(\in\){-7;-2;0;5}
Ta có : \(n^2+2n+7⋮n+1\Rightarrow n^2+n+n+7⋮n+1\)
\(\Rightarrow n\left(n+1\right)+n+7⋮n+1\)
Vì : \(n\left(n+1\right)⋮n+1\Rightarrow n+7⋮n+1\)
Mà : \(n+1⋮n+1\Rightarrow\left(n+7\right)-\left(n+1\right)⋮n+1\)
\(\Rightarrow n+7-n-1⋮n+1\Rightarrow6⋮n+1\)
\(\Rightarrow n+1\in\left\{1;-1;2;-2;3;-3;6;-6\right\}\)
\(\Rightarrow n\in\left\{0;-2;1;-3;2;-4;5;-7\right\}\)
Vậy ...