Shift method

 

Use this method to construct magic squares of odd order which are no multiple of 3 (= 5x5, 7x7, 11x11, 13x13, 17x17, ... magic squares). To construct an 13x13 magic square, the first row is 0-a-b-c-d-e-f-g-h-i-j-k-l (fill in 1 up to 12 instead of a up to l; that gives 12x11x10x9x8x7x6x5x4x3x2 = 479.001.600 possibilities).

 

To construct row 2 up to 13 of the first grid shift the first row of the first grid each time two places to the left. To construct row 2 up to 13 of the second grid shift the first row of the second grid each time two places to the right.

 

 

Take 1x number from first grid +1

0 1 2 3 4 5 6 7 8 9 10 11 12
2 3 4 5 6 7 8 9 10 11 12 0 1
4 5 6 7 8 9 10 11 12 0 1 2 3
6 7 8 9 10 11 12 0 1 2 3 4 5
8 9 10 11 12 0 1 2 3 4 5 6 7
10 11 12 0 1 2 3 4 5 6 7 8 9
12 0 1 2 3 4 5 6 7 8 9 10 11
1 2 3 4 5 6 7 8 9 10 11 12 0
3 4 5 6 7 8 9 10 11 12 0 1 2
5 6 7 8 9 10 11 12 0 1 2 3 4
7 8 9 10 11 12 0 1 2 3 4 5 6
9 10 11 12 0 1 2 3 4 5 6 7 8
11 12 0 1 2 3 4 5 6 7 8 9 10

 

 

+13x number from second grid

0 1 2 3 4 5 6 7 8 9 10 11 12
11 12 0 1 2 3 4 5 6 7 8 9 10
9 10 11 12 0 1 2 3 4 5 6 7 8
7 8 9 10 11 12 0 1 2 3 4 5 6
5 6 7 8 9 10 11 12 0 1 2 3 4
3 4 5 6 7 8 9 10 11 12 0 1 2
1 2 3 4 5 6 7 8 9 10 11 12 0
12 0 1 2 3 4 5 6 7 8 9 10 11
10 11 12 0 1 2 3 4 5 6 7 8 9
8 9 10 11 12 0 1 2 3 4 5 6 7
6 7 8 9 10 11 12 0 1 2 3 4 5
4 5 6 7 8 9 10 11 12 0 1 2 3
2 3 4 5 6 7 8 9 10 11 12 0 1

 

 

= panmagic 13x13 square

1 15 29 43 57 71 85 99 113 127 141 155 169
146 160 5 19 33 47 61 75 89 103 117 118 132
122 136 150 164 9 23 37 51 65 66 80 94 108
98 112 126 140 154 168 13 14 28 42 56 70 84
74 88 102 116 130 131 145 159 4 18 32 46 60
50 64 78 79 93 107 121 135 149 163 8 22 36
26 27 41 55 69 83 97 111 125 139 153 167 12
158 3 17 31 45 59 73 87 101 115 129 143 144
134 148 162 7 21 35 49 63 77 91 92 106 120
110 124 138 152 166 11 25 39 40 54 68 82 96
86 100 114 128 142 156 157 2 16 30 44 58 72
62 76 90 104 105 119 133 147 161 6 20 34 48
38 52 53 67 81 95 109 123 137 151 165 10 24

 

 

It is possible to shift this 13x13 magic square on a 2x2 carpet of the 13x13 magic square and you get 168 more solutions .

 

Instead of shift 2 to the left and shift 2 to the right, you can also shift 3, 4, 5 or 6 to the right and/or to the left (e.g. in the first grid shift 4 to the right and in the second grid shift 2 to the left ór 2 to the right). In total you can construct all 3,48982 x 1021 panmagic 13x 13 squares.

 

 

Use the shift method to construct magic squares of odd order from 5x5 to infinity.

 

See 5x57x79x9 (1)9x9 (2)11x1113x1315x15 (1)15x15 (2)17x1719x1921x21 (1)21x21 (2)23x2325x2527x27 (1)27x27 (2)29x29 and 31x31

 

Download
13x13, shift method.xls
Microsoft Excel werkblad 59.5 KB