a/ \(n^2+12n+8=k^2\)
\(\Leftrightarrow\left(n+6\right)^2-28=k^2\)
\(\Leftrightarrow\left(n+6\right)^2-k^2=28\)
\(\Leftrightarrow\left(n-k+6\right)\left(n+k+6\right)=28\)
Do \(n-k+6+n+k+6=2n+12\) chẵn nên ta chỉ cần xét các cặp ước chẵn của 28
\(\Rightarrow\left(n-k+6\right)\left(n+k+6\right)=2.14\)
\(\Rightarrow\left\{{}\begin{matrix}n-k+6=2\\n+k+6=14\end{matrix}\right.\) \(\Rightarrow n=2\)
b/ Do \(b\ge a\Rightarrow b^2+4a+3\le b^2+4b+3< b^2+4b+4=\left(b+2\right)^2\)
Mặt khác \(b^2+4a+3>b^2\)
\(\Rightarrow b^2< b^2+4a+3< \left(b+2\right)^2\)
\(\Rightarrow b^2+4a+3=\left(b+1\right)^2\)
\(\Leftrightarrow b=2a+1\)
\(\Rightarrow a^2-5b+30=a^2-5\left(2a+1\right)+30=a^2-10a+25=\left(a-5\right)^2\)