Ta có: \(\dfrac{2n-7}{n-5}=\dfrac{2\left(n-5\right)+3}{n-5}=2+\dfrac{3}{n-5}\)
Để \(M\in Z\) thì \(3⋮n-5\)
\(\Rightarrow n-5\inƯ\left(3\right)\)
\(\Rightarrow n-5\in\left\{\pm1;\pm3\right\}\)
_ \(n-5=1\Rightarrow n=6\left(nhận\right)\)
_ \(n-5=-1\Rightarrow n=4\left(nhận\right)\)
_ \(n-5=3\Rightarrow n=8\left(nhận\right)\)
_\(n-5=-3\Rightarrow n=2\left(nhận\right)\)
Vậy \(n\in\left\{2;4;6;8\right\}\).