2. Determine the smallest natural number $n$ for which $n^{2}+2022 n$ is a perfect square of a natural number.
Solution. Let $m$ be a natural number such that $n^{2}+2022 n=m^{2}$. The last equality is successively equivalent to the equalities

$$
\begin{aligned}
& (n+1011)^{2}-1011^{2}=m^{2} \\
& (n+1011)^{2}-m^{2}=1011^{2} \\
& (n+m+1011)(n-m+1011)=3^{2} \cdot 337^{2}
\end{aligned}
$$

Let $n+m+1011=p, n-m+1011=q$. Then $p q=3^{2} \cdot 337^{2}, p, q \in \mathbb{N}$ and $p>q$. According to this, $(p, q) \in\left\{\left(1011^{2}, 1\right),\left(3 \cdot 337^{2}, 3\right),\left(337^{2}, 3^{2}\right),\left(3^{2} \cdot 337,337\right)\right\}$. Further, from the equations $n+m+1011=p, n-m+1011=q$ it follows that $m=\frac{p-q}{2}$ and $n=\frac{p+q}{2}-1011$. The smallest value for $n$ is obtained for the smallest value of the sum $p+q$, i.e., for $p+q=3^{2} \cdot 337+337=\left(3^{2}+1\right) \cdot 337=3370$. Thus,

$$
n=\frac{p+q}{2}-1011=\frac{3370}{2}-1011=674
$$