Grogono Photo Pages
Size:  Index   3x3   4x4   5x5   6x6   7x7   8x8   9x9   10x10   11x11   12x12   13x13 

Make Your Own: Any Prime   3x3   4x4   5x5 

Prime Number Pan-Magic Square Maker

Make Your Own

This page allows you to choose any size from 5x5 to 97x97 provided it is a prime number. You can also vary the length of the Knight's Move. The other pages in this section allow you to experiment and enter your own values - select 3x3, 4x4 or 5x5 above.


In the table below, select the Order and Knight's Move. Then enter the Start # - a positive or a negative number - and press Make. Caution, the larger sizes may take a while.

Properties of Magic Square Below:

The Order = 5
Knight's Move = 2
Minimum = 0
Maximum = 24
Magic Sum = 60

Enter Details to Make New Square:

Select Order:
Knight's Move:
Start #:  



This page makes Prime Number Pan-Magic Squares smaller than order 100, i.e., where the order of the square is a prime number. Such magic squares can be constructed using the "Knight's Move" technique. The first cycle in the sequence is highlighted to illustrate how the Knight's move distributes the numbers.

Minimum and Magic Sum:

Any number can be used for the minimum value, including negative numbers. Changing the minimum value affects the Magic Sum. Adding or subtracting 1 from the starting value will raise or lower the Magic Sum by the value for the Order.

Knight's Move:

With larger squares, e.g., 13 and above, it is very obvious that as the Knight's move gets larger in the horizontal axis, other Knight's moves of different lengths appear in the other axis or in the opposite direction. On this page the Order defaults to 5 and the Knight's move to 2 if no values are selected.


It is a pleasure to thank Peter Bartsch who found an error in the original version. His kind persistence made me re-examine, and correct, the logic underying this page. Thank you Peter.

Make Your Own: Any Prime   3x3   4x4   5x5 


Copyright © Mar 2010 Magic Squares
Mar 6, 2010