\(a^2+a+6\) là SCP
Suy ra đặt \(a^2+a+6=t^2\left(t\in Z\right)\)
\(\Leftrightarrow4a^2+4a+24=4t^2\)
\(\Leftrightarrow4a^2+4a+1-4t^2=-23\)
\(\Leftrightarrow\left(2t\right)^2-\left(2a+1\right)^2=23\)
\(\Leftrightarrow\left(2t+2a+1\right)\left(2t-2a-1\right)=23\)
Dễ thấy: \(2t+2a+1>2t-2a-1\forall a,t\in Z\)
\(\Rightarrow\hept{\begin{cases}2t+2a+1=23\\2t-2a-1=1\end{cases}}\)\(\Rightarrow\hept{\begin{cases}t=6\\a=5\end{cases}}\)(Thoả)
Vậy \(a=5\) thì \(a^2+a+6=6^2\) là SCP