Books about
Magic Squares
at Amazon.Canada


Amazing Math Whiz

products available:

Buttons, Magnets,
t-shirts, Tote bags,
Teddy bears, & more

Books about Magic Squares at Amazon.com

Be sure to visit the
Magic Squares Main Menu
for other topics including Irregular Squares, Algebraic Squares and more.

Other 4N+2 Magic Square Sizes:
Detailed Directions for: 6x6 * 10x10 * 14x14 *
and many more examples
* 18 * 22 * 26 * 30 * 34 * 38 * 42 * 46 * 50 * 54 * 58 *
* 62 * 66 * 70 * 74 * 78 * 82 * 86 * 90 * 94 * 98 *

A 42x42 Magic Square

Scroll down to see a magic square
in which all rows, columns, and both diagonals
add up to the same magic sum (37065)

A Magic Square is a square of numbers in which every row, every column, and both diagonals add up to the same number. This number is often called the magic sum. The 42 by 42 magic square shown below has a magic sum equal to 37065.

Though magic squares can be made with non-consecutive and non-regular sequences, they are usually seen made up of consecutive numbers, possibly because it is harder to be consecutive.

The method described below can be used to create all 4N+2 even-size squares that are at least 10x10 in size, where the size is equal to double any odd number. This is just one method for creating magic squares, there are many other methods, just as there are millions and millions and millions (many millions if not billions or trillions) of these squares to be found.

Read more about Magic Squares

If you'd like to read more about magic squares, click one of these links to look for books about Magic Squares at Amazon.com, at Amazon.canada, and at Amazon.co.UK.

Books about
Magic Squares
at Amazon.co.UK


Support Our Site
by purchasing our
Amazing Math Whiz
products

and other
Amazing Messages



How to Create a 42x42 Magic Square
with a Magic Sum of 37065

The method described on this page can be used to create 14x14, 18x18 and larger 4N+2 magic squares

Steps:

  1. Create an overlay 42x42 Magic Square grid consisting only of the numbers 0, 1, 2 and 3
  2. Create a 21x21 Magic Square (half the size of our final 42x42 square) that starts with the number 1
  3. Double the size of that 21x21 Magic Square, quadrupling every number, to create a 42x42 magic square that has each number in it four times.
  4. Subtract the numbers in the overlay grid from the quadrupled numbers in the doubled square to make your new square.
    Alternate directions: You may create a 21x21 Magic Square that starts with zero in step 2 if you add the two squares together in step 4.

Step One: Create a 42x42 Magic Square overlay grid

Since we are going to create a magic square that contains each number four times, we need to also create a magic square consisting only of the numbers 0, 1, 2 and 3, and we need to make sure that each 2x2 part of this overlay grid contains all four numbers.

When I created my 6x6 Magic Square page, I knew that one method of creating these squares was to simply double the size of the 3x3 magic square, quadrupling its values, then use brute-force to find an overlay pattern that satisfied my requirements (every number from 0 to 3 overlaying each identical number in the quadrupled square, in such a way that every row, column and diagonal added up to 9). Imagine my surprise when I found over a million different overlay squares. You can see information about how I brute-forced that solution at www.mazes.com/magic-squares/magic-06.html.

Obviously, I do not want to brute-force a 10x10 or larger 4N+2 magic square (there must be billions and billions of answers), so I decided to seek out a method of creating an overlay grid that will work with all 4N+2 squares larger than 6x6. I decided to use binary numbers as part of my search for a universal method. Binary (or base two) numbers, as many math students know, use the digits 0 and 1 to represent any number. The binary equivalents for the decimal (or base 10) numbers 0, 1, 2 and 3 are 00, 01, 10, and 11. Since half of each binary number represents whether or not the 1 is present, and half of each number represents whether or not the two is present, I decided to create two temporary overlay grids, one for the value 1, and one for the value 2, so that each square was independently magic.

Also, I wanted to make it easy for you, my visitor, to use the same method with pencil and paper, so I wanted to use basically the same grid twice, just doubling the "one" grid to get the "two" grid, with a simple rotation to make sure that the sum of the values will be different.

Create a 42x42 Magic Square of all 1's and 0's

Here are the steps to create the first grid (based on the pattern '111000000000000000000000111111111111111111'):
  • Draw a 42x42 grid on your paper.
  • Put the number 1 into the first column of the first 3 rows of your grid
  • Put the number 0 into the first column of the next 21 rows of your grid
  • Put the number 1 into the remaining spaces of the first column.
  • Double-check your work. You should now have 21 1's and 21 0's in the first column, which I have bolded so you can see it clearly. As a further double-check, you have used the digits in the pattern '111000000000000000000000111111111111111111')
  • For the second column, put the opposite number ... if there is a 1 in the first column, put 0 in the second column, and vice-versa.
  • Double-check. The first column and the second column number should add up to 1.
  • Copy the first column to the third column, and copy the second column to the fourth column.
  • Turn the first two columns upside-down and copy them into the fifth and sixth columns.
  • Copy the fifth and sixth columns to the rest of the square.
  • Double-check. Each row, each column and both diagonals should have exactly 21 1's in it.

