a) điều kiện \(n\in Z\)
\(n^2+2n+4=n^2+2n+1+3=\left(n+1\right)^2+3\) chia hết cho 11
\(\Leftrightarrow\left(n+1\right)^2+3\) thuộc ước của 11 là \(\pm1;\pm11\)
ta có : \(\left\{{}\begin{matrix}\left(n+1\right)^2+3=1\\\left(n+1\right)^2+3=-1\\\left(n+1\right)^2+3=11\\\left(n+1\right)^2+3=-11\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}\left(n+1\right)^2=-2\left(vôlí\right)\\\left(n+1\right)^2=-4\left(vôlí\right)\\\left(n+1\right)^2=8\\\left(n+1\right)^2=-14\left(vôlí\right)\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}n+1=\sqrt{8}\\n+1=-\sqrt{8}\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}n=\sqrt{8}-1\left(loại\right)\\n=-\sqrt{8}-1\left(loại\right)\end{matrix}\right.\) vậy không có giá trị nào thỏa mãn
b) điều kiện \(x\in Z\)
\(n^2+2n-4=n^2+2n+1-5=\left(n+1\right)^2-5\) chia hết cho 11
\(\Leftrightarrow\left(n+1\right)^2-5\) thuộc ước của 11 là \(\pm1;\pm11\)
ta có : \(\left\{{}\begin{matrix}\left(n+1\right)^2-5=1\\\left(n+1\right)^2-5=-1\\\left(n+1\right)^2-5=11\\\left(n+1\right)^2-5=-11\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}\left(n+1\right)^2=6\\\left(n+1\right)^2=4\\\left(n+1\right)^2=16\\\left(n+1\right)^2=-6\left(vôlí\right)\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}\left\{{}\begin{matrix}n+1=\sqrt{6}\\n+1=-\sqrt{6}\end{matrix}\right.\\\left\{{}\begin{matrix}n+1=2\\n+1=-2\end{matrix}\right.\\\left\{{}\begin{matrix}n+1=4\\n+1=-4\end{matrix}\right.\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}\left\{{}\begin{matrix}n=\sqrt{6}-1\left(loại\right)\\n=-\sqrt{6}-1\left(loại\right)\end{matrix}\right.\\\left\{{}\begin{matrix}n=1\left(tmđk\right)\\n=-3\left(tmđk\right)\end{matrix}\right.\\\left\{{}\begin{matrix}n=3\left(tmđk\right)\\n=-5\left(tmđk\right)\end{matrix}\right.\end{matrix}\right.\)
vậy \(n=1;n=-3;n=3;n=-5\)