Ta có:
\(2n^2-n+2\)
\(=2n^2+n-2n-1+3\)
\(=n.\left(2n+1\right)-\left(2n+1\right)+3\)
\(\Rightarrow n.\left(2n+1\right)⋮\left(2n+1\right)\)
\(\Rightarrow2n+1⋮2n+1\)
\(\Rightarrow3⋮2n+1\)
\(\Rightarrow2n+1\inƯC\left(3\right).\)
\(\Rightarrow2n+1\in\left\{1;-1;3;-3\right\}.\)
Có 4 trường hợp:
\(\Rightarrow\left[{}\begin{matrix}2n+1=1\\2n+1=-1\\2n+1=3\\2n+1=-3\end{matrix}\right.\Rightarrow\left[{}\begin{matrix}2n=0\\2n=-2\\2n=2\\2n=-4\end{matrix}\right.\Rightarrow\left[{}\begin{matrix}n=0\\n=-1\\n=1\\n=-2\end{matrix}\right.\)
Vậy \(n\in\left\{0;-1;1;-2\right\}.\)
Chúc bạn học tốt!