2. Find all natural numbers $a$ and $b$ such that

$$
a\left|b^{2}, \quad b\right| a^{2} \quad \text { and } \quad a+1 \mid b^{2}+1 . \quad \text { (Dušan Djukić) }
$$
2. Set $b^{2}=c a$. The problem conditions become $b^{2}=c a \mid a^{4}$ and $a+1 \mid c a+1$, which is equivalent to

$$
c \mid a^{3} \quad \text { and } \quad a+1 \mid c-1
$$

Write $c=d(a+1)+1, d \in \mathbb{N}_{0}$. Since $a^{3} \equiv-1(\bmod a+1)$, we have $\frac{a^{3}}{c} \equiv$ $-1(\bmod a+1)$, i.e. $\frac{a^{3}}{c}=e(a+1)-1$ for some $e \in \mathbb{N}$. It follows that $a^{3}=$ $(d(a+1)+1)(e(a+1)-1)$, which after expending and canceling $a+1$ yields $a^{2}-a+1=d e(a+1)+(e-d)$. Thus $e-d \equiv a^{2}-a+1 \equiv 3(\bmod (a+1))$, so

$$
e-d=k(a+1)+3 \quad \text { and } \quad d e=a-2-k \quad(k \in \mathbb{Z})
$$

We distinguish the following cases:

(1) $k \notin\{-1,0\}$. Then $d e<|e-d|-1$, implying $d=0$. Now $c=1$ and $b^{2}=a$, so $(a, b)=\left(t^{2}, t\right)$.

(2) $k=-1$. Then $a=d+1$. Now we get $c=a^{2}$ and $b^{2}=a^{3}$, so $(a, b)=\left(t^{2}, t^{3}\right)$.

(3) $k=0$. We get $a=d^{2}+3 d+2$. Now $c=d(a+1)+1=(d+1)^{3}$ and $b^{2}=c a=(d+1)^{4}(d+2)$. It follows that $d+2=t^{2}$ for some $t \in \mathbb{N}$, which gives us $(a, b)=\left(t^{2}\left(t^{2}-1\right), t\left(t^{2}-1\right)^{2}\right), t \geq 2$.

Thus the possible pairs $(a, b)$ are $\left(t^{2}, t\right),\left(t^{2}, t^{3}\right)$ and $\left(t^{2}\left(t^{2}-1\right), t\left(t^{2}-1\right)^{2}\right), t \in \mathbb{N}$.