## Task A-4.3.

Determine all natural numbers $n$ for which there exists a divisor $d$ of $n$ such that

$$
d n+1 \mid d^{2}+n^{2}
$$
## Solution.

Let $n=a d$. The condition $d n+1 \mid d^{2}+n^{2}$ can be written as $a d^{2}+1 \mid d^{2}+a^{2} d^{2}$.

Then $a d^{2}+1$ divides $d^{2}+a^{2} d^{2}-a \cdot\left(a d^{2}+1\right)=d^{2}-a$.

Consider the possibilities for the sign of the number $d^{2}-a$.

If $d^{2}-a>0$, then it must also be true that $d^{2}-a \geqslant a d^{2}+1$ (the multiple must be at least as large as the divisor). Since $a$ is a natural number, it follows that $d^{2} \geqslant a d^{2}+a+1>d^{2}$, which is impossible.

If $d^{2}-a<0$, then $a-d^{2}>0$. Then it must be that $a-d^{2} \geqslant a d^{2}+1$. Since $d$ is a natural number, it follows that $a \geqslant a d^{2}+1+d^{2}>a$, which is also impossible.

Therefore, the only possibility is that $d^{2}-a=0$, i.e., $a=d^{2}$ and $n=d^{3}$. Then indeed $d^{4}+1$ divides $d^{2}+d^{6}=d^{2}\left(d^{4}+1\right)$, so all the desired numbers $n$ are cubes of natural numbers.