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