Để \(a=\frac{2n+7}{n+1}\inℤ\)thì \(2n+7⋮n+1\)
\(\Rightarrow\left(2n+7\right)⋮n+1\)
\(\Rightarrow\left(n+1\right)⋮n+1=\left(n+1\right)\cdot2⋮n+1=\left(2n+2\right)⋮n+1\)
\(\Rightarrow\left(2n+7\right)-\left(2n+2\right)⋮n+1\)
\(\Rightarrow2n+7-2n-2⋮n-1\)
\(\Rightarrow5⋮n-1\)
\(\Rightarrow n-1\inƯ\left(5\right)\)
\(Ư\left(5\right)=\left\{\pm1;\pm5\right\}\)
Ta có bảng sau :
\(n+1\) | \(1\) | \(-1\) | \(5\) | \(-5\) |
\(n\) | \(0\) | \(-2\) | \(4\) | \(-6\) |
Vậy \(n\in\left\{0,-2,4,-6\right\}\)thì \(a\inℤ\)