**From New Scientist #1150, 12th April 1979** [link]

Frances was trying to remember how to arrange the numbers 1 to 9 in a magic square. This was her first shot. As you see, so far from getting the 3 columns, the 3 rows and the 2 main diagonals totalling the same, she got them all different. “Look!” she said, “I have invented an anti-magic square!”

What I ask you to do is to concoct the smallest possible 3 x 3 anti-magic square with 9 whole numbers, all positive but not necessarily all different. In judging the smallest possible, the first criterion is to minimise the highest number used: the second is to minimise the total of all 9 numbers.

[enigma8]

### Like this:

Like Loading...

This Python code isn’t the fastest program (runtime is 1.1s), but it constructs the minimal solutions.

Solution:There are many squares with a highest number of a 5, and a total of 19.{1,1,1},{2,2,1},{1,3,5} has sum 17.

1, 1, 1 / 2, 2, 1, / 1, 3, 5 doesn’t satisfy the conditions that all the rows, columns and diagonals should all have different sums. The first column is 1 + 2 + 1 = 4, and the reverse diagonal (from bottom left to top right) is also 1 + 2 + 1 = 4.

Reverse diagonal… OK – thanks!