-1

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.

J.-E. Pin
  • 40,163
Shuo
  • 3
  • 4
    I don't understand. The solutions are all the triples $(x,y,z)=(x,y,3x^2+y^2)$ for $x,y\in \mathbb Z$. That is to say, you can pick any $x,y$ you like and then $z$ is determined. – lulu Apr 15 '21 at 12:25
  • @lulu maybe a better formulation is: For what z exist integers x and y such that the equation is satisfied. – miracle173 Apr 15 '21 at 16:16
  • 1
    Yes, we also realized later that we don't need to solve this equation, as z is just 3x^2+y^2. However, as mentioned by miracle173, we need to find what z exist intergers x and y such that the equation is satisfied. – Shuo Apr 16 '21 at 07:15

1 Answers1

1

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$.

Oscar Lanzi
  • 39,403
rogerl
  • 22,399