TITLE: $x^2+xy+y^2$ and $x^2-xy+y^2$ are not both perfect squares
QUESTION [12 upvotes]: Prove that $x^2+xy+y^2$ and $x^2-xy+y^2$ cannot be both perfect squares.

Surely $x$ and $y$ are natural numbers. If $x^2+xy+y^2 =a^2$ and $x^2-xy+y^2=b^2$ simultaneously then we have to show that there are no such integers $a$ and $b$.
I have tried that:
Suppose $x^2+xy+y^2=a^2$ and $x^2-xy+y^2=b^2$. Then $2xy=a^2-b^2=(a+b)(a-b)$, so one of $x$ and $y$ is even, but then I am stuck.

REPLY [7 votes]: The question amounts to showing that the elliptic curve
$Y^2 = X^2+X+1$, $Z^2 = X^2-X+1$
has no rational points other than those with $X=0$ and $X=\infty$.
That can be done by elementary means but requires a Fermat-style descent.
According to Dickson's History of the Theory of Numbers
(Volume II, Chapter XVI, bottom of page 481, reference to footnote 119 on p.480),
the result was proved in 1876 by Genocchi.
[In modern language, a Weierstrass form for this curve is
$$y^2 = x^3+x^2-24x+36 = (x-2)(x-3)(x+6),$$
with conductor $48$ and thus in the "Antwerp Tables"
(see curve 48C),
where we find that it has Mordell-Weil group
$({\bf Z}/2{\bf Z}) \oplus ({\bf Z}/4{\bf Z})$.]