Diophantine equation $3x^2+y^2=z$

129 Views Asked by At

I am currently facing a Diophantine equation $3x^2+y^2=z$, in which $x$, $y$, $z$ are integers. My major is not math and I am entirely new to Diophantine equation. I googled this but only found questions like $ax^2+by^2=z^2$, which are not the same as mine.

Does any one know how to solve this Diophantine equation? I would be very appriciated if someone could give me some hint.

1

There are 1 best solutions below

2
On BEST ANSWER

If you are trying to find all $z$ that can be written in this form, you can start with the fact (Fermat) that a prime $p$ can be written as $p = x^2+3y^2$ if and only if either $p\equiv 1\bmod{3}$ or $p$ is specifically equal to $3$. Brahmagupta's identity then shows that the product of any number of such primes is also representable in this way.

This covers all cases where $x$ and $y$ are relatively prime. You may also have a common factor $k$ so that $x=kx', y=ky', z=k^2z'$ with the relatively prime numbers $x',y',z'$, satisfying the conditions above but no restriction on $k$.