We will use the following algebraic formula:
(x2+y2+z2)2=(x2+y2−z2)2+(2xz)2+(2yz)2.
This means that if a positive integer can be represented as a sum of 3 squares, then so can its square. Consequently, if we put
(x0,y0,z0)(xn+1,yn+1,zn+1)=(1,1,1)=(xn2+yn2−zn2,2xnzn,2ynzn),
then by a trivial induction we obtain that xn2+yn2+zn2=32n.
It remains to show that gcd(xn,yn,zn)=1 for all n and we proceed by induction.
Suppose gcd(xn,yn,zn)=1, but xn+1,yn+1,zn+1 have some common prime divisor p. Observe that since 32n is odd, but 2xnzn and 2ynzn are even, we have that xn2+yn2−zn2 is odd, so p=2. Hence p∣xnzn and p∣ynzn. Then either p∣zn, or p∣xn and p∣yn. In the latter case we could infer from p∣xn2+yn2−zn2 that in fact also p∣zn, which contradicts the assumption that gcd(xn,yn,zn)=1. Hence we are left with the first case: p∣zn.
Since p∣xn2+yn2−zn2 and p∣zn, we also have that p∣xn2+yn2+zn2=32n. Hence in fact p=3. But the only quadratic residues modulo 3 are 0 and 1, so the two possibilities for a sum of three squares to be divisible by 3 is that either all or none of them is divisible by 3. The former case is excluded by the assumption that gcd(xn,yn,zn)=1 and the latter by p∣zn.
That's all. □