Solution:
We show that the required gcd is 24. Consider an element (a,b,c,d,e,f)∈S. We have
a2+b2+c2+d2+e2=f2
We first observe that not all a,b,c,d,e can be odd. Otherwise, we have a2≡b2≡c2≡d2≡e2≡1 (mod8) and hence f2≡5(mod8), which is impossible because no square can be congruent to 5 modulo 8. Thus at least one of a,b,c,d,e is even.
Similarly if none of a,b,c,d,e is divisible by 3, then a2≡b2≡c2≡d2≡e2≡1(mod3) and hence f2≡2(mod3) which again is impossible because no square is congruent to 2 modulo 3. Thus 3 divides abcdef.
There are several possibilities for a,b,c,d,e.
Case 1: Suppose one of them is even and the other four are odd; say a is even, b,c,d,e are odd. Then b2+c2+d2+e2≡4(mod8). If a2≡4(mod8), then f2≡0(mod8) and hence 2∣a,4∣f giving 8∣af. If a2≡0(mod8), then f2≡4(mod8) which again gives that 4∣a and 2∣f so that 8∣af. It follows that 8∣abcdef and hence 24∣abcdef.
Case 2: Suppose a,b are even and c,d,e are odd. Then c2+d2+e2≡3(mod8). Since a2+b2≡0 or 4 modulo 8, it follows that f2≡3 or 7(mod8) which is impossible. Hence this case does not arise.
Case 3: If three of a,b,c,d,e are even and two odd, then 8∣abcdef and hence 24∣abcdef.
Case 4: If four of a,b,c,d,e are even, then again 8∣abcdef and 24∣abcdef.
Here again for any six tuple (a,b,c,d,e,f) in S, we observe that 24∣abcdef. Since
12+12+12+22+32=42
We see that (1,1,1,2,3,4)∈S and hence 24∈T. Thus 24 is the gcd of T.