Để \(A=\frac{2n+7}{n+1}\) là số nguyên
\(\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\}\)
\(\Rightarrow\)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\)mới có giá trị nguyên
Ta có \(A=\frac{2n+7}{n+1}=\frac{2\left(n+1\right)+5}{n+1}=2+\frac{5}{n+1}\)
Để \(A\in Z\)thì \(\frac{5}{n+1}\in Z\)
\(\Rightarrow n+1\inƯ_{\left(5\right)}=\left\{\pm1;\pm5\right\}\)
n+1 | 1 | -1 | 5 | -5 |
n | 0 | -2 | 4 | -6 |
Vậy \(n\in\left\{0;-2;4;-6\right\}\)