Olympiad Maths Prep

Track / Stage 10 / 37 of 40 #1997 of 2000

Problem 1997

Hardest shortlist tier
Number theory Difficulty 9.3 Prove it IMO2024 Shortlisted Problems · IMO

Let nn be a positive integer. The integers 1,2,3,,n21, 2, 3, \ldots, n^{2} are to be written in the cells of an n×nn \times n board such that each integer is written in exactly one cell and each cell contains exactly one integer. For every integer dd with dnd \mid n, the dd-division of the board is the division of the board into (n/d)2(n / d)^{2} nonoverlapping sub-boards, each of size d×dd \times d, such that each cell is contained in exactly one d×dd \times d sub-board.

We say that nn is a cool number if the integers can be written on the n×nn \times n board such that, for each integer dd with dnd \mid n and 1<d<n1 < d < n, in the dd-division of the board, the sum of the integers written in each d×dd \times d sub-board is not a multiple of dd.

Determine all even cool numbers.

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

We first show by induction that n=2kn = 2^{k} is a cool number. The base case of n=2n = 2 is trivial as there is no such dd.

For induction, assume that 2k2^{k} is a cool number. We construct a numbering of a 2k+1×2k+12^{k+1} \times 2^{k+1} board that satisfies the conditions.

Take the 2k+1×2k+12^{k+1} \times 2^{k+1} board and divide it into four 2k×2k2^{k} \times 2^{k} sub-boards. By assumption, there is some numbering PP of a 2k×2k2^{k} \times 2^{k} board that satisfies the required condition; we write down the numbering PP in each sub-board. Next, add 22k2^{2k} to every number in the second sub-board, add 2×22k2 \times 2^{2k} to every number in the third sub-board, and add 3×22k3 \times 2^{2k} to every number in the fourth sub-board. Then the numbers in the cells of the 2k+1×2k+12^{k+1} \times 2^{k+1} board are the numbers 11 to 22(k+1)2^{2(k+1)}.

Now locate 22k2^{2k} from the first sub-board, and swap it with 22k+2k12^{2k} + 2^{k-1} from the second sub-board. Locate 3×22k3 \times 2^{2k} from the third sub-board, and swap it with 3×22k+2k13 \times 2^{2k} + 2^{k-1} from the fourth sub-board.

We claim that this numbering of the 2k+1×2k+12^{k+1} \times 2^{k+1} board satisfies the required conditions. For any d=2id = 2^{i} where i<ki < k, consider any 2i×2i2^{i} \times 2^{i} sub-board. The sum of its cells modulo 2i2^{i} is not changed in the addition step or the swapping step, so the sum is congruent modulo 2i2^{i} to the sum of the corresponding 2i×2i2^{i} \times 2^{i} sub-board in PP, which is nonzero, as required.

In the case of d=2kd = 2^{k}, we can directly evaluate the sum of the (b+1)th(b+1)^{\text{th}} sub-board for b{0,1,2,3}b \in \{0, 1, 2, 3\}. The sum is given by
22k1(1+22k)+b24k+(1)b2k12k1(mod2k) 2^{2k-1}(1 + 2^{2k}) + b 2^{4k} + (-1)^{b} 2^{k-1} \equiv 2^{k-1} \quad (\bmod 2^{k})
Therefore all sub-boards satisfy the required conditions and so 2k+12^{k+1} is a cool number, completing the induction.

It remains to show that no other even number is a cool number. Let n=2smn = 2^{s} m where ss is a positive integer and mm is an odd integer greater than 11. For the sake of contradiction, suppose that there is a numbering of the n×nn \times n board satisfying the required conditions.

Claim. In the 2i2^{i}-division of the board, where 1is1 \leqslant i \leqslant s, the sum of numbers in each 2i×2i2^{i} \times 2^{i} sub-board is congruent to 2i12^{i-1} modulo 2i2^{i}.

Proof. We prove the claim by induction on ii. The base case of i=1i = 1 holds as the sum of numbers in each 2×22 \times 2 sub-board must be odd. Next, suppose the claim is true for 2i2^{i}. In the 2i+12^{i+1}-division, each 2i+1×2i+12^{i+1} \times 2^{i+1} sub-board is made up of four 2i×2i2^{i} \times 2^{i} sub-boards, each with a sum congruent to 2i12^{i-1} modulo 2i2^{i}. Hence the sum of each 2i+1×2i+12^{i+1} \times 2^{i+1} sub-board is a multiple of 2i2^{i}. It cannot be a multiple of 2i+12^{i+1} because of the conditions, which means it must be congruent to 2i2^{i} modulo 2i+12^{i+1}. This proves the claim.

Back to the problem, since mm is odd, summing up the m2m^{2} sums of 2s×2s2^{s} \times 2^{s} sub-boards gives
2s1m22s1(mod2s) 2^{s-1} m^{2} \equiv 2^{s-1} \quad (\bmod 2^{s})
However, the sum of the numbers from 11 to n2n^{2} is
n2(n2+1)2=22s1m2(22sm2+1)0(mod2s) \frac{n^{2}(n^{2} + 1)}{2} = 2^{2s-1} m^{2} (2^{2s} m^{2} + 1) \equiv 0 \quad (\bmod 2^{s})
This is a contradiction. Therefore nn is not a cool number.

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