TITLE: Divisibility - Math Olympiad: $x|(y^2+m)$ and $y|(x^2+m) $
QUESTION [6 upvotes]: Show that for any positive integer $m$, there is an infinite number of pairs of integers $(x,y)$ satisfying the conditions:
i) $\gcd(x,y)=1 $;
ii) $y \mid x^2+m$;
iii) $x \mid y^2+m$.

REPLY [4 votes]: We will also add the condition (4) that $ \gcd(xy , m) = 1$ (as pointed out by ThomasAndrews)
Observe that $ (x, y) = (m+1, (m+1)^2 + m) $ is a solution to the conditions.
Condition 1 is easy to verify.
Condition 2 is trivial.
Condition 3 follows easily. [You could also show that the polynomial $(m+1)$ is a factor of the polynomial $[ (m+1)^2 + m ] ^2 + m$ by substituting $m=-1$ to obtain $[ (-1 + 1)^2 + 1]^2 -1 = 0$ and applying the Remainder Factor Theorem.]
Condition 4 is trivial.
Note: For $m=1$, we get $(x, y) = (2, 5)$.
We now proceed by Vieta's Root Jumping (as Jyrki suggested). Given any solution $(x, y)$, we know that $$xy \mid (x^2 + m)(y^2 + m) \Leftrightarrow xy \mid mx^2 + my^2 + m^2 \Leftrightarrow xy \mid x^2 + y^2 + m$$
Hence, there exists a $D$ such that $Dxy = x^2 + y^2 + m$.
Claim: $(y, Dx-y)$ is a another solution. You can either check this through algebraic manipulation, or realize that $Dx-y$ is the other integer root to the above equation (when viewed as a quadratic in $y$). Remember to check all the conditions.
As Ivan suggested, to show that we have distinct solutions, we will show that $x < y \Rightarrow y < Dy-x$, and thus the Veita jumping gives us a strictly increasing sequence. From the product of roots, we get that $(Dx-y) \times x = y^2 + m \geq y^2$. Hence, $x< y \Rightarrow Dy-x \geq \frac {y^2}{x} > \frac {y^2}{y} = y $.