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.) ?