TITLE: Is it possible to generate a solution for this? $p^2 + q^2 + r^2 = pqr $
QUESTION [7 upvotes]: I have seen this problem in a local magazine.
I want to Generate an formula for this for the solutions of this problem
Oh and it's given that 
$$p,q,r \in\mathbb{N} $$
and they can be equal.

REPLY [2 votes]: There is no formula. All solutions result from taking a triple that solves the Markov equation
$$ x^2 + y^2 + z^2 = 3xyz  $$
and replacing the triple $(x,y,z)$ by $(3x,3y,3z),$ so $p=3x,$ $q=3y,$ $r=3z.$ There is a simple method for moving from one triple in the Markov tree and reaching a neighboring solution. See tree diagram at http://en.wikipedia.org/wiki/Markov_number
Hmmm. I don't see the description of travel to neighboring triples.
Beginning with
$$  (x,y,z) $$ the (usually three) neighbors are
$$  (3yz-x,y,z), $$
$$  (x,3xz-y,z) $$
$$  (x,y,3xy-z). $$
In all three cases, the three entries are traditionally put into increasing order. 
Note that people on this site generally call the movement step as an example of Vieta Jumping, http://en.wikipedia.org/wiki/Vieta_jumping
In particular, repeating the exact same jump (before putting the entries in order!) gets you back to where you were.
This was all worked out for an arbitrary number of values, A. Huwitz (1907) solving
$$ x_1^2 + x_2^2 + \cdots x_n^2 = a x_1 x_2 \cdots x_n  $$ with all positive integers. For $n=3$ the possible values of my letter $a$ are $a=3,$ the Markov triples, and $a=1,$ answers are $3$ times the Markov triples.
{"set_name": "stack_exchange", "score": 7, "question_id": 1255654}