Find all permutations a1, a2, ... , a9 of 1, 2, ... , 9 such that a1 + a2 + a3 + a4 = a4 + a5 + a6 + a7 = a7 + a8 + a9 + a1 and a12 + a22 + a32 + a42 = a42 + a52 + a62 + a72 = a72 + a82 + a92 + a12.
Solution
We may start by assuming that a1 < a4 < a7 and that a2 < a3, a5 < a6, a8 < a9.
Note that 1 + ... + 9 = 45 and 12 + ... + 92 = 285. Adding the three square equations together we get (a12 + ... + a92) + a12 + a42 + a72 = 285 + a12 + a42 + a72. The total must be a multiple of 3. But 285 is a multiple of 3, so a12 + a42 + a72 must be a multiple of 3. Now 32, 62 and 92 are all congruent to 0 mod 3 and the other squares are all congruent to 1 mod 3. Hence either a1, a4 and a7 are all multiples of 3, or none of them are. Since 45 is also a multiple of three a similar argument with the three linear equations shows that a1 + a4 + a7 is a multiple of 3. So if none of a1, a4, a7 are multiples of 3, then they are all congruent to 1 mod 3 or all congruent to 2 mod 3. Thus we have three cases: (1) a1 = 3, a4 = 6, a7 = 9, (2) a1 = 1, a4 = 4, a7 = 7, and (3) a1 = 2, a4 = 5, a7 = 8.
In case (1), we have that each sum of squares equals 137. Hence a82 + a92 = 47. But 47 is not a sum of two squares, so this case gives no solutions.
In case (2), we have that each sum of squares is 117. Hence a52 + a62 = 52. But the only way of writing 52 as a sum of two squares is 42 + 62 and 4 is already taken by a4, so this case gives no solutions.
In case (3), we have that each sum of squares is 126 and each linear sum 20. We quickly find that the only solution is 2, 4, 9, 5, 1, 6, 8, 3, 7.
Obviously, this generates a large number of equivalent solutions. We can interchange a2 and a3, or a5 and a6, or a8 and a9. We can also permute a1, a4 and a7. So we get a total of 2 x 2 x 2 x 6 =48 solutions.
© John Scholes
jscholes@kalva.demon.co.uk
11 Apr 2002