2. Find all triples of natural numbers $a, b$, and $c$, for which the numbers $a^{2}+1$ and $b^{2}+1$ are prime and $\left(a^{2}+1\right)\left(b^{2}+1\right)=c^{2}+1$.
Answer: $(1,2,3)$ and $(2,1,3)$.

Solution. We can assume that $a \geqslant b$. Then $c^{2}+1=\left(a^{2}+1\right)\left(b^{2}+1\right) \leqslant\left(a^{2}+1\right)^{2}$, so $c^{2}<\left(a^{2}+1\right)^{2}$ and, therefore, $c<a^{2}+1$. On the other hand,

$$
(c+a)(c-a)=\left(c^{2}+1\right)-\left(a^{2}+1\right)=b^{2}\left(a^{2}+1\right)
$$

is divisible by $a^{2}+1$. But $c-a<a^{2}+1$ and $c+a<2\left(a^{2}+1\right)$, hence $c+a=a^{2}+1$ and $c-a=b^{2}$. Since $a=b=1$ does not satisfy the conditions of the problem, the prime number $a^{2}+1$ is odd. Thus, $c=a^{2}-a+1$ is also odd, and therefore the number $c^{2}+1$ is even. But it is the product of two prime numbers $a^{2}+1$ and $b^{2}+1$, so $b^{2}+1=2$ and $b=1$. Therefore, $c-a=1$, from which $a+1=c=a^{2}-a+1$ and, hence, $a=2$. It is easy to see that the triplet $a=2, b=1$ and $c=3$ satisfies the condition of the problem.