diophantine equation in positive integers

would you please help me solve this?

solve this equation in positive integers:

$x^2+y^2+z^2=3xyz$

I could prove that it's solutions are infinite, for if $(x,y,z)$ is a solution, with $x\le y \le z$, then $(3yz-x,y,z)$ is also a solution with $\max(x,y,z)< \max(3yz-x,y,z)$ and also $(1,1,1)$ is a solution, so we can build an infinite set of solutions, but I'm stuck to show that these are the only solutions. I'll be glad if you help me.


Edit, April 2015: the solutions of the diophantine equation are discussed at http://en.wikipedia.org/wiki/Markov_number while the spectrum and the book by Cusick and Flahive are mentioned at http://en.wikipedia.org/wiki/Markov_spectrum

ORIGINAL: This is a really nice topic. The punchline is that one finds all binary quadratic forms, integer coefficients $f(x,y) = a x^2 + b x y + c y^2$ and indefinite, so that the discriminant $\Delta = b^2 - 4 a c$ is positive but not allowed to be a square, such that the "Markov Ratio" is below 9.

The trick is that every such form $f(x,y)$ can only represent $0$ when both $x=0, y=0.$ So, for at least one of the variables nonzero, the form takes a nonzero value, maybe positive maybe negative. Either way, there is a positive minimum of the form, call it $M_f,$ such that $|f(x,y)| \geq M_f$ whenever $x,y$ are integers and not both 0.

What Kaplansky and I called the "Markov Ratio," terminology that is destined to die out, was $$ \frac{\Delta}{M_f^2} $$ can only be smaller than 9 for very special forms. I will report the terminology in Cusick and Flahive, The Markoff and Lagrange Spectra. Let us have the Markov equation $$ m^2 + m_1^2 + m_2^2 = 3 m m_1 m_2 $$ in positive integers. For each such $m,$ define a positive integer $u$ to be the least positive solution to $$ \pm m_2 x \equiv m_1 \pmod m. $$ Next, define $v$ by $u^2 + 1 = v m.$ The Markov forms are given by $$ f(x,y) = m x^2 + (3m-2u)xy + (v-3u)y^2$$ and give an integral equivalence class of every form for which $$ \frac{\Delta}{M_f^2} < 9.$$ The main theorem is that $$ M_f = m.$$ A short and understandable proof is in Cusick and Flahive, pages 20-22, Theorem 2, especially part (C).

Checking, we find $\Delta = 9 m^2 - 4.$ So, indeed $$ \frac{\Delta}{M_f^2} = 9 - \frac{4}{m^2}.$$ This is intimately connected with continued fractions, of course.

I am especially proud of finding a set of mirror forms, $$ g(x,y) = m^2 x^2 + m(3m-2u)xy + (u^2-3um -1)y^2$$ with $$ M_f = m^2, \; \; \Delta = 9 m^4 + 4 m^2, \; \; \frac{\Delta}{M_f^2} = 9 + \frac{4}{m^2}. $$ These were mentioned briefly as Section 8.3 of Indefinite Binary Quadratic Forms With Markov Ratio Exceeding 9 by me and Kap, Illinois Journal of Mathematics, volume 47, 2003, pages 305-316. The proof this time was not included but is similar to that section in Cusick and Flahive.

Another quirky note: all the Markov discriminants $9 m^2 - 4$ can be written as the sum of two squares. You don't see that every day.

ADDENDUM: the quadratic forms I have displayed are already "reduced," which means the continued fraction for the larger root $x/y$ is purely periodic, see How to detect when continued fractions period terminates


The algorithm described in the question leads, starting from (1,1,1) and rearranging in non-decreasing order after each iteration, to the series of solutions (1,1,1), (1,1,2), (1,2,5), (2,5,29), (5,29,433), …. This demonstrates that there are an infinity of solutions.

However, there are other solutions not in the above series. If (x, y, z) is a solution with $ x \le y \le z$, then (3xz – y, x, z) is also a solution. (3xz – y) must be positive since from $x^2 + y^2 + z^2 = 3xyz$ it follows that $y^2 < (3xz)y$ and therefore (given that y is positive) y < 3xz.

This alternative algorithm often yields new solutions. Starting from (1,2,5), for example, it gives the new solution (1,5,13), and repetition of this algorithm yields a further infinite series of solutions (1,5,13), (1,13,34), (1,34,89), …. (the y and z values being alternate numbers in the Fibonacci series).

Further information is in Mathworld at http://mathworld.wolfram.com/MarkovNumber.html