Create a 42x42 Magic Square of all 2's and 0's

Here are the steps to create the second grid:

  • Rotate the first grid 90 degrees counter-clockwise and
  • double all the numbers.
  • You can see how the bolded left column has become the bolded bottom row after rotation.

Add Magic Square 1 to Magic Square 2

And, of course, here are the steps to create the third grid, which is your overlay grid:

  • Add the two squares together
  • You should end up with every 2x2 block containing all four digits, 0, 1, 2 and 3.
  • (I have bolded alternating 2x2 blocks so that you can see this more easily.)
  • and, if you have done the work properly, each row, each column, and both diagonals add up to the same magic sum.
  • Lay this grid aside for a few minutes. You won't need it until after you've finished your quadrupled grid

Step Two: Create a 21x21 Magic Square

Next, you need to create a magic square that is half the size as your desired square. Since this half-sized square is odd (21x21), it is easy to create. Just follow the method you see described at the bottom of every odd square page at www.mazes.com/magic-squares. Here is one such square, in which I started with the number 1 in the middle of the top row, then moved one square up one and two squares to the right after each move, except when the next move would be blocked, in which case I dropped down one for the next number.

I deliberately used a different magic square than the one you learned in school, just because I enjoy being different.

Now that you have an odd square, we are ready for the next step

Step Three:  Double the size of the 21x21 magic square
and quadruple all the numbers

Draw a 42x42 grid, then, for each number in the 21x21 magic square:
  • Multiply the number times four (quadruple it), and
  • Write that number four times, into a 2x2 area of the new grid that corresponds to the position of the original number in the 21x21 square. (I have bolded alternating 2x2 blocks so you can see how the 21x21 square has expanded into a 42x42 square.)

Step Four: Put the Quadrupled and the Overlay grids together

This last part should be simple.
  • If the smallest number in the quadrupled grid is 4, use subtraction: Quadrupled minus Overlay = Magic Square
    The lowest number in the new Magic Square will be one, just like in the original 21x21 magic square.
     
  • If the smallest number in the quadrupled grid is 0, use addition: Quadrupled plus Overlay = Magic Square
    The lowest number in the new Magic Square will be zero, just like in the original.
We have many
Amazing Message
stores.

Click each image to see
other amazing product choices

(each product imprinted
with an actual
solvable maze puzzle



Amazing Teacher



Amazing Student



Amazing Student



Amazing Reader



Amazing Artist

See our choices @
www.mazes.com/cp



Please
Support Our Site



buy
Amazing Math Whiz
products from
our online store



Many other
Amazing Messages
are available


Please visit
www.MAZES.com/cp/
for details

A 42-by-42 Magic Square

(Magic Sum = 37065)

139313925575561485148464964815771576741740166916688338321761176092792676935934999810271026191190111911182832821211121037537413031300465464
139513945595581487148665165015791578743742167116708358341763176292592454933932979610251024189188111711162812801209120837337213011302467466
14811480645644157315727377361665166482982817571756921920858493193095941023102218718611151114279278120712063713701299129846346213911388553552
14821483646647157515747397381667166683183017591758923922878692992893921021102018518411131112277276120512043693681297129646146013891390555554
1568156973273316611660825824175317529179168180100910088988101910181831821111111027527412031202367366129512944594581387138655155014791476641640
1570157173473516631662827826175517549199188382101110109190101710161811801109110827327212011200365364129312924574561385138454954814771478643642
165616578208211749174891391277761005100416916810131012177176110711062712701199119836336212911290455454138313825475461475147463963815671564729728
165816598228231751175091591479781007100617117010151014179178110511042692681197119636136012891288453452138113805455441473147263763615651566731730
174417459089097372100110001651641093109217317211011100265264119511943593581287128645145013791378543542147114706356341563156272772616551652817816
174617479109117574100310021671661095109417517411031102267266119311923573561285128444944813771376541540146914686336321561156072572416531654819818
6869996997161160108910882532521097109626126011891188353352128312824474461375137453953814671466631630155915587237221651165081581417431740905904
7071998999163162109110902552541099109826326211911190355354128112804454441373137253753614651464629628155715567217201649164881381217411742907906
1561571084108524924811771176257256118511843493481277127644144013711370535534146314626276261555155471971816471646811810173917389039026764993992
1581591086108725125011791178259258118711863513501279127844344213691368533532146114606256241553155271771616451644809808173717369019006566995994
2442451172117333733611811180345344127312724374361365136452952814591458623622155115507157141643164280780617351734899898636299199015515210811080
2462471174117533933811831182347346127512744394381367136653153014571456621620154915487137121641164080580417331732897896616098998815315410831082
3323331260126134134012691268433432136113605255241453145261761615471546711710163916388038021731173089589459589879861511501079107824324011691168
3343351262126334334212711270435434136313625275261455145461961815451544709708163716368018001729172889389257569859841491481077107624124211711170
4204211264126542842913561357520521144814496126131540154170470516341635798799172617278908915455982983146147107410752382391166116733032912561257
4224231266126743043113581359522523145014516146151542154370670716321633796797172417258888895253980981144145107210732362371164116532833112581259
4244251352135351651714441445608609153615377007011628162979279317221723886887505197897914214310701071234235116211633263271254125541841713441345
4264271354135551851914461447610611153815397027031630163179479517201721884885484997697714014110681069232233116011613243251252125341641913461347
5125131440144160460515321533696697162416257887891716171788088146479749751381391066106723023111581159322323125012514144151342134350650513481349
5145151442144360660715341535698699162616277907911718171988288344459729731361371064106522822911561157320321124812494124131340134150450713501351
6016001529152869269316201621784785171217138768774041968969134135106210632262271154115531831912461247410411133813395025031430143151050914361437
6036021531153069469516221623786787171417158788794243970971132133106010612242251152115331631712441245408409133613375005011428142950851114381439
6896881617161678078117081709872873363796496512812910561057222223115011513143151242124340640713341335498499142614275905911434143559859715241525
6916901619161878278317101711874875383996696713013110581059220221114811493123131240124140440513321333496497142414255885891432143359659915261527
7777761705170486886932339609611241251052105321621711441145310311123812394024031330133149449514221423586587151415155945951522152368668516121613
7797781707170687087134359629631261271054105521821911461147308309123612374004011328132949249314201421584585151215135925931520152168468716141615
8658642928956957120121104810492122131140114130430512321233398399132613274904911418141958258315101511674675151815196826831610161177477317001701
8678663130958959122123105010512142151142114330630712341235396397132413254884891416141758058115081509672673151615176806811608160977277517021703
9539521171161044104520820911361137300301122812293923931320132148648714141415578579150615076706711598159967867916061607770771169816998628612425
9559541191181046104721021111381139302303123012313943951322132348448514121413576577150415056686691596159767667716041605768769169616978608632627
1041104020520411321133296297122412253883891316131748048114081409574575150215036666671594159575875916021603766767169416958588592223950949112113
1043104220720611341135298299122612273903911318131948248314101411572573150015016646651592159375675716001601764765169216938568572021948951114115
1129112829329212201221384385131213134764771404140556856914961497662663159015917547551682168376276316901691854855181994694711011110381037200201
1131113029529412221223386387131413154784791406140757057114981499660661158815897527531680168176076116881689852853161794494510810910361039202203
1217121638138213101311474475140214035665671494149565865915861587750751167816798428431684168584884912139409411041051032103319619711241125288289
1219121838338013091308473472140114005655641493149265765615851584749748167716768418401687168685185015149439421071061035103419919811271126291290
13051304469470139913985635621491149065565415831582747746167516748398381767176684784698937936101100102910281931921121112028528412131212377376
1307130647146813971396561560148914886536521581158074574416731672837836176517648458441110939938103102103110301951941123112228728612151214379378

This Magic Square was created by John Knoderer, a webmaster and computer programmer who is available to telecommute to your location. (In other words, John would be delighted to create puzzles for your website or do other amazing work for you on a contract basis.)

If you found this page useful, and especially if you printed this page to distribute to students, we invite you to send a suitable donation to John (address below) or PayPal your donation to Donations (at) Mazes.com.

You can find more of John's puzzling materials at www.MAZES.com and at www.GodLovesEveryone.org. You can reach John at Webmaster (at) Mazes.com.

Fine Print: If you print and duplicate these magic squares for classroom use or other multiple copy use, please send a payment of $(however much you think this is worth) to the author. John puts a GREAT DEAL of time into creating and posting materials to the internet for you to use (and enjoy). Your donations will help pay bills and keep new materials coming your way.

Send your donations to:

John Knoderer
www.MAZES.com
P O Box 235
Sulphur Springs, AR 72768 USA

www.MAZES.com
www.GodLovesEveryone.org
www.DriverExam.org

E-mail the webmaster: webmaster (at) mazes.com

The contents of this page are copyright 2005 by the author. However, we recognize that teachers may wish to download and use our materials with their students. We give that permission, as long as the teacher sends what they believe to be a fair donation to the author each time the material is used.