# Finding pairs of integers such that $x^2+3y$ and $y^2+3x$ are both perfect squares

Can we find pairs $(x,y)$ of positive integers such that $x^2+3y$ and $y^2+3x$ are simultaneously perfect squares? Thanks a lot in advance. My progress is minimal.

Not a complete solution but an approach that seems like it will work.

Assume $y \gt x$

Then we have that

$(y+2)^2 \gt y^2 + 3y \gt y^2+3x \gt y^2$

If $y^2 + 3x$ was a perfect square, then we have that $y^2 + 3x = (y+1)^2$.

This gives us $3x = 2y+1$.

Substitute in the other expression, and form similar inequalities. This will narrow down to few small cases to consider.

To elaborate, given $3x = 2y+1$

$x^2 + 3y = x^2 + \frac{9x-3}{2} \lt (x+3)^2$

Thus $x^2 + 3y$ is either $(x+1)^2$ or $(x+2)^2$.

Thus we have that

$3y = 2x+1$ or $3y = 4x + 4$.

Substitute $y = \frac{3x -1}{2}$ and solve the linear equation in $x$ and compute $y$. In the end, don't forget to verify that both the expressions are indeed perfect squares.

The other case $y=x$ can be treated similarly.

• Well, it does work!However, can you please tell me the motivation behind the first step? – Eisen Nov 11 '11 at 18:37
• Symmetry ($x^2+3y$ and $y^2+3x$) suggests that without loss of generality we can assume $y\ge x$. Also notice that if $x\sim y$, $y^2+3x$ is not much larger than $y^2$, so it may be equal to $(y+1)^2$ or $(y+2)^2$... To discuss this rigorously you need to assume $y\ge x$. – pharmine Nov 11 '11 at 19:22
• @SabyasachiMukherjee: What pharmine said. The idea is similar to proving that $x^2 + K$ is a perfect square only 'few' times. Adding a linear multiple of $x$ is just transposing $x$ to $x+a$. – Aryabhata Nov 12 '11 at 0:15
• How come this topic made it to the top of the list of asked questions?Does math.SE have some automatic system for bumping? – Eisen Dec 30 '11 at 8:45
• @bgins: $x$, $y$ are positive integers, as stated in the problem. – Aryabhata Dec 30 '11 at 13:49

$x^2+3y=a^2$ $y^2+3x=b^2$ $a,b \in \mathbb{N}$ assume wlog $x\ge y$ $a^2> x^2$ $a > x$ but since $x\ge y$ we have $x+2>a$

so $a=x+1$

$3y=2x+1$

$x=3k+1 ,y=2k+1$

$4k^2+4k+1+9k+3=b^2$ solving for k we get

$16b^2+105=t^2$ is a perfect square

$b=1,2,4,13$

so $b=2,4,13$ and $x=y=1$ or $x=16$, $y=11$ and if $y\ge x$ we can get $x=11$, $y=16$

Done!!!!