Ta có:
\(m=\frac{n^2+n+1}{n+1}\)
\(\Rightarrow m=\frac{n.\left(n+1\right)+1}{n+1}\)
\(\Rightarrow m=\frac{n.\left(n+1\right)}{n+1}+\frac{1}{n+1}\)
\(\Rightarrow m=n+\frac{1}{n+1}.\)
Vì \(m\) là số nguyên.
\(\Rightarrow\frac{1}{n+1}\) có giá trị nguyên.
\(\Rightarrow1⋮n+1\)
\(\Rightarrow n+1\inƯC\left(1\right)\)
\(\Rightarrow n+1\in\left\{1;-1\right\}.\)
\(\Rightarrow\left[{}\begin{matrix}n+1=1\\n+1=-1\end{matrix}\right.\Rightarrow\left[{}\begin{matrix}n=1-1\\n=\left(-1\right)-1\end{matrix}\right.\Rightarrow\left[{}\begin{matrix}n=0\\n=-2\end{matrix}\right.\)
+ Với \(n=0.\)
\(\Rightarrow m=\frac{0^2+0+1}{0+1}\)
\(\Rightarrow m=\frac{0+0+1}{0+1}\)
\(\Rightarrow m=\frac{1}{1}\)
\(\Rightarrow m=1\left(TM\right).\)
+ Với \(n=-2.\)
\(\Rightarrow m=\frac{\left(-2\right)^2+\left(-2\right)+1}{\left(-2\right)+1}\)
\(\Rightarrow m=\frac{4-2+1}{\left(-2\right)+1}\)
\(\Rightarrow m=\frac{3}{-1}\)
\(\Rightarrow m=-3\left(TM\right).\)
Vậy cặp số nguyên \(\left(m;n\right)\) thỏa mãn đề bài là: \(\left(1;0\right),\left(-3;-2\right).\)
Chúc bạn học tốt!