Do \(n^2+2n+6\) là số chính phương nên đặt: \(n^2+2n+6=a^2\)
\(\Rightarrow n^2+2n+1+5=a^2\)
\(\Rightarrow\left(n^2+2n+1\right)+5=a^2\)
\(\Rightarrow\left(n+1\right)^2+5=a^2\)
\(\Rightarrow a^2-\left(n+1\right)^2=5\)
\(\Rightarrow\left(a+n+1\right)\left(a-n-1\right)=5\)
\(\Rightarrow\left(a+n+1\right)\left(a-n-1\right)=5\cdot1\)
Ta có: \(a+n+1>a-n-1\)
\(\Rightarrow\left\{{}\begin{matrix}a+n+1=5\\a-n-1=1\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}a+n=4\\a-n=2\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}a=\left(4+2\right):2\\n=\left(4-2\right):2\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}a=3\\n=1\end{matrix}\right.\)
Vậy: \(n^2+2n+6\) là số chính phương khi \(n=1\)
\(n^2+2n+6\) là số chính phương
Đặt \(n^2+2n+6=k^2\left(k\in N\right)\)
\(\Leftrightarrow4n^2+8n+24=4k^2\)
\(\Leftrightarrow4n^2+8n+1+23=\left(2k\right)^2\)
\(\Leftrightarrow\left(2n+1\right)^2+23=\left(2k\right)^2\)
\(\Leftrightarrow\left(2k\right)^2-\left(2n+1\right)^2=23\)
\(\Leftrightarrow\left(2k+2n+1\right)\left(2k-2n-1\right)=23\)
mà \(2k+2n+1>2k-2n-1,\forall a;k\in N\)
\(\Leftrightarrow\left\{{}\begin{matrix}2k+2n+1=23\\2k-2n-1=1\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}2k+2n=22\\2k-2n=2\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}k+n=11\\k-n=1\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}k=6\\n=5\end{matrix}\right.\)
Vậy \(n=5\) thỏa mãn đề bài