WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Pandiagonal Magic Squares of Order Five

permute 5 × (0 1 2 3 4)
1
× 0
permute 1 × (1 2 3 4 5)
1
× 0
subtract 13
rotate left/right
-2
-1
0
1
2
rotate up/down
-2
-1
0
1
2
1
7
13
19
25
14
20
21
2
8
22
3
9
15
16
10
11
17
23
4
18
24
5
6
12
A magic square has the same sums for the numbers in the rows, columns, and main diagonals. In a pandiagonal magic square, the square can be rotated as if the edges were wrapped around (like a rubber square sheet can be made into a torus), and the main diagonals will still add up to the same magic sum (65 here). All of the 5×5 pandiagonal magic squares can be generated by adding together two sets of permutations.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.