\(x^2+2x+2020=k^2\) (\(k\in N\))
\(\Leftrightarrow\left(x+1\right)^2+2019=k^2\)
\(\Leftrightarrow k^2-\left(x+1\right)^2=2019\)
\(\Leftrightarrow\left(k-x-1\right)\left(k+x+1\right)=2019\)
Do \(\left\{{}\begin{matrix}k+x+1>0\\k+x+1>k-x-1\end{matrix}\right.\) nên ta có các trưởng hợp:
\(\left\{{}\begin{matrix}k-x-1=1\\k+x+1=2019\end{matrix}\right.\) \(\Rightarrow x=1008\)
\(\left\{{}\begin{matrix}k-x-1=3\\k+x+1=673\end{matrix}\right.\) \(\Rightarrow x=334\)