Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pandiagonal magic square
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==4''n''Γ4''n'' pandiagonal magic squares== A <math>4n \times 4n</math> pandiagonal magic square can be built by the following algorithm. {{ordered list |Put the first <math>2n</math> natural numbers into the first row and the first <math>2n</math> columns of the square. {{aligned table|cols=8|class=wikitable | 1 | 2 | 3 | 4 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | }} |Put the next <math>2n</math> natural numbers beneath the first <math>2n</math> natural numbers in reverse. Each vertical pair must have the same sum. {{aligned table|cols=8|class=wikitable | 1 | 2 | 3 | 4 | | | | | 8 | 7 | 6 | 5 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | }} |Copy that <math>2 \times 2n</math> rectangle <math>2n-1</math> times beneath the first rectangle. {{aligned table|cols=8|class=wikitable | 1 | 2 | 3 | 4 | | | | | 8 | 7 | 6 | 5 | | | | | 1 | 2 | 3 | 4 | | | | | 8 | 7 | 6 | 5 | | | | | 1 | 2 | 3 | 4 | | | | | 8 | 7 | 6 | 5 | | | | | 1 | 2 | 3 | 4 | | | | | 8 | 7 | 6 | 5 | | | | }} |Copy the left <math>4n \times 2n</math> rectangle into the right <math>4n \times 2n</math> rectangle but shift it ring-wise by one row. {{aligned table|cols=8|class=wikitable | 1 | 2 | 3 | 4 | 8 | 7 | 6 | 5 | 8 | 7 | 6 | 5 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 8 | 7 | 6 | 5 | 8 | 7 | 6 | 5 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 8 | 7 | 6 | 5 | 8 | 7 | 6 | 5 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 8 | 7 | 6 | 5 | 8 | 7 | 6 | 5 | 1 | 2 | 3 | 4 }} | Build a second <math>4n \times 4n</math> square and copy the first square into it but turn it by 90Β°. {{aligned table|cols=2|class=wikitable | {{mvar|A}} {{aligned table|cols=8|class=wikitable | 1 | 2 | 3 | 4 | 8 | 7 | 6 | 5 | 8 | 7 | 6 | 5 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 8 | 7 | 6 | 5 | 8 | 7 | 6 | 5 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 8 | 7 | 6 | 5 | 8 | 7 | 6 | 5 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 8 | 7 | 6 | 5 | 8 | 7 | 6 | 5 | 1 | 2 | 3 | 4 }} | {{mvar|B}} {{aligned table|cols=8|class=wikitable | 5 | 4 | 5 | 4 | 5 | 4 | 5 | 4 | 6 | 3 | 6 | 3 | 6 | 3 | 6 | 3 | 7 | 2 | 7 | 2 | 7 | 2 | 7 | 2 | 8 | 1 | 8 | 1 | 8 | 1 | 8 | 1 | 4 | 5 | 4 | 5 | 4 | 5 | 4 | 5 | 3 | 6 | 3 | 6 | 3 | 6 | 3 | 6 | 2 | 7 | 2 | 7 | 2 | 7 | 2 | 7 | 1 | 8 | 1 | 8 | 1 | 8 | 1 | 8 }} }} | Build the final square by multiplying the second square by <math>4n</math>, adding the first square and subtract <math>4n</math> in each cell of the square. Example: <math>A + 4nB - 4nC</math>, where {{mvar|C}} is the magic square with all cells as 1. {{aligned table|cols=8|class=wikitable | 33 | 26 | 35 | 28 | 40 | 31 | 38 | 29 | 48 | 23 | 46 | 21 | 41 | 18 | 43 | 20 | 49 | 10 | 51 | 12 | 56 | 15 | 54 | 13 | 64 | 7 | 62 | 5 | 57 | 2 | 59 | 4 | 25 | 34 | 27 | 36 | 32 | 39 | 30 | 37 | 24 | 47 | 22 | 45 | 17 | 42 | 19 | 44 | 9 | 50 | 11 | 52 | 16 | 55 | 14 | 53 | 8 | 63 | 6 | 61 | 1 | 58 | 3 | 60 }} }} If we build a <math>4n \times 4n</math> pandiagonal magic square with this algorithm then every <math>2 \times 2</math> square in the <math>4n \times 4n</math> square will have the same sum. Therefore, many symmetric patterns of <math>4n</math> cells have the same sum as any row and any column of the <math>4n \times 4n</math> square. Especially each <math>2n \times 2</math> and each <math>2 \times 2n</math> rectangle will have the same sum as any row and any column of the <math>4n \times 4n</math> square. The <math>4n \times 4n</math> square is also a [[most-perfect magic square]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)