Olympiad Maths Prep

Track / Stage 8 / 49 of 180 #1749 of 2000

Problem 1749

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.1 Prove it Team Selection Test for IMO 2007 · Turkey · 2007

Find all positive odd integers nn for which there exist odd integers x1,x2,,xnx_1, x_2, \dots, x_n such that
x12+x22++xn2=n4. x_1^2 + x_2^2 + \dots + x_n^2 = n^4.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Since nn is odd, n41(mod8)n^4 \equiv 1 \pmod{8}. Since xix_i is odd, xi21(mod8)x_i^2 \equiv 1 \pmod{8} for 1in1 \le i \le n. Hence n=x12+x22++xn2n41(mod8)n = x_1^2 + x_2^2 + \dots + x_n^2 \equiv n^4 \equiv 1 \pmod{8}.

On the other hand, if n1(mod8)n \equiv 1 \pmod{8}, then odd numbers x1,x2,,xnx_1, x_2, \dots, x_n satisfying the required equality can be found. If n=1n = 1, then x1=1x_1 = 1 will do: n4=1=x12n^4 = 1 = x_1^2. If n=8k+1n = 8k + 1 where kk is a positive integer, then
n4=(8k+1)4=(8k1)4+(8k+1)4(8k1)4=(8k1)4+((8k+1)2(8k1)2)((8k+1)2+(8k1)2)=(8k1)4+32k(128k2+2)=(8k1)4+4k(32k1)2+(16k1)2+(92k1)=(8k1)4+4k(32k1)2+(16k1)2+92(k1)+91=((8k1)2)2+4k(32k1)2+(16k1)2+(k1)(92+32+12+12)+(92+32+12) \begin{aligned} n^4 &= (8k + 1)^4 \\ &= (8k - 1)^4 + (8k + 1)^4 - (8k - 1)^4 \\ &= (8k - 1)^4 + ((8k + 1)^2 - (8k - 1)^2)((8k + 1)^2 + (8k - 1)^2) \\ &= (8k - 1)^4 + 32k(128k^2 + 2) \\ &= (8k - 1)^4 + 4k(32k - 1)^2 + (16k - 1)^2 + (92k - 1) \\ &= (8k - 1)^4 + 4k(32k - 1)^2 + (16k - 1)^2 + 92(k - 1) + 91 \\ &= ((8k - 1)^2)^2 + 4k(32k - 1)^2 + (16k - 1)^2 \\ &\qquad + (k - 1)(9^2 + 3^2 + 1^2 + 1^2) + (9^2 + 3^2 + 1^2) \end{aligned}
gives n4n^4 as a sum of 1+4k+1+4(k1)+3=8k+1=n1 + 4k + 1 + 4(k-1) + 3 = 8k + 1 = n odd perfect squares.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.