# Can $x^2+y$ and $y^2+x$ both be perfect squares for $x,y$ positive integers?

I was recently idly reading some of the problems of the All Soviet Union Math Competitions, when I came across a fascinating problem from the 1966 edition, specifically problem 3:

Can $$x^2+y$$ and $$y^2+x$$ both be perfect squares for $$x,y$$ positive integers?

I found the problem delightfully elegant, and set out to try to solve it. My intuition told (and still tells me) that it is impossible for both expressions to be perfect squares, but I have not succeeded in demonstrating it either way. Starting with $$x^2+y=m^2$$ $$y^2+x=n^2$$ a bit of algebraic manipulation got me to $$(x-y)(x+y-1)=(m-n)(m+n)$$ or the same thing but with $$x$$ and $$y$$ exchanged as well as $$m$$ and $$n$$. This seemed promising to me, but I was unable to go anywhere with that idea after this. I figured this problem might somehow be solvable by infinite descent instead, but quickly got lost and found nothing of use. I also searched for a solution online, but was unable to find the relevant solution (although I admit I might have missed it). Any help any of you could give in finding or producing a solution would be greatly appreciated.

• It's not that complex. Just notice that if $y^2+x = (y+k)^2 \ge (y+1)^2$, then $x \ge 2y+1 \Rightarrow x^2 < x^2+y < (x+1)^2$. Jan 16, 2022 at 17:56
• Streamlining @Zerox's comment (but making it a bit less elegant): WLOG $y\ge x$, in which case $y^2 < y^2 + x < (y+1)^2$. Jan 16, 2022 at 18:11
• It is much easier to write out a general formula, and then find out when there are solutions. math.stackexchange.com/questions/1823950/… Jan 17, 2022 at 5:31

If $$x$$ and $$y$$ are identical, then $$x^2+x=x(x+1)$$ has to be a square where $$x^2.
If $$x$$ and $$y$$ are different, then wlog $$y and then $$x^2.
If $$x^2+y=m^2\Rightarrow m\geq x+1\Rightarrow y\geq 2x+1$$ .
This shows that if $$y^2+x$$ is a square then $$x\geq 2y+1$$.
Combine the last two inequalities to see that $$y\geq2x+1\geq 2(2y+1)+1=4y+3$$ which is of course impossible.