Diophantine equation $x^2 + xy + y^2 = \left({{x+y}\over{3}} + 1\right)^3$. Solve in integers the equation$$x^2 + xy + y^2 = \left({{x+y}\over3} + 1\right)^3.$$
 A: Hint $1$ :
Let $t=\frac{x+y}{3}\in \mathbb Z$ the equation becomes:
$$y^2-3ty+(3t)^2-(t+1)^3=0 $$
a quadratic equation on $y$ which is soluble up to the condition $4t+1$ is a square.
Hint $2$: $\Delta_y=(t-2)^2(4t+1)$
Solutions $(t,y)=(a^2+a,-a^3+3a+1),(a^2+a,a^3+3a^2-1)$ for any parameter $a$
And it's your turn to do some work!

Edit
Because my answer is down-voted and I don't see the reasons, I will write a full solution based on my little hints below:

Claim If $(x,y)$ are integer solutions to the equation  :
  $$x^2 + xy + y^2 = \left({{x+y}\over3} + 1\right)^3\tag 1$$ then
  $(x,y)\text{ or } (y,x) \in\left\{\left(-a^3+3a+1,a^3+3a^2-1\right)\big | a\in \Bbb Z \right\}$

Proof
Let $(x,y)$ be a solution to the given equation, and let $t=\frac{x+y}{3}\in \Bbb Z$ so that:
$$y^2-3ty+(3t)^2-(t+1)^3=0 \tag 2$$
and this is a quadratic equation on $y$ so let's compute its discriminant:
$$\Delta_y=(3t)^2-4\left((3t)^2-(t+1)^3\right)=4(t+1)^3-27t^2=(t-2)^2(4t+1)\tag 3$$
so this equation has an integer solution $y$ only if $\Delta_y$ is a square of an integer, and this is equivalent to $4t+1$ is a square of an integer which implies that $t=a^2+a$ for some integer $a$. and because the equation $(2)$ is quadratic and we know the value of its discriminant we can find the two solutions on $y$:
$$\begin{align}y&=&\frac12\left(3t-(t-2)\sqrt{4t+1}\right)&=-a^3+3a+1\tag 4\\ y&=&\frac12\left(3t+(t-2)\sqrt{4t+1}\right)&=a^3+3a^2-1 \tag 5\end{align}$$
now that we found the value of $t$ and $y$ we can find the value of $x=3t-y$ which gives:
$$\left\{\begin{matrix}
 x=a^3+3a^2-1&\text{ and }& y=-a^3+3a+1 &\text{ or }\tag 6\\ 
 x=-a^3+3a+1&\text{ and } & y=a^3+3a^2-1 
\end{matrix}\right.$$
Finally:
$$(x,y)\text{ or } (y,x) \in\left\{\left(-a^3+3a+1,a^3+3a^2-1\right)\big | a\in \Bbb Z \right\}\tag 7$$
A: Setting $x+y=3t$ and $xy=s$, we obtain that
$$9t^2-s = (t+1)^3 \implies s = -t^3+6t^2-3t-1$$
$x$ and $y$ satisfying the quadratic $a^2 -3ta + s =0$. This means $9t^2-4s = k^2$. Eliminating $s$, we obtain
$$4t^3-15t^2+12t+4 = k^2 \implies 64t^3 - 240t^2 + 192t + 64 = (4k)^2$$
$$(4t-5)^3 - 108t + 189 = (8k)^2 \implies (4t-5)^3 - 27(4t-5) + 54 = (4k)^2$$
Hence, it boils down to solving for integer points on the elliptic curve
$$Y^2 = X^3 - 27X+54 = (X-3)^2(X+6)$$
Hence, we need $X+6=m^2$, i.e., $4t+1=m^2 \implies t = \dfrac{m^2-1}4$. This means $m$ has to be odd. Choosing $m=2p+1$, we obtain
$$t = \dfrac{4p^2+4p}4 = p^2 + p$$
This gives us that
$$Y = m(m^2-9) = (2p+1)(4p^2+4p-8) \implies k=(2p+1)(p+2)(p-1)$$
This gives us $x,y = \dfrac{3t \pm k}2 = t + \dfrac{t \pm k}2$.
Hence, to summarize,


*

*Pick any $p \in \mathbb{Z}$.

*Set $t=p(p+1)$ and $k = (2p+1)(p+2)(p-1)$

*This gives us $\boxed{\color{blue}{x,y = t + \dfrac{t \pm k}2}}$


If we only want unordered pairs, it suffice to vary $p$ just over $\mathbb{N}$. The first few values by varying $p$ from $0$ to $5$ are
\begin{array}{|c|c|c|}
\hline
p & x & y\\
\hline
0 & -1 & 1\\
1 & 3 & 3\\
2 & 19 & -1\\
3 & 53 & -17\\
4 & 111 & -51\\
5 & 199 & -109\\
\vdots & \vdots & \vdots\\
\hline
\end{array}
