Heterosquare

A heterosquare of order n is an arrangement of the integers 1 to n2 in a square, such that the rows, columns, and diagonals all sum to different values. There are no heterosquares of order 2, but heterosquares exist for any order n ≥ 3.

Order 3 Order 4 Order 5

Heterosquares are easily constructed, as shown in the above examples. If n is odd, filling the square in a spiral pattern will produce a heterosquare. And if n is even, a heterosquare results from writing the numbers 1 to n2 in order, then exchanging 1 and 2.

It is strongly suspected that there are exactly 3120 essentially different heterosquares of order 3.

An antimagic square is a special kind of heterosquare where the 2n + 2 row, column and diagonal sums are consecutive integers.