Is the Diophantine equation $y(x^3-y)=z^2+2$ solvable?

Do there exists integers $a,b$ such that their sum is a perfect cube while their product minus two is a perfect square?

Equivalently, do there exist integers $x,y,z$ such that $$ y(x^3-y)=z^2+2 \quad ? $$

The source of this problem is the MathOveflow question "What is the smallest unsolved diophantine equation?" that introduces a way to measure size of a Diophantine equation and asks for a non-trivial equation of the smallest size. I was able to solve all equations of size up to 25, but cannot solve this equation of size 26.

Update 21st July 2021: Thank you Servaes for solving the above equation. I also received a solution by e-mail from Prof. Will Sawin. In the comment you ask what is the next smallest open equations. Now all equations with sizes up to 28 has been solved, so the smallest nontrivial ones are of size 29. Examples are $$ y^2 - xyz + z^2 = x^3-5 $$ and $$ y(x^2+2) = 2zx+2z^2+1. $$ The last equation can of course be formulated as a question whether there exist integers $x$ and $z$ such that $x^2+2$ is a divisor of $2zx+2z^2+1$.

Update 24th July 2021: I now was able to solve $y(x^2+2) = 2zx+2z^2+1$, but not yet $y^2 - xyz + z^2 = x^3-5$.

Update 16th August 2021: Thank you Dipramit Majumdar and B. Sury for solving the equation $y^2 - xyz + z^2 = x^3-5$. Please look at my mathoverflow question https://mathoverflow.net/questions/400714/can-you-solve-the-listed-smallest-open-diophantine-equations for the list of next smallest open equations.


Solution 1:

Let $x$, $y$ and $z$ be integers such that $y(x^3-y)=z^2+2$. If $z$ is odd then $$y(x^3-y)\equiv z^2+2\equiv3\pmod{8},$$ and so $y$ and $x^3-y$ are odd, meaning that $x$ is even. Then $x^3\equiv0\pmod{8}$ and so $$y(x^3-y)\equiv-y^2\equiv7\pmod{8},$$ a contradiction. On the other hand, if $z$ is even then $$y(x^3-y)\equiv z^2+2\equiv2\pmod{4},$$ and so either $y$ or $x^3-y$ is even, but not both. It follows that $x$ is odd. In the factorization $$x^6-8=(x^2-2)(x^4+2x^2+4),$$ the gcd of the two factors on the right hand side divides $12$, but $x^2-2$ is odd and $x^2-2\not\equiv0\pmod{3}$ so in fact the two are coprime. We have $$x^2-2\equiv3\pmod{4},$$ so $x^2-2$ has a prime factor $p\equiv3\pmod{4}$ with odd multiplicity that does not divide $x^4+2x+4$. It follows that $x^6-8$ has a prime factor $p\equiv3\pmod{4}$ with odd multiplicity. It is a classical result that then $x^6-8$ is not a sum of two squares. But this contradicts the identity $$x^6-8=(2y-x^3)^2+(2z)^2.$$ So there is no pair of integers whose sum is a perfect cube and whose product is two more than a perfect square.