Đặt \(n^2+2021=k^2\left(k\in N\right)\)
\(\Rightarrow k^2-n^2=2021\\ \Rightarrow\left(k-n\right)\left(k+n\right)=2021\)
Mà \(k,n\in N\)
\(\Rightarrow\left(k-n\right)\left(k+n\right)=2021\cdot1=43\cdot47\)
\(\left\{{}\begin{matrix}k-n=2021\\k+n=1\end{matrix}\right.\Rightarrow\left\{{}\begin{matrix}k=1011\\n=-1010\left(loại\right)\end{matrix}\right.\)
\(\left\{{}\begin{matrix}k-n=1\\k+n=2021\end{matrix}\right.\Rightarrow\left\{{}\begin{matrix}k=1011\\n=1010\end{matrix}\right.\left(nhận\right)\)
\(\left\{{}\begin{matrix}k-n=43\\k+n=47\end{matrix}\right.\Rightarrow\left\{{}\begin{matrix}k=45\\n=2\end{matrix}\right.\left(nhận\right)\)
\(\left\{{}\begin{matrix}k-n=47\\k+n=43\end{matrix}\right.\Rightarrow\left\{{}\begin{matrix}k=45\\n=-2\left(loại\right)\end{matrix}\right.\)
Vậy \(n\in\left\{2;1010\right\}\)
Giả sử n2+2021 là SCP
\(Đặtn^2+2021=k^2\left(k\in N\right)\\ \Rightarrow n^2-k^2=-2021\\ \Rightarrow\left(n-k\right)\left(n+k\right)=-2021\)
Vì \(n,k\in N\Rightarrow\left\{{}\begin{matrix}n-k< n+k\\n-k,n+k\in Z\\n-k,n+k\inƯ\left(-2021\right)\end{matrix}\right.\)
Ta có bảng:
n-k | -43 | -47 |
n+k | 47 | 43 |
n | 2 | -2 |
Mà n∈N⇒n=2
Vậy n=2