English   Japanese
Home   Site Map

Magic rectangles

What are magic rectangles?

   A 2-dimensional magic rectangle of order (m1, m2) is defined as an m1 x m2 rectangular array in which all rows of the array sum to the same value (called the row constant or the row sum) and all columns of the array also do (the column constant or the column sum). It is not required that diagonals be magic. An order-(m1, m2) magic rectangle is called normal if the rectangle consists of consecutive integers from 1 to m1m2, and called non-normal if not. This site is concerned only with normal magic rectangles. Similarly, n-dimensional magic rectangles are defined.

The following figures are examples of associated 2-dimensional magic rectangles:

(3,5)-rectangle
(associated)
1410457
1381315
9111262
(3,7)-rectangle
(associated)
10219165142
34711151819
20817613112
(5,7)-rectangle
(associated)
261983125134
206342414127
371518212933
935221223016
3223115281710


   Magic rectangles of (odd,odd)-order are used in order to construct magic cubes and magic tesseracts (see the pages for Nasik magic cubes and Nasik magic tesseracts). However, it is not easy to construct (odd,odd)-order magic rectangles algorithmically (discuss later). On the other hand, it is not so difficult to construct (even,even)-order magic rectangles (see the figure below). Normal magic rectangles of (odd,even)-order cannot exist.

(4,6)-rectangle
(non-associated)
123222324
192021456
181716987
121110151413


Existence of magic rectangles

   For m1, m2 > 1, an order-(m1, m2) 2-dimensional normal magic rectangle exists only if one of the following conditions is hold:
(1) Both m1 and m2 are even and at least one of them is greater than 2.
(2) Both m1 and m2 are odd.
   T. Harmuth published a proof of this theorem in 1881. Thomas R. Hagedorn showed an elementary proof of the theorem with a concrete construction method in [2]. (The method is elementary but complicated.) He also proved the existence of the following magic rectangles in [1]:

(1) An order-(m1, m2, ..., mn) n-dimensional magic rectangle, where m1, .., mn > 1 are even integers and (mi, mj) is not (2,2) for 1 <= i < j <= n,
(2) An order-(m1, m2, m3) 3-dimensional magic rectangle, where m1, m2, m3 > 1 are odd integers and gcd(m1, m2) > 1, where gcd means the greatest common divisor.

   Furthermore, it can be proved the existence of the following magic rectangles by generalizing the Hagedorn's proof:
(2)' An order-(m1, m2, ..., mn) n-dimensional magic rectangle, where m1, .., mn > 1 are odd integers and gcd(mi, mj) > 1 for some i and j such that1 <= i < j <= n.

   As a result, 3-dimensional magic rectangles of orders (3,3,5), (3,3,7), (3,5,5), (3,5,9), (3,5,15), (3,7,15), etc. do exist. Hagedorn said in [1] that it was an open question whether an order-(3,5,7) 3-dimensional magic rectangle exists or not. I found an order-(3,5,7) 3-dimensional magic rectangle in April 2004, and an order-(3,5,11) and an order-(3,5,13) 3-dimensional magic rectangle in February 2005. I found these magic rectangles by searching by my personal computer (1.46GHz). It is unknown whether an order-(m1, m2, m3) 3-dimensional magic rectangle can exist or not for any odd m1, m2, m3 > 1.


Examples of 3-dimensional magic rectangles

an order-(3,3,5) 3-dimensional magic rectangle (associated)
Plane No.1
313381330
244112362
1425192037
Plane No.2
29404357
118232845
391142617
Plane No.3
926272132
441034522
163384315

an order-(3,3,7) 3-dimensional magic rectangle (associated)
Plane No.1
3343711303334
35233236133112
1051931351432
Plane No.2
253624465442
334726451849
508476281627
Plane No.3
2038172143142
40213916202917
18192241154819

an order-(3,5,7) 3-dimensional magic rectangle (associated) [Nakamura, April 2004]
Plane No.1
7054359922874
63299345922425
8994389186756
413140344876101
2575978851179
Plane No.2
621010332902351
9110084216069
20263353738086
37461056498615
5583167439644
Plane No.3
279521284749104
5305872667565
50398897681217
81821461137743
10219847715236

an order-(3,5,11) 3-dimensional magic rectangle (associated) [Nakamura, February 2005]
Plane No.1
51281207914544124755109133
101152205013130961101281067
11962671715124126907831148
4914113116422158316415030
9532771058459661391401997
Plane No.2
1297410314349843113155645
12811273473111913786118125
11252941565883108107211454
4148802915755931323985154
12116011531236816223639237
Plane No.3
69147262710010782618913471
13616102165163814423525117
18135887640142151499910447
15960385670361531161461465
33571619142122218746138115

an order-(3,5,13) 3-dimensional magic rectangle (associated) [Nakamura, February 2005]
Plane No.1
371061311311612158741711821872652
846955180173931757018318591150
19313436444310189167547815192128
1667915512412381482190998120133
1010211312914613720177571001956127
Plane No.2
8853162185391546016173452417456
1471495117115771669219116886114
33156771321091649832876411940163
82110285104130125189811791454749
1402217215112335136421571134143108
Plane No.3
169135196139191765950678394186
637618897619448158184724111730
6841811181422910795153152160623
46105111165178126211032316141127112
1441709142512213875801836590159


References
[1] Thomas R. Hagedorn, On the existence of magic n-dimensional rectangles, Discrete Mathematics 207 (1999), 53-63.
[2] Thomas R. Hagedorn, Magic retangles revisited, Discrete Mathematics 207 (1999), 65-72.
[3] Marián Trenkler, Magic rectangles, The Mathematical Gazette 83(1999), 102-105.
[4] Harvey D. Heinz & John R. Hendricks, Magic Square Lexicon: Illustrated, self-published, 2000, ISBN 0-9687985-0-0.


Home   Site Map

Mitsutoshi Nakamura (Feedback)    To send an email to me, please enable JavaScript on your browser.
[Legal indication] Prohibit the send of any spam or advertising.

This page was last updated on August 8, 2016.
"Magic Cubes and Tesseracts"   http://magcube.la.coocan.jp/magcube/en/
Copyright © 2004-2016, Mitsutoshi Nakamura. All rights reserved.

track feed Magic Cubes and Tesseracts RSS
SEO
loading
Magic Cubes and Tesseracts