Magic squares

Trivia

All magic squares of order $3$

All magic squares of order $4$

All magic squares of order $5$

Tools

My articles

Magic square files under this directory

Some of these files are missing now!! If you want to get the files, please call me.

file $n$ origin1 applied my conditions2? applied Rich's conditions3? format
ms4.txt $4$ $1$ no no text line
ms4.bin $4$ $1$ no no bin
ms4.hostbin $4$ $1$ no no 32-bit bin
ms4z.txt $4$ $0$ no no text line
ms4z.bin $4$ $0$ no no bin
ms4z.hostbin $4$ $0$ no no 32-bit bin
ms5saf.txt $5$ $1$ yes no text line
ms5saf.bin $5$ $1$ yes no bin
ms5safo.txt $5$ $1$ no yes text line
ms5safo.bin $5$ $1$ no yes bin

1. The smallest number in a square.
2. The condition to avoid rotating and reversing. $a_1 < a_n < a_{n^2-n}$ and $a_1 < a_{n^2}$.
3. The condition to avoid rotating, reversing and exchanging rows/columns.
For $n=5$: $\ a_1 < a_7$, $\ a_1 < a_{19}$, $\ a_1 < a_{25}$, $\ a_1 < a_5$, $\ a_1 < a_{21}$, $\ a_1 < a_9$, $\ a_1 < a_{17}$, $\ a_7 < a_{19}$ and $\ a_5 < a_{21}$ (M. Gardner, 1976).