Solve Diophantine equation with three variables

diophantine equationselementary-number-theorynumber theorypell-type-equations

I am trying to generate all primitive solutions less than a certain limit for the following Diophantine equation.
$$x^2−y^2−z^2−xy−yz−zx=0$$
Using brute force, it seems that $x$ always takes the form $a^2+ab+b^2$ with $(a,b)=1$, $y$ and $z$ take the form $a^2-ab+b^2$ with $(a,b)=1$.

So far I have been unable to find a concrete parametric solutions. Any help will be much appreciated.

Edit: I was not far from solution. All primitive triples can be generated by $(a^2+ab+b^2,a^2+ab-b^2,b^2+ab-a^2)$ with $a>b$ and $(a,b)=1$.

Best Answer

$$x^2-x(y+z)−y^2−z^2−yz=0\hspace{1cm} /\cdot 4$$

$$4x^2-4x(y+z)−4y^2−4z^2−4yz=0$$

$$\underbrace{4x^2-4x(y+z)+\color{red}{(y+z)^2}}-\color{red}{(y+z)^2}−4y^2−4z^2−4yz=0$$

$$(2x-y-z)^2−5y^2−5z^2−6yz=0\hspace{1cm} /\cdot 5$$

$$5(2x-y-z)^2− \underbrace{ 25y^2−30yz \color{red}{-9z^2}}+\color{red}{9z^2}−25z^2=0$$

$$5(2x-y-z)^2−(5y+3z)^2−16z^2=0$$

So, if $a=2x-y-z$ and $b=5y+3z$ and $c=4z$ then you have to solve this Pell-s equation: $$5a^2=b^2+c^2$$

Related Question