Question 30Determine all positive integers $n$ for which there exists a divisor $d$ of $n$ such that $$ dn + 1 \mid d^2 + n^2. $$