Table of Contents

Definition of subsets

We introduce some terminologies here to divide the whole set of magic squares into small subsets.

A magic series and its binary representation

Order on distinct integer sets

Complement of a magic series

If you replace each element x of a magic series by n2 + 1 - x , the result is also a magic series. We call the resulting set the complement of the original magic series.

In binary representations, the complement of a magic series is obtained by the bit reverse manipulation.

The representative magic series of a magic square

Every row and column of a magic square is always a magic series. We define the representative magic series of a magic square as the largest magic series which forms a row, a column, the complement of a row, or the complement of a column. Note that diagonal magic series are not considered a representative magic series.

Example: The representative magic series of a magic square

  16 12  1  5
   7  3 14 10
   9 13  4  8
   2  6 15 11

is { 16, 13, 3, 2 } = 0x9006, which forms the complement of the third column.

We classify magic squares by their representative magic series. This classification is invariant under rotations, reflections, M-transformations, and the complement transformation.