Use this method to construct odd magic squares which are no multiple of 3 (= 5x5, 7x7, 11x11, 13x13, 17x17, ... magic squares). To construct an 23x23 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-s-t-u-v (fill in 1 up to 22 instead of a up to v; that gives 22x21x20x19x18x17x16x15x14x13x12x11x10x9x8x7x6x5x4x3x2 = 1,124 * 1021 possibilities).
To construct row 2 up to 23 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 23 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 | 19 | 20 | 21 | 22 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
+ 23x number from second grid
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 |
22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 | 4 | 5 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 | 2 | 3 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 0 | 1 |
= panmagic 23x23 square
1 | 25 | 49 | 73 | 97 | 121 | 145 | 169 | 193 | 217 | 241 | 265 | 289 | 313 | 337 | 361 | 385 | 409 | 433 | 457 | 481 | 505 | 529 |
486 | 510 | 5 | 29 | 53 | 77 | 101 | 125 | 149 | 173 | 197 | 221 | 245 | 269 | 293 | 317 | 341 | 365 | 389 | 413 | 437 | 438 | 462 |
442 | 466 | 490 | 514 | 9 | 33 | 57 | 81 | 105 | 129 | 153 | 177 | 201 | 225 | 249 | 273 | 297 | 321 | 345 | 346 | 370 | 394 | 418 |
398 | 422 | 446 | 470 | 494 | 518 | 13 | 37 | 61 | 85 | 109 | 133 | 157 | 181 | 205 | 229 | 253 | 254 | 278 | 302 | 326 | 350 | 374 |
354 | 378 | 402 | 426 | 450 | 474 | 498 | 522 | 17 | 41 | 65 | 89 | 113 | 137 | 161 | 162 | 186 | 210 | 234 | 258 | 282 | 306 | 330 |
310 | 334 | 358 | 382 | 406 | 430 | 454 | 478 | 502 | 526 | 21 | 45 | 69 | 70 | 94 | 118 | 142 | 166 | 190 | 214 | 238 | 262 | 286 |
266 | 290 | 314 | 338 | 362 | 386 | 410 | 434 | 458 | 482 | 506 | 507 | 2 | 26 | 50 | 74 | 98 | 122 | 146 | 170 | 194 | 218 | 242 |
222 | 246 | 270 | 294 | 318 | 342 | 366 | 390 | 414 | 415 | 439 | 463 | 487 | 511 | 6 | 30 | 54 | 78 | 102 | 126 | 150 | 174 | 198 |
178 | 202 | 226 | 250 | 274 | 298 | 322 | 323 | 347 | 371 | 395 | 419 | 443 | 467 | 491 | 515 | 10 | 34 | 58 | 82 | 106 | 130 | 154 |
134 | 158 | 182 | 206 | 230 | 231 | 255 | 279 | 303 | 327 | 351 | 375 | 399 | 423 | 447 | 471 | 495 | 519 | 14 | 38 | 62 | 86 | 110 |
90 | 114 | 138 | 139 | 163 | 187 | 211 | 235 | 259 | 283 | 307 | 331 | 355 | 379 | 403 | 427 | 451 | 475 | 499 | 523 | 18 | 42 | 66 |
46 | 47 | 71 | 95 | 119 | 143 | 167 | 191 | 215 | 239 | 263 | 287 | 311 | 335 | 359 | 383 | 407 | 431 | 455 | 479 | 503 | 527 | 22 |
508 | 3 | 27 | 51 | 75 | 99 | 123 | 147 | 171 | 195 | 219 | 243 | 267 | 291 | 315 | 339 | 363 | 387 | 411 | 435 | 459 | 483 | 484 |
464 | 488 | 512 | 7 | 31 | 55 | 79 | 103 | 127 | 151 | 175 | 199 | 223 | 247 | 271 | 295 | 319 | 343 | 367 | 391 | 392 | 416 | 440 |
420 | 444 | 468 | 492 | 516 | 11 | 35 | 59 | 83 | 107 | 131 | 155 | 179 | 203 | 227 | 251 | 275 | 299 | 300 | 324 | 348 | 372 | 396 |
376 | 400 | 424 | 448 | 472 | 496 | 520 | 15 | 39 | 63 | 87 | 111 | 135 | 159 | 183 | 207 | 208 | 232 | 256 | 280 | 304 | 328 | 352 |
332 | 356 | 380 | 404 | 428 | 452 | 476 | 500 | 524 | 19 | 43 | 67 | 91 | 115 | 116 | 140 | 164 | 188 | 212 | 236 | 260 | 284 | 308 |
288 | 312 | 336 | 360 | 384 | 408 | 432 | 456 | 480 | 504 | 528 | 23 | 24 | 48 | 72 | 96 | 120 | 144 | 168 | 192 | 216 | 240 | 264 |
244 | 268 | 292 | 316 | 340 | 364 | 388 | 412 | 436 | 460 | 461 | 485 | 509 | 4 | 28 | 52 | 76 | 100 | 124 | 148 | 172 | 196 | 220 |
200 | 224 | 248 | 272 | 296 | 320 | 344 | 368 | 369 | 393 | 417 | 441 | 465 | 489 | 513 | 8 | 32 | 56 | 80 | 104 | 128 | 152 | 176 |
156 | 180 | 204 | 228 | 252 | 276 | 277 | 301 | 325 | 349 | 373 | 397 | 421 | 445 | 469 | 493 | 517 | 12 | 36 | 60 | 84 | 108 | 132 |
112 | 136 | 160 | 184 | 185 | 209 | 233 | 257 | 281 | 305 | 329 | 353 | 377 | 401 | 425 | 449 | 473 | 497 | 521 | 16 | 40 | 64 | 88 |
68 | 92 | 93 | 117 | 141 | 165 | 189 | 213 | 237 | 261 | 285 | 309 | 333 | 357 | 381 | 405 | 429 | 453 | 477 | 501 | 525 | 20 | 44 |
It is possible to shift this 23x23 magic square on a 2x2 carpet of the 23x23 magic square and you get 528 more solutions .
Instead of shift 2 to the left and shift 2 to the right, you can also shift 3, 4, 5, 6, 7, 8, 9, 10 or 11 to the right and/or to the left (e.g. in the first grid shift 9 to the right and in the second grid shift 4 to the left ór 4 to the right). In total you can construct all 2,53964 x 1047 panmagic 23x23 squares.
Use the shift method to construct magic squares of odd order from 5x5 to infinity.
See 5x5, 7x7, 9x9 (1), 9x9 (2), 11x11, 13x13, 15x15 (1), 15x15 (2), 17x17, 19x19, 21x21 (1), 21x21 (2), 23x23, 25x25, 27x27 (1), 27x27 (2), 29x29 and 31x31