b: \(\Leftrightarrow n^3+n-n^2-1+n+8⋮n^2+1\)
\(\Leftrightarrow n+8⋮n^2+1\)
\(\Leftrightarrow n^2-64⋮n^2+1\)
\(\Leftrightarrow n^2+1\in\left\{1;-1;5;-5;13;-13;65;-65\right\}\)
hay \(n\in\left\{0;2;-2;8;-8\right\}\)
a: \(\Leftrightarrow n^3+n^2+n-4n^2-4n-4+3⋮n^2+n+1\)
\(\Leftrightarrow n^2+n+1\in\left\{1;3\right\}\)
=>n(n+1)=0 hoặc (n+2)(n-1)=0
hay \(n\in\left\{0;-1;-2;1\right\}\)