Equation with Vieta Jumping: $(x+y+z)^2=nxyz$.
May 31, 2020: today I added some explicit bounds, thereby finishing a proof of all the "fundamental solutions." Two extra ingredients were needed for $n$ less than $5$
SECOND ANSWER: If all you care about is the values of your letter $n,$ those are $n \leq 9$ but $n \neq 7.$
I do not see how anyone could get this without a copy of Hurwitz 1907 to consult. There is more to it than Vieta jumping, although all ingredients are elementary to confirm once they are pointed out. The end of the thing is that all solutions occur in one of thirteen trees, each with a root called a Grundlösung or fundamental solution. Each tree resembles the Markov Number Tree.
I write $$ (x+y+z)^2 = A xyz. $$ A fundamental solution is one for which $$ x \geq y \geq z \geq 1,$$ but $ x \leq Ayz - 2y - 2z - x, $ or $$ 2x \leq Ayz - 2y - 2z. $$ That is, the gap $$ Ayz - 2y - 2z - 2x \geq 0. $$ We write this as $Ayz - 2 (x+y+z)$ and square it, to get rid of the $x$ eventually. We get $$ \left(Ayz - 2 (x+y+z) \right)^2 = A^2 y^2 z^2 - 4Ayz(x +y+z) + 4(x+y+z)^2, $$ $$ \left(Ayz - 2 (x+y+z) \right)^2 = A^2 y^2 z^2 - 4Ayz(x +y+z) + 4Axyz, $$ $$ \left(Ayz - 2 (x+y+z) \right)^2 = A^2 y^2 z^2 - 4Ayz(y+z). $$ $$ \left(Ayz - 2 (x+y+z) \right)^2 = y^2 z^2 \left( A^2 - \frac{4A(y+z)}{yz} \right). $$ Next, we define, as in Hurwitz (9) and (11), $$ p_1 = \frac{A(y+z)}{yz} = A \left( \frac{1}{y} + \frac{1}{z} \right), $$ $$ p_2 = \frac{A(z+x)}{zx} = A \left( \frac{1}{z} + \frac{1}{x} \right), $$ $$ p_3 = \frac{A(x+y)}{xy} = A \left( \frac{1}{x} + \frac{1}{y} \right), $$ with $$ p_1 \geq p_2 \geq p_3 > 0. $$ So far $$ Ayz - 2 (x+y+z) = yz \sqrt {A^2 - 4p_1}, $$ $$ Azx - 2 (x+y+z) = zx \sqrt {A^2 - 4p_2}, $$ $$ Axy - 2 (x+y+z) = xy \sqrt {A^2 - 4p_3}. $$ Thus $$ Axyz - 2x (x+y+z) = xyz \sqrt {A^2 - 4p_1}, $$ $$ Axyz - 2y (x+y+z) = xyz \sqrt {A^2 - 4p_2}, $$ $$ Axyz - 2z (x+y+z) = xyz \sqrt {A^2 - 4p_3}. $$ Add these three, $$ 3Axyz - 2 (x+y+z)^2 = xyz \left( \sqrt {A^2 - 4p_1} + \sqrt {A^2 - 4p_2} + \sqrt {A^2 - 4p_3} \right). $$ Let me emphasize this here, we can make a common denominator and get $$ \sqrt {A^2 - 4p_1} = A - \frac{2x^2 + 2zx + 2xy}{xyz}, $$ $$ \sqrt {A^2 - 4p_2} = A - \frac{2y^2 + 2yz + 2xy}{xyz}, $$ $$ \sqrt {A^2 - 4p_3} = A - \frac{2z^2 + 2yz + 2zx }{xyz}. $$ $$ \sqrt {A^2 - 4p_1} + \sqrt {A^2 - 4p_2} + \sqrt {A^2 - 4p_3} = 3 A - 2 \frac{(x+y+z)^2}{xyz} = 3A - 2A = A. $$ Let us call this Hurwitz (13), that $$ \sqrt {A^2 - 4p_1} + \sqrt {A^2 - 4p_2} + \sqrt {A^2 - 4p_3} = A. $$ As $$ \sqrt {A^2 - 4p_1} \leq \sqrt {A^2 - 4p_2} \leq \sqrt {A^2 - 4p_3}, $$ we get $$ 3 \sqrt {A^2 - 4p_1} \leq A.$$ Square this, call this (14), $$ 9 A^2 - 36 p_1 \leq A^2, $$ or $ 8 A^2 \leq 36 p_1.$ Divide by $4,$ $$ 2A^2 \leq 9 p_1. $$ Recall $$ p_1 = A \left( \frac{1}{y} + \frac{1}{z} \right). $$ We get Hurwitz (15), for a fundamental solution, $$ 2A \leq 9 \left( \frac{1}{y} + \frac{1}{z} \right). $$ As $y \geq z \geq 1,$ the reciprocals are at most $1,$ sum at most $2,$ $2A \leq 18,$ and $$ \color{red}{ A \leq 9}. $$ Also, the sum of the two reciprocals is at most $2/z,$ from which we get $$ \color{red}{z \leq \frac{9}{A}}. $$
We briefly return to the definition of fundamental, $$ 2x \leq Ayz - 2 y - 2 z. $$ Multiply through by $x,$ we get $$ 2x^2 \leq Axyx - 2xy - 2zx, $$ or $$ 2x^2 \leq (x+y+z)^2 - 2 xy - 2 zx, $$ or $$ 2x^2 \leq x^2 + y^2 + z^2 + 2 y z. $$ This gives $$ x^2 \leq y^2 + 2 yz + z^2. $$ This gives what we could call Hurwitz (16), in a fundamental solution, $$ \color{red}{x \leq y+z}. $$ With these inequalities, I have already confirmed things for all $9 \geq A \geq 5.$ Mostly, this gives $z=1,$ so either $x=y$ or $x=y+1,$ and we can finish with the quadratic formula. One little outcome of that is $A \neq 7.$ Now that I look again, the trees on the roots with $9 \geq A \geq 5$ turn out to give all the solutions with $\gcd(x,y,z) = 1;$ good to know.
The fundamental solutions are
1 X: 16 Y: 8 Z: 8
1 X: 18 Y: 12 Z: 6
1 X: 25 Y: 20 Z: 5
1 X: 9 Y: 9 Z: 9
2 X: 8 Y: 4 Z: 4
2 X: 9 Y: 6 Z: 3
3 X: 3 Y: 3 Z: 3
3 X: 6 Y: 4 Z: 2
4 X: 4 Y: 2 Z: 2
5 X: 5 Y: 4 Z: 1
6 X: 3 Y: 2 Z: 1
8 X: 2 Y: 1 Z: 1
9 X: 1 Y: 1 Z: 1
jagy@phobeusjunior:~$
I thought I might draw the beginning of one of the trees, sideways as they do in Wikipedia. Here is $A=9.$ As $x,y,z$ are pairwise relatively prime and $9$ is a square, it is automatic that all entries in the tree are squares. Next day: I wrote a C++ program so that I would not need to copy the numbers by hand from my calculator. From what I can see, I made no errors yesterday...
A = 9
841, 187489, 1418727556
25, 841, 187489
25, 187489, 41809156
4, 25, 841
841, 28561, 216119401
4, 841, 28561
4, 28561, 970225
1,1,1---1,1,4---1,4,25
169, 37636, 57168721
25, 169, 37636
25, 37636, 8392609
1, 25, 169
169, 1156, 1755625
1, 169, 1156
1, 1156, 7921
I did another one, here is $A=8.$ This time, the pairwise gcd's are stil $1,$ but the product is double a square, so the entries are either square or twice squares. Note that the "trunk" is shorter this time, as the root has only two entries equal, not all three.
A = 8
121, 8450, 8162449
9, 121, 8450
9, 8450, 591361
2, 9, 121
121, 1681, 1623602
2, 121, 1681
2, 1681, 23409
1, 1, 2----1, 2, 9
50, 3481, 1385329
9, 50, 3481
9, 3481, 243602
1, 9, 50
50, 289, 114921
1, 50, 289
1, 289, 1682
With $A=6,$ each triple is a square, twice a square, and three times a square.
A = 6
25, 392, 57963
3, 25, 392
3, 392, 6241
2, 3, 25
25, 243, 35912
2, 25, 243
2, 243, 2401
1, 2, 3
8, 121, 5547
3, 8, 121
3, 121, 1922
1, 3, 8
8, 27, 1225
1, 8, 27
1, 27, 98
With $A=5$ each triple is a square, another square, and five times a square.
A = 5
81, 1849, 744980
5, 81, 1849
5, 1849, 42436
4, 5, 81
81, 1445, 582169
4, 81, 1445
4, 1445, 25921
1, 4, 5
9, 196, 8405
5, 9, 196
5, 196, 4489
1, 5, 9
9, 20, 841
1, 9, 20
1, 20, 49
ADDED, 31 May 2020: It seems to me that I never provided adequate bounds for small $A$ and $z.$ Far above we reached
We get Hurwitz (15), for a fundamental solution, $$ 2A \leq 9 \left( \frac{1}{y} + \frac{1}{z} \right). $$
At that point we used it to get both $A \leq 9$ and $Az \leq 9.$ But if we multiply it through by $2Ayz$ and complete the square, we get $$ (2Ay-9)(2Az - 9) \leq 81. $$ When $2Az > 9$ this gives a firm bound on $y,$ and we finish with $x \leq y+z.$
That condition is empty, though, when $Az \leq 4.$ Good thing that we can prove that never happens in a fundamental solution. Recall $$ x \geq y \geq z \geq 1, $$ $$ Ayz \geq 2x+2y+2z. $$ If, in addition, we consider $4 \geq Az,$ we have $$ 4y \geq Ayz. $$ Put them together to reach $$ 4y \geq 2x+2y+2z, $$ $$ 2y \geq 2x + 2z. $$ This is impossible as $z \geq 1 >0,$ also $x \geq y$ so $x+z > y$ and $$ 2x+2z>2y. $$ This contradicts the assumption that we had a fundamental solution with $Az \leq 4$
ALL TOGETHER. Let me put all the inequalities of a fundamental solution in one place. You can see how it amounts to finite search with explicit bounds, an easy computer program.
$$ \color{red}{ (x+y+z)^2 = Axyz} $$ $$ x \geq y \geq z \geq 1 $$ $$ Ayz \geq 2x+2y+2z$$ $$ 1 \leq A \leq 9 $$ $$ Az \leq 9 $$ $$ Az \geq 5 $$ $$ (2Az-9)(2Ay-9) \leq 81 $$ $$ x \leq y + z $$
Besides Vieta jumping one can successfully use Pell's equation. For $n=1$ this is demonstrated here, giving infinite families of solutions. This may work for other $n$, too. The author, Titu Andreescu, has written several notes on such Diophantine equations. If you search his articles, in particular on quadratic Diophantine equations, there are more references.
Remark: For Vieta jumping, for the different equation $x^2+y^2+z^2=nxyz$, see this question on MSE.
Fair to say this one is difficult; a full proof would need everything in HURWITZ 1907. Each fundamental solution is given as $x \geq y \geq z \geq 1,$ with $$ nyz - 2y- 2z \geq 2x, $$ or $$ 2(x+y+z) \leq nyz. $$ Each fundamental solution is the base of an infinite tree of solutions; given $(n;x,y,z),$ we get three solutions $$ (n; \; \; nyz - 2y- 2z-x, \; \; y, \; \; z), $$ $$ (n; \; \; x, \; \; nzx - 2z- 2x-y, \; \; z), $$ $$ (n; \; \; x, \; \; y, \; \; nxy - 2x- 2y-z). $$ The trees are quite similar to the Markov NumberTree
The fundamental solutions are
1 X: 16 Y: 8 Z: 8
1 X: 18 Y: 12 Z: 6
1 X: 25 Y: 20 Z: 5
1 X: 9 Y: 9 Z: 9
2 X: 8 Y: 4 Z: 4
2 X: 9 Y: 6 Z: 3
3 X: 3 Y: 3 Z: 3
3 X: 6 Y: 4 Z: 2
4 X: 4 Y: 2 Z: 2
5 X: 5 Y: 4 Z: 1
6 X: 3 Y: 2 Z: 1
8 X: 2 Y: 1 Z: 1
9 X: 1 Y: 1 Z: 1
jagy@phobeusjunior:~$
Notice how, for each $n > 1,$ we can create a solution with $n=1,$ from $(n;x,y,z)$ to $(1,nx,ny,nz).$ This may help proving something, as we may demand $(1;a,b,c)$ and hope to prove the list full.
We only care about finding $n$, as opposed to finding all (families of) solutions.
This solution follows that of a similar problem $(x+y+u+v)^2 = n^2 xyuv$ that was posed in Vietnam Mathematical Olympiad 2002.
The given equation is equivalent to
$$ x^2 + (2y + 2z - n yz) x + (y+z)^2 = 0 $$
Let $n$ be a integer with positive integer solutions.
Let $(x_0, y_0, z_0) $ be a solution with the minimum sum $x+y+z$.
WLOG $x_0 \geq y_0 \geq z_0$.
Observe that
1. $x_0 \mid ( y_0 + z_0)^2$.
2. $x_0$ is a positive integer solution to the quadratic function $f(x) x^2 + (2 y_0 + 2z_0 - n y_0z_0 ) x + (y+z)^2 $.
3. The other solution to the equation $f(x) = 0$ is $x_1 = -(2 y_0 + 2z_0 - n^2 y_0z_0 ) - x_0 = \frac{ (y_0+z_0)^2 } { x_0 }$.
4. So $ (x_1, y_0, z_0)$ is a solution, and thus $ x_1 \geq x_0$.
5. By considering the shape of the parabola, since $y_0 \not \in (x_0, x_1)$, hence $f(y_0) \geq 0 $.
Expanding, we get:
$0 \leq f(y_0) = y_0^2 + (2y_0 + 2z_0 - n y_0z_0)y_0 + (y_0 + z_0)^2$
$ \leq y_0^2 + (2y_0 + 2y_0)y_0 + (y_0 + y_0)^2 - n y_0^2 z_0$
$ = 9 y_0^2 - ny_0^2 z_0$
So $ n z_0 \leq 9$, which implies $ n \leq 9$.
Now, that we have a bound on $n$, it remains to find which of them have possible solutions.
For now, this is left as an exercise to the reader (Sorry!)
Thinking out loud. How can we show that $n = 7 $ has no solutions?
No results yet.
Suppose we had a solution to $ (x+y+z) ^2 = 7 xyz$.
Then $ x + y + z = 7 k$, so $ 7k^ 2 = xyz$.
If 7 divides two of these numbers, then it must divide all three.
Let $ x = 7x', y = 7y', z = 7 z'$,and we have $ ( x' + y' + z')^2 = 49 x'y'z'$, but we know from above that no solutions exist.
Hence, WLOG, $ 7 \mid x, 7 \not \mid yz, 7 \mid y+z$.
Let $ x = 7 x ', y + z = 7a$.
We have $ (x'+a)^2 = x'y(7a-y) $.