Olympiad Maths Prep

Track / Stage 7 / 229 of 300 #1629 of 2000

Problem 1629

National olympiad second round; IMO P1/P4
Number theory Difficulty 7.5 Prove it

A 3x3 magic square, with magic number mm, is a 3×33\times 3 matrix such that the entries on each row, each column and each diagonal sum to mm. Show that if the square has positive integer entries, then mm is divisible by 33, and each entry of the square is at most 2n12n-1, where m=3nm=3n. An example of a magic square with m=6m=6 is

(213321132)\left( \begin{array}{ccccc} 2 & 1 & 3\\ 3 & 2 & 1\\ 1 & 3 & 2 \end{array} \right)

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

1. Define the magic square properties:
A 3x3 magic square with magic number m m is a matrix where the sum of the numbers in each row, each column, and each diagonal is equal to m m .

2. Sum of all entries:
Let the entries of the 3x3 magic square be aij a_{ij} where i,j{1,2,3} i, j \in \{1, 2, 3\} . The sum of all entries in the magic square is:
i=13j=13aij \sum_{i=1}^3 \sum_{j=1}^3 a_{ij}
Since each row sums to m m and there are 3 rows, the total sum is:
3m 3m

3. Sum of the four corner cells, edge cells, and middle cell:
Let the sum of the four corner cells be c c , the sum of the four edge cells be e e , and the middle cell be g g . Then:
c+e+g=3m c + e + g = 3m

4. Sum of the diagonals:
Each diagonal sums to m m . The two diagonals include the middle cell twice, so:
c+2g=2m c + 2g = 2m

5. Sum of the middle row and middle column:
The middle row and middle column each include the middle cell once, so:
e+2g=2m e + 2g = 2m

6. Combine the equations:
Adding the equations for the diagonals and the middle row/column, and then subtracting the total sum equation:
(c+2g)+(e+2g)(c+e+g)=2m+2m3m (c + 2g) + (e + 2g) - (c + e + g) = 2m + 2m - 3m
Simplifying, we get:
3g=m 3g = m
Therefore, m=3g m = 3g .

7. Divisibility by 3:
Since m=3g m = 3g , m m is divisible by 3.

8. Inequality for each entry:
We need to show that each entry is at most 2g1 2g - 1 . Since m=3g m = 3g , we have g=m3 g = \frac{m}{3} .

- For the corner cells: Consider a diagonal. The sum of the diagonal is m m , and it includes two corner cells and the middle cell g g . Therefore, each corner cell is at most mg=2g m - g = 2g . Since the entries are positive integers, the maximum value for each corner cell is 2g1 2g - 1 .

- For the edge cells: Consider the middle row or column. The sum of the middle row or column is m m , and it includes two edge cells and the middle cell g g . Therefore, each edge cell is at most mg=2g m - g = 2g . Since the entries are positive integers, the maximum value for each edge cell is 2g1 2g - 1 .

Thus, each entry in the magic square is at most 2g1 2g - 1 .

\blacksquare

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.