# find all natural solution that satisfy $x^2+y^2 = 3z^2$

I need to find all natural $x,y,z$ that satisfy the following $x^2+y^2 = 3z^2$

$(0,0,0)$ is an answer of course. What I tried: I tried solving with congruences. I know that every square number is either $0\pmod4$ or $1\pmod4$ so the sum of two squares is either $0\pmod4$ or $2\pmod4$. Now I'm stuck... Any help will be appreciated.

• $$x^2 + y^2 - 109 = \pm \ 4(x^2 + y^2) + \sqrt {4(x^2 + y^2)} \iff x^2 + y^2 = 3z^2$$ I spared you the math, but if you don't know how I got to this conclusion, I will explain it in an answer – George N. Missailidis Aug 22 '17 at 23:11
• Also assuming that $x + y = 2n + 1$. But either way, there is no solution if $(x, y, z, n) \in \mathbb{N}$ and thus serves as a contradiction. – George N. Missailidis Aug 23 '17 at 0:21

Consider the equation mod $3$. The right hand side is $0$. How does $x^2 + y^2 \pmod 3$ behave?

The possible squares mod $3$ are $0, 1$. In order to get $0$, we must have both $x^2$ and $y^2$ to be $0 \pmod 3$. But then $x$ and $y$ are divisible by $3$, and the left hand side is divisible by $9$. Then $3z^2$ is divisible by $9$, which means that $z$ is divisible by $3$.

If all $x,y,z$ are divisible by $3$, we should be able to replace them with $x/3, y/3, z/3$ and get another solution. Iterating this, we arrive at a contradiction, as no numbers are infinitely divisibly by $3$ (except the trivial solution $(0,0,0)$).

We assume without loss of generality that we have a solution with $z$ positive and minimal. Note that if $x,y,z$ have a common factor, we can divide by that common factor, which gives a solution with positive and smaller $z$. Hence in our solution $x,y,z$ do not have a common factor yet $z>0$.

Consider the problem mod 3. Since squares are either $0$ or $1$ mod 3, we conclude that $x^2\equiv y^2\equiv 0\pmod{3}$. Hence $3|x$ and $3|y$. But now $x^2+y^2$ is a multiple of $9$, so $3z^2$ is a multiple of $9$, so $3|z^2$ and hence $3|z$. Now $x,y,z$ have a common factor of 3, contrary to what was proved above.

Hence there are no solutions apart from $0,0,0$.

You nearly have it.

First note that if $(x,y,z)$ is a triplet that satisfies the equation, then taking $(x',y',z') = \left(\dfrac{x}{\gcd(x,y)},\dfrac{y}{\gcd(x,y)},\dfrac{z}{\gcd(x,y)}\right)$ also is a triplet that satisfies the equation. And $\gcd(x',y') = 1$. We call such a solution a primitive solution.

Assume that there is a non trivial solution, then there is a non trivial primitive solution $(X,Y,Z)$

Note that $LHS$ is either $0$, $1$ or $2$ $\pmod 4$ and that the $RHS$ is either $0$ or $3$ $\pmod 4$. The only option for $LHS = RHS$ is if they are both $0\pmod 4$, i.e. $4\mid X^2$, $4\mid Y^2$ and $4\mid Z^2$.

Or, equivalently, $2\mid X$, $2\mid Y$ and $2\mid Z$, but then $2\mid \gcd(X,Y)$ and therefore $(X,Y,Z)$ is not a primitive solution as we assumed.

The contradiction comes from assuming that there is a non trivial solution, therefore we can conclude that $(0,0,0)$ is the only one there is.

Hint, infinite descent. Take the equation modulo $3$ and keep reducing.

From your observation it follows that both $x$ and $y$ are divisible by $3$. So put $x=3u$, $y=3v$ into the equation to get $$9 u^2 + 9 v^2 = 3 z^2$$. Then $3(u^2 + v^2) = z^2$ and this implies that also $z$ is divisible by $3$. Setting $z = 3t$ you get $$u^2 + v^2 = 3 t^2$$ . So from the solution $(x,y,z)$ you got a new solution $(u,v,t)$ such that $(x,y,z) = 3(u,v,t)$. Then by iteration you get that unique solution must be $(x,y,z) = (0,0,0)$. Indeed, starting with a solution $(x,y,z)$ you can take the maximum power of $3$ that divide $x,y,z$ (assuming $(x,y,z) \neq (0,0,0)$). Then by the above procedure you get a new power of $3$. Contradiction.

generalisation : $x^2+y^2=pz^2$ does not admit a non-trivial solution, if $p$ is a prime and $p\equiv 3$ mod $4$

$\text {proof}$ : it's well-known fact that a integer, of course we are considering positive, can be written as sum of two squares iff all the powers of the primes of the form $p\equiv 3$ mod $4$ in it's canonical factorization are even. needless to say $pz^2$ does'nt satisfy this condition, if $p$ is of above form just described.

• Please consider adding a proof. Otherwise your post is more of a comment than an answer and is liable to be deleted. – epimorphic Jul 13 '15 at 15:49