a) \(x^2+x+1=x\left(x+1\right)+1\)
Vì \(x\inℤ\)\(\Rightarrow x\left(x+1\right)⋮x+1\)\(\Rightarrow\)Để \(x^2+x+1⋮x+1\)thì \(1⋮x+1\)
\(\Rightarrow x+1\inƯ\left(1\right)=\left\{-1;1\right\}\)\(\Rightarrow x\in\left\{-2;0\right\}\)
Vậy \(x\in\left\{-2;0\right\}\)
b) \(3x-8=3x-12+4=3\left(x-4\right)+4\)
Vì \(3\left(x-4\right)⋮x-4\)\(\Rightarrow\)Để \(3x-8⋮x-4\)thì \(4⋮x-4\)
\(\Rightarrow x-4\inƯ\left(4\right)=\left\{\pm1;\pm2;\pm4\right\}\)
Lập bảng giá trị ta có:
\(x-4\) | \(-4\) | \(-2\) | \(-1\) | \(1\) | \(2\) | \(4\) |
\(x\) | \(0\) | \(2\) | \(3\) | \(5\) | \(6\) | \(8\) |
Vậy \(x\in\left\{0;2;3;5;6;8\right\}\)