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 19x19 magic square, the first row is 0-a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r (fill in 1 up to 18 instead of a up to r; that gives 18x17x16x15x14x13x12x11x10x9x8x7x6x5x4x3x2 = 6,40237 * 1016 possibilities).

 

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

 

 

+ 19x number from second grid

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

 

 

= panmagic 19x19 square

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

 

 

It is possible to shift this 19x19 magic square on a 2x2 carpet of the 19x19 magic square and you get 360 more solutions .

 

Instead of shift 2 to the left and shift 2 to the right, you can also shift 3, 4, 5, 6, 7 or 8 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 7 to the right ór 7 to the left). In total you can construct all 3,55140 x 1036 panmagic 19x19 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
19x19, shift method.xls
Microsoft Excel werkblad 76.5 KB