Shift method

 

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

 

To construct row 2 up to 17 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 17 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 13 14 15 16
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0 1
4 5 6 7 8 9 10 11 12 13 14 15 16 0 1 2 3
6 7 8 9 10 11 12 13 14 15 16 0 1 2 3 4 5
8 9 10 11 12 13 14 15 16 0 1 2 3 4 5 6 7
10 11 12 13 14 15 16 0 1 2 3 4 5 6 7 8 9
12 13 14 15 16 0 1 2 3 4 5 6 7 8 9 10 11
14 15 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13
16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0
3 4 5 6 7 8 9 10 11 12 13 14 15 16 0 1 2
5 6 7 8 9 10 11 12 13 14 15 16 0 1 2 3 4
7 8 9 10 11 12 13 14 15 16 0 1 2 3 4 5 6
9 10 11 12 13 14 15 16 0 1 2 3 4 5 6 7 8
11 12 13 14 15 16 0 1 2 3 4 5 6 7 8 9 10
13 14 15 16 0 1 2 3 4 5 6 7 8 9 10 11 12
15 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

 

 

+ 17x number from second grid

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

 

 

= panmagic 17x17 square

1 19 37 55 73 91 109 127 145 163 181 199 217 235 253 271 289
258 276 5 23 41 59 77 95 113 131 149 167 185 203 221 222 240
226 244 262 280 9 27 45 63 81 99 117 135 153 154 172 190 208
194 212 230 248 266 284 13 31 49 67 85 86 104 122 140 158 176
162 180 198 216 234 252 270 288 17 18 36 54 72 90 108 126 144
130 148 166 184 202 220 238 239 257 275 4 22 40 58 76 94 112
98 116 134 152 170 171 189 207 225 243 261 279 8 26 44 62 80
66 84 102 103 121 139 157 175 193 211 229 247 265 283 12 30 48
34 35 53 71 89 107 125 143 161 179 197 215 233 251 269 287 16
274 3 21 39 57 75 93 111 129 147 165 183 201 219 237 255 256
242 260 278 7 25 43 61 79 97 115 133 151 169 187 188 206 224
210 228 246 264 282 11 29 47 65 83 101 119 120 138 156 174 192
178 196 214 232 250 268 286 15 33 51 52 70 88 106 124 142 160
146 164 182 200 218 236 254 272 273 2 20 38 56 74 92 110 128
114 132 150 168 186 204 205 223 241 259 277 6 24 42 60 78 96
82 100 118 136 137 155 173 191 209 227 245 263 281 10 28 46 64
50 68 69 87 105 123 141 159 177 195 213 231 249 267 285 14 32

 

 

It is possible to shift this 17x17 magic square on a 2x2 carpet of the 17x17 magic square and you get 288 more solutions .

 

Instead of shift 2 to the left and shift 2 to the right, you can also shift 3, 4, 5, 6 or 7 to the right and/or to the left (e.g. in the first grid shift 5 to the left and in the second grid shift 3 to the left ór 3 to the right). In total you can construct all 2,30254 x 1031 panmagic 17x17 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
17x17, shift method.xls
Microsoft Excel werkblad 77.0 KB