Define a heterosquare to be a square grid containing consecutive positive integers starting from 1 such that the sums of the integers in each row, column, and long diagonal are all different. Furthermore, define an anti-magic square to be a heterosquare whose sums form a consecutive sequence of integers.
If there exists a anti-magic square, then there are possible values for the sum of its two diagonal sums. Find the value of
Note:
A diagonal sum is the sum of the numbers along a long diagonal of the square. For example, the two diagonal sums of the following square are
and
This problem is related to Open Problem #2 of the Brilliant.org Open Problems Group .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let's derive a general result for a k × k anti-magic square, where k is any positive integer greater than 2.
First, we use this fact: if a k × k anti-magic square exists, then there are only two possible sequences that can represent the sums of its rows, columns, and diagonals: 2 k 3 − k − 2 , 2 k 3 − k , … , 2 k 3 + 3 k and 2 k 3 − k , 2 k 3 − k + 2 , … , 2 k 3 + 3 k + 2 . (See this problem or the discussion on the open problem page for a proof of why this is the case.) Call these sequences anti-magical sequences . The sum of the numbers in each anti-magical sequence is
2 1 ( 2 k + 2 ) ( 2 k 3 − k − 2 + 2 k 3 + 3 k ) 2 1 ( 2 k + 2 ) ( 2 k 3 − k + 2 k 3 + 3 k + 2 ) = ( k + 1 ) ( k 3 + k − 1 ) = k 4 + k 3 + k 2 − 1 = ( k + 1 ) ( k 3 + k + 1 ) = k 4 + k 3 + k 2 + 2 k + 1 .
The sum of all the integers from 1 to k 2 inclusive is equal to 2 k 2 ( k 2 + 1 ) = 2 k 4 + k 2 . Note that this is equal to both the sum of all the columns and the sum of all the rows, because both cases cover all the numbers on the square. Also note that the sum of each anti-magical sequence is equal to the sum of all the rows, all the columns, and the two diagonals:
Sequence sum = Rows + Columns + Diagonals .
Let D be the sum of the diagonal sums. We have two cases to consider, one for each anti-magical sequence:
k 4 + k 3 + k 2 − 1 k 4 + k 3 + k 2 − 1 D = 2 ( 2 k 4 + k 2 ) + D = k 4 + k 2 + D = k 3 − 1 ,
and
k 4 + k 3 + k 2 + 2 k + 1 k 4 + k 3 + k 2 + 2 k + 1 D = 2 ( 2 k 4 + k 2 ) + D = k 4 + k 2 + D = k 3 + 2 k + 1 .
Therefore, there are n = 2 possible values for the sum of the diagonal sums in a k × k anti-magical square, which are d 1 = k 3 − 1 and d 2 = k 3 + 2 k + 1 . We have
n ( d 1 + d 2 ) = 2 ( ( k 3 − 1 ) + ( k 3 + 2 k + 1 ) ) = 2 ( 2 k 3 + 2 k ) = 4 k ( k 2 + 1 ) .
Substituting in k = 1 5 yields 4 ( 1 5 ) ( 1 5 2 + 1 ) = 1 3 5 6 0 .