\(A=\frac{n+2}{n-5}\in Z\)
\(\Rightarrow n+2⋮n-5\)
\(\Rightarrow n-5+7⋮n-5\)
\(\Rightarrow7⋮n-5\)
\(\Rightarrow n-5\inƯ\left(7\right)\)
\(\Rightarrow n-5\left\{-7;-1;1;7\right\}\)
\(\Rightarrow n\in\left\{-2;4;6;12\right\}\)
Ta có: \(\frac{n+2}{n-5}=\frac{\left(n-5\right)+7}{n-5}=\frac{n-5}{n-5}+\frac{7}{n-5}=1+\frac{7}{n-5}\)
Để \(\frac{n+2}{n-5}\) là số nguyên thì \(7⋮n-5\)
\(\Rightarrow n-5\inƯ\left(7\right)=\left\{\pm1;\pm7\right\}\)
Ta có bảng sau:
n - 5 | 1 | -1 | 7 | -7 |
n | 6 | 4 | 12 | -2 |
Vậy: \(n\in\left\{-2;4;6;12\right\}\)
A=\(\dfrac{n+2}{n-5}=\dfrac{n-5+7}{n-5}=1+\dfrac{7}{n-5}.\)
Để \(1+\dfrac{7}{n-5}\)là số nguyên \(\Leftrightarrow\dfrac{7}{n-5}\)là số nguyên.
\(\Rightarrow n-5\inƯ\left(7\right)=\left\{\pm1;\pm7\right\}\)
\(\Rightarrow n=\left\{-2;4;6;12\right\}\)
Vậy \(n=\left\{-2;4;6;12\right\}\)