Ta có \(\frac{n-5}{n+1}=\frac{n+1-6}{n+1}=\frac{-6}{n+1}\)
-6 chia hết cho n+1 => n+1 là Ư(-6)
Ư(-6) = { 1;2;3;6;-1;-2;-3;-6 }
Nếu n+1 = 1 => n = 0
Nếu n+1 = 2 => n = 1
Nếu n+1 = 3 => n = 2
Nếu n+1 = 6 => n = 5
Nếu n+1 = -1 => n = -2
Nếu n+1 = -2 => n = -3
Nếu n+1 = -3 => n = -4
Nếu n+1 = -6 => n = -7
Vậy x \(\in\){0;1;2;5;-2;-3;-4;-7}