What is the general solution to the equation $$\sum_{j=1}^n a_j^2=\prod_{j=1}^n a_j,$$ $n\in \mathbb N$ , $n \ge 2$ over $\mathbb N_0$ ?

WLOG, we can assume $0\le a_1 \le a_2\le \cdots \le a_n$

For every $n$, there is a solution, the trivial one: $a_1=\cdots =a_n=0$.

For $n=2$ , the equation has only the trivial solution.

For $n=3$, the solutions with $0\le a_1\le a_2\le a_3\le 100$ are :

? for(a=0,100,for(b=a,100,for(c=b,100,if(a^2+b^2+c^2==a*b*c,print(a," ",b,"  ",c
0 0  0
3 3  3
3 3  6
3 6  15
3 15  39
6 15  87

For $n=4$, the solutions with $0\le a_1\le a_2\le a_3\le a_4\le 100$ are :

?     for(a=0,100,for(b=a,100,for(c=b,100,for(d=c,100,if(a^2+b^2+c^2+d^2==a*b*c*d,pr
int(a," ",b,"  ",c," ",d))))))
0 0  0 0
2 2  2 2
2 2  2 6
2 2  6 22
2 2  22 82

For $n=5$, the solutions with $0\le a_1 \le a_2 \le a_3 \le a_4 \le a_5 \le 100$ are :

? for(a=0,100,for(b=a,100,for(c=b,100,for(d=c,100,for(e=d,100,if(a^2+b^2+c^2+d^2
+e^2==a*b*c*d*e,print(a," ",b,"  ",c," ",d," ",e)))))))
0 0  0 0 0
1 1  3 3 4
1 1  3 3 5
1 1  3 4 9
1 1  3 5 12
1 1  3 9 23
1 1  3 12 31
1 1  3 23 60
1 1  3 31 81
1 1  4 9 33
1 1  5 12 57
1 3  3 4 35
1 3  3 5 44

For $n=6$ and $0 \le a_1 \le a_2 \le a_3 \le a_4 \le a_5 \le a_6 \le 100$, the only solution is the trivial one.

  • What is known about the general solution (finite many or infinite many solutions, solutions with pairwise different numbers etc.) ?
  • $\begingroup$ Not sure if it helps but I asked a similar question approximately $6$ months ago, so you might want to take a look at it. $\endgroup$ Jul 30, 2015 at 20:59

1 Answer 1


in 1907, A. Hurwitz considered the slightly more general $$ a_1^2 + \cdots a_n^2 = A a_1 a_2 \cdots a_n, $$ everything positive integers. Some of the conclusions are : $1 \leq A \leq n.$ For a fixed $n$ and $A,$ the solutions are collected into a tree of solutions, with movement within the tree the exact same process as movement within the tree of Markov numbers; people on this site often call this Vieta jumping. Every tree has a root, Hurwitz called this a Grundlösung and found all for $n \leq 10.$ Ummm; one immediate result of Hurwitz is that your solutions for $n=3$ are all a Markov triple times $3.$

For any existing solution for some $n,A,$ we can vary just one entry $a_j$ by the replacement $$ a_j \mapsto \; \frac{A a_1 a_2 \cdots a_n}{a_j} - a_j. $$ Here I wrote the $a_j$ in the denominator to cancel the $a_j$ that is part of the multiplication in the numerator. Performing this flip move twice for the same $a_j$ gets you back where you started; it is an involution. For the vast majority of $n$-tuples, some $a_j$ decrease if flipped, others increase or stay the same. A fundamental solution (Grundlösung) is one where all flip moves increase all the $a_j$ or keep them the same. This is the root of one of the trees.

Assuming we order the variables so that $a_1 \geq a_2 \geq \cdots \geq a_n,$ a fundamental solution is simply one for which $$ 2 a_1 \leq A a_2 a_3 \cdots a_n. $$ Hurwitz found enough inequalities to show that there are a finite number of these for fixed $n,A.$ The inequalities are quite specific, if one checks all such and finds no fundamental solution, there is none. Meanwhile, my computations up to about $n= 200$ suggest the stronger

CONJECTURE: In a fundamental solution with $n \geq 3,$ we always have $$ a_1 \leq \sqrt{\frac{9(n+6)}{5}}$$ and equality occurs only when $ n = 5 w^2 - 6,$ integer $w \geq 2.$ The specific fundamental solution that gives equality is $$A=1, \; a_1 = 3 w, \; a_2 = 2 w, \; a_3 = 3, \; a_4 = a_5 = \cdots = a_n = 1.$$

Many questions on MSE amount to this sort of thing, and people think it is new in some way. If the expression admits this flipping sort of replacement, you keep reducing entries until it cannot be reduced any more. If inequalities reveal that no ground solution is possible, then original problem has no solution. This applies to your $n=6, A=1.$ No solutions. An early example on MSE: Diophantine quartic equation in four variables and one elsewhere: https://en.wikipedia.org/wiki/Apollonian_gasket#Integral_Apollonian_circle_packings These circle packings are an ongoing subject of research. One peculiar aspect is that the root solutions involve some negative numbers. There are other irregularities, consistent with this problem involving only a quadratic form, no higher degree term such as the Markov $3 a_1 a_2 a_3$ and Hurwitz $ a_1 a_2 a_3 \cdots a_n.$ I think it turned out that the Apollonian problem does not give genuine trees, just one giant blob of solutions. It has been a while.

Let's see, it is not until $n=14$ that we find two trees for a single value of $A,$ which turns out to be $A=1.$
One ordered fundamental solution is $$n=14,A=1: \; \;(3,3,2,2,1,1,…,1).$$ Another is $$n=14,A=1: \; \;(6,4,3,1,1,1,…,1).$$ These grow into two distinct trees. The mathematical word for this situation is forest. Really. The string of $1$'s is not a surprise. Hurwitz showed that a fundamental solution, for $n \geq 5,$ contains at least $$ n - 2 - \left\lfloor \log_2 n \right\rfloor $$ entries equal to $1.$

The table from Hurwitz:

enter image description here

  • 2
    $\begingroup$ Good Will Jagy ;-$)$ $\endgroup$
    – Lucian
    Jun 19, 2015 at 1:03
  • $\begingroup$ In one of my previous answers I proved the result of Hurwitz concerning the number of ones in a fondamental solution When $A=1$ (I don't know hurwitz's proof at the time but now I found that the method is the same) $\endgroup$
    – Elaqqad
    Jul 30, 2015 at 20:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .