The 27x27 magic square is odd but also a multiple of 3. You can use the shift method to construct a 27x27 magic square but with boundary conditions. Take as first row of the first and/or
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-23-24-25-26 and you get only a semi-magic 27x27 square. Take as first row of the first and/or second
grid 0-1-2-3-4-5-8-7-6-11-10-9-13-14-12-17-15-16-18-19-20-23-22-21-24-25-26 and you get a valid panmagic 27x27 square.
The row 0-1-2-3-4-5-8-7-6-11-10-9-13-14-12-17-15-16-18-19-20-23-22-21-24-25-26 leads
to a valid 27x27 panmagic square, because [yellow marked] 0+3+8+11+13+17+18+23+24 = [blue
marked] 1+4+7+10+14+15+19+22+25 = [red marked] 2+5+6+9+12+16+20+21+26 = 117, that is 1/3 of (0+1+2+3+4+5+6+7+8 +9+10+11+12+13+14+15+16+17+18+19+20+21 +22+23+24+25+26=) 351.
Take 1x number from first grid (shift 2 to the left) +1
0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 |
2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 |
4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 |
8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 |
6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 |
10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 |
13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 |
12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 |
15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 |
18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 |
20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 |
22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 |
24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 |
26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 |
1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 |
3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 |
5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 |
7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 |
11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 |
9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 |
14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 |
17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 |
16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 |
19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 |
23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 |
21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 |
25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 |
+ 27x number from second grid (shift 2 to the right)
0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 |
25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 |
21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 |
23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 |
19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 |
16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 |
17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 |
14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 |
9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 |
11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 |
7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 |
5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 |
3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 |
1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 |
26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 |
24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 |
22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 |
20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 |
18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 |
15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 |
12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 |
13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 |
10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 |
6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 | 8 | 7 |
8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 | 4 | 5 |
4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 | 2 | 3 |
2 | 3 | 4 | 5 | 8 | 7 | 6 | 11 | 10 | 9 | 13 | 14 | 12 | 17 | 15 | 16 | 18 | 19 | 20 | 23 | 22 | 21 | 24 | 25 | 26 | 0 | 1 |
= panmagic 27x27 square
1 | 29 | 57 | 85 | 113 | 141 | 225 | 197 | 169 | 309 | 281 | 253 | 365 | 393 | 337 | 477 | 421 | 449 | 505 | 533 | 561 | 645 | 617 | 589 | 673 | 701 | 729 |
678 | 706 | 5 | 33 | 63 | 89 | 115 | 147 | 227 | 199 | 176 | 312 | 283 | 261 | 367 | 395 | 343 | 479 | 426 | 456 | 509 | 535 | 565 | 647 | 621 | 568 | 650 |
572 | 654 | 684 | 710 | 7 | 39 | 65 | 91 | 122 | 150 | 229 | 207 | 178 | 314 | 289 | 263 | 372 | 402 | 347 | 481 | 430 | 458 | 513 | 514 | 542 | 624 | 598 |
630 | 602 | 574 | 660 | 686 | 712 | 14 | 42 | 67 | 99 | 124 | 152 | 235 | 209 | 183 | 321 | 293 | 265 | 376 | 404 | 351 | 460 | 407 | 435 | 490 | 518 | 546 |
520 | 552 | 632 | 604 | 581 | 663 | 688 | 720 | 16 | 44 | 73 | 101 | 129 | 159 | 239 | 211 | 187 | 323 | 297 | 244 | 353 | 381 | 328 | 464 | 411 | 441 | 494 |
443 | 496 | 527 | 555 | 634 | 612 | 583 | 665 | 694 | 722 | 21 | 51 | 77 | 103 | 133 | 161 | 243 | 190 | 164 | 300 | 274 | 248 | 357 | 387 | 332 | 466 | 417 |
473 | 420 | 445 | 504 | 529 | 557 | 640 | 614 | 588 | 672 | 698 | 724 | 25 | 53 | 81 | 82 | 110 | 138 | 220 | 194 | 168 | 306 | 278 | 250 | 363 | 389 | 334 |
391 | 342 | 475 | 422 | 451 | 506 | 534 | 564 | 644 | 616 | 592 | 674 | 702 | 703 | 2 | 30 | 58 | 86 | 114 | 144 | 224 | 196 | 174 | 308 | 280 | 257 | 366 |
259 | 368 | 397 | 344 | 480 | 429 | 455 | 508 | 538 | 566 | 648 | 595 | 569 | 651 | 679 | 707 | 6 | 36 | 62 | 88 | 120 | 146 | 226 | 203 | 177 | 310 | 288 |
316 | 290 | 264 | 375 | 401 | 346 | 484 | 431 | 459 | 487 | 515 | 543 | 625 | 599 | 573 | 657 | 683 | 709 | 12 | 38 | 64 | 95 | 123 | 148 | 234 | 205 | 179 |
210 | 186 | 320 | 292 | 268 | 377 | 405 | 325 | 461 | 408 | 436 | 491 | 519 | 549 | 629 | 601 | 579 | 659 | 685 | 716 | 15 | 40 | 72 | 97 | 125 | 154 | 236 |
158 | 238 | 214 | 188 | 324 | 271 | 245 | 354 | 382 | 329 | 465 | 414 | 440 | 493 | 525 | 551 | 631 | 608 | 582 | 661 | 693 | 718 | 17 | 46 | 74 | 102 | 132 |
106 | 134 | 162 | 217 | 191 | 165 | 301 | 275 | 249 | 360 | 386 | 331 | 471 | 416 | 442 | 500 | 528 | 553 | 639 | 610 | 584 | 667 | 695 | 723 | 24 | 50 | 76 |
54 | 55 | 83 | 111 | 139 | 221 | 195 | 171 | 305 | 277 | 255 | 362 | 388 | 338 | 474 | 418 | 450 | 502 | 530 | 559 | 641 | 615 | 591 | 671 | 697 | 727 | 26 |
704 | 3 | 31 | 59 | 87 | 117 | 143 | 223 | 201 | 173 | 307 | 284 | 258 | 364 | 396 | 340 | 476 | 424 | 452 | 507 | 537 | 563 | 643 | 619 | 593 | 675 | 676 |
652 | 680 | 708 | 9 | 35 | 61 | 93 | 119 | 145 | 230 | 204 | 175 | 315 | 286 | 260 | 370 | 398 | 345 | 483 | 428 | 454 | 511 | 539 | 567 | 622 | 596 | 570 |
600 | 576 | 656 | 682 | 714 | 11 | 37 | 68 | 96 | 121 | 153 | 232 | 206 | 181 | 317 | 291 | 267 | 374 | 400 | 349 | 485 | 432 | 433 | 488 | 516 | 544 | 626 |
548 | 628 | 606 | 578 | 658 | 689 | 717 | 13 | 45 | 70 | 98 | 127 | 155 | 237 | 213 | 185 | 319 | 295 | 269 | 378 | 379 | 326 | 462 | 409 | 437 | 492 | 522 |
498 | 524 | 550 | 635 | 609 | 580 | 666 | 691 | 719 | 19 | 47 | 75 | 105 | 131 | 157 | 241 | 215 | 189 | 298 | 272 | 246 | 355 | 383 | 330 | 468 | 413 | 439 |
415 | 446 | 501 | 526 | 558 | 637 | 611 | 586 | 668 | 696 | 726 | 23 | 49 | 79 | 107 | 135 | 136 | 218 | 192 | 166 | 302 | 276 | 252 | 359 | 385 | 336 | 470 |
339 | 472 | 423 | 448 | 503 | 532 | 560 | 642 | 618 | 590 | 670 | 700 | 728 | 27 | 28 | 56 | 84 | 112 | 140 | 222 | 198 | 170 | 304 | 282 | 254 | 361 | 392 |
369 | 394 | 341 | 478 | 425 | 453 | 510 | 536 | 562 | 646 | 620 | 594 | 649 | 677 | 705 | 4 | 32 | 60 | 90 | 116 | 142 | 228 | 200 | 172 | 311 | 285 | 256 |
287 | 262 | 371 | 399 | 348 | 482 | 427 | 457 | 512 | 540 | 541 | 623 | 597 | 571 | 653 | 681 | 711 | 8 | 34 | 66 | 92 | 118 | 149 | 231 | 202 | 180 | 313 |
182 | 318 | 294 | 266 | 373 | 403 | 350 | 486 | 406 | 434 | 489 | 517 | 545 | 627 | 603 | 575 | 655 | 687 | 713 | 10 | 41 | 69 | 94 | 126 | 151 | 233 | 208 |
240 | 212 | 184 | 322 | 296 | 270 | 352 | 380 | 327 | 463 | 410 | 438 | 495 | 521 | 547 | 633 | 605 | 577 | 662 | 690 | 715 | 18 | 43 | 71 | 100 | 128 | 156 |
130 | 160 | 242 | 216 | 163 | 299 | 273 | 247 | 356 | 384 | 333 | 467 | 412 | 444 | 497 | 523 | 554 | 636 | 607 | 585 | 664 | 692 | 721 | 20 | 48 | 78 | 104 |
80 | 108 | 109 | 137 | 219 | 193 | 167 | 303 | 279 | 251 | 358 | 390 | 335 | 469 | 419 | 447 | 499 | 531 | 556 | 638 | 613 | 587 | 669 | 699 | 725 | 22 | 52 |
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