a) \(\left(n+5\right)⋮\left(n+2\right)\)
Ta có : \(n+5=\left(n+2\right)+3\)
Mà \(\left(n+2\right)⋮\left(n+2\right)\)
\(\Rightarrow\) Để \(\left(n+5\right)⋮\left(n+2\right)\) thì 3 phải chia hết cho (n + 2)
\(\Rightarrow\) \(\left(n+2\right)\inƯ\left(3\right)=\left\{\pm1;\pm3\right\}\)
Ta có bảng sau :
\(n+2\) | \(1\) | \(-1\) | \(3\) | \(-3\) |
\(n\) | \(-1\) | \(-3\) | \(1\) | \(-5\) |
Vậy \(n\in\left\{-1;-3;1;-5\right\}\)
b) \(2\left(n-1\right)+2⋮\left(n-1\right)\)
Ta có : \(2\left(n-1\right)⋮\left(n-1\right)\)
Để \(2\left(n-1\right)+2⋮\left(n-1\right)\) \(\Rightarrow2⋮\left(n-1\right)\)
\(\Rightarrow\left(n-1\right)\inƯ\left(2\right)=\left\{\pm1;\pm2\right\}\)
Ta có bảng sau :
n - 1 | 1 | -1 | 2 | -2 |
n | 2 | 0 | 3 | -1 |
Vậy \(n\in\left\{2;0;3;-1\right\}\)