a: =>n^3-8+6 chia hết cho n-2
=>\(n-2\in\left\{1;-1;2;-2;3;-3;6;-6\right\}\)
=>\(n\in\left\{3;1;4;0;5;-1;8;-4\right\}\)
b: =>n^3+n^2+n-4n^2-4n-4+3 chia hết cho n^2+n+1
=>\(n^2+n+1\in\left\{1;3\right\}\)
\(\Leftrightarrow n\in\left\{0;-1;-2;1\right\}\)