Solution:
Without loss of generality, we may assume that a1 is the largest among a1,a2,a3,a4,a5,a6. Consider the relation
a12−a1a2+a22=a22−a2a3+a32
This leads to
(a1−a3)(a1+a3−a2)=0
Observe that a1≥a2 and a3>0 together imply that the second factor on the left side is positive. Thus a1=a3=max{a1,a2,a3,a4,a5,a6}. Using this and the relation
a32−a3a4+a42=a42−a4a5+a52
we conclude that a3=a5 as above. Thus we have
a1=a3=a5=max{a1,a2,a3,a4,a5,a6}
Let us consider the other relations. Using
a22−a2a3+a32=a32−a3a4+a42
we get a2=a4 or a2+a4=a3=a1. Similarly, two more relations give either a4=a6 or a4+a6=a5=a1; and either a6=a2 or a6+a2=a1. Let us give values to a1 and count the number of six-tuples in each case.
(A) Suppose a1=1. In this case all aj's are equal and we get only one six-tuple (1,1,1,1,1,1).
(B) If a1=2, we have a3=a5=2. We observe that a2=a4=a6=1 or a2=a4=a6=2. We get two more six-tuples: (2,1,2,1,2,1),(2,2,2,2,2,2).
(C) Taking a1=3, we see that a3=a5=3. In this case we get nine possibilities for (a2,a4,a6)
(1,1,1),(2,2,2),(3,3,3),(1,1,2),(1,2,1),(2,1,1),(1,2,2),(2,1,2),(2,2,1)
(D) In the case a1=4, we have a3=a5=4 and
(a2,a4,a6)=(2,2,2),(4,4,4),(1,1,1),(3,3,3),(1,1,3),(1,3,1),(3,1,1),(1,3,3),(3,1,3),(3,3,1)
Thus we get 1+2+9+10=22 solutions. Since (a1,a3,a5) and (a2,a4,a6) may be interchanged, we get 22 more six-tuples. However there are 4 common among these, namely, (1,1,1,1,1,1),(2,2,2,2,2,2),(3,3,3,3,3,3) and (4,4,4,4,4,4). Hence the total number of six-tuples is 22+22−4=40.