Perfect Magic Hypercubes

Search

 

A Nasik (perfect) magic cube is pantriagonal and all of its planes (the magic
 squares) are pandiagonal. There are 13 m2 lines that sum correctly

(m2 rows, m2 columns, m2 pillars, 4m2 triagonals and 6m2 diagonals).
 These combine to form 9m pandiagonal magic squares of order m.
Order-8 is the smallest possible order perfect magic cube.

On this page, comments referring to magic cubes should be considered,
by extension, to apply to magic hypercubes of any dimension.

This is my original page on Perfect Magic Cubes I have since posted another page that discusses this subject from a different point of view. The text in the above box is also a more recent addition.

Introduction Why I feel this page is necessary and what is included to show the need for a revised definition.
History Mr. Hendricks recounts the events in the development of the modern definition of perfect for magic objects.
Definitions Definitions relevant to Perfect magic squares, excerpted from Magic Square Lexicon: Illustrated.
Inter-dimensional Comparisons Tables compare features between hypercubes of different dimensions.
Examples - Cubes The 4 'basic' order-3, a 'triagonal' order-4, an order-8 'perfect' and an order-9 'perfect' magic cube.
Dimensions 4 and 5 A 'basic' order 3 and a 'quadragonal' order-4 magic tesseract, and information on two 'perfect' magic tesseracts.
Conclusions and References A summary of this page, some relevant references, and some relevant links.

Introduction

In discussions regarding magic cubes, there seems to be much confusion about the term ‘perfect’.

Pandiagonal magic squares have long been referred to as being perfect, presumably because they had additional lines (of m numbers) that summed correctly.
Over the last 125 years or so, as work with magic cubes progressed and more features were discovered, they have often been referred to as ‘perfect’.

Over the last 25 years or so, John Hendricks and others have been doing more and more work with magic objects of 4 (tesseracts), 5, and higher dimensions. When features between these different dimensions were compared by Mr. Hendricks, it quickly became evident that the term ‘perfect’ should be redefined.
This he preceded to do, and since his retirement has been actively investigating and refining his ideas.
In an effort to publicize his work and the new definitions, he has self published a number of books.

I received an email from Mr. Hendricks on February 27, 2002 on the history of this definition. This was after I had mentioned to him about the large number of inquiries on the subject I was receiving through my Web pages.

The result is this page about perfect magic hypercubes, with emphasis on hypercubes of dimension 3. I have included the modern definition for these cubes and other associated definitions. Also shown are examples of orders 8 and 9 perfect cubes, and tables that compare features common to hypercubes of the different dimensions.
The section closes with a short discussion of order 16 and order 32 perfect magic tesseracts. These will further reinforce the relationship between ‘perfect’ hypercubes of different dimensions.

Addendum: After doing a survey of published magic cubes, I have published another page on perfect cubes. It serves as a supplement to this page, which I have left unchanged.

Addendum2 (Jan. 2005) I have added several definitions. Required because of the discovery of a sixth class of magic cube.

Addendum3 (May 2006) Expanded material on the term Nasik and emphasizing monagonal (or 1-agonal) as the preferred term to replace i-row.

This page uses m for order of the magic object and n for the dimension being referred to.

History

From an email attachment of March 2, 2002 from John Hendricks:

General History

Sixty years ago when we were kids you were lucky to have a magic cube in the first place. There were a few around, but no 7x7x7 cube existed although they had orders 3 to 10 except it. Andrews & Co. [1] set out the definition of a magic cube to sum in rows, columns, pillars and only the four space diagonals. Then they speculated on what would be considered a perfect cube. They all agreed that the continuous diagonals of a plane face, as an extra measure, would do as a bare minimum requirement. And that is about where I came into the picture. I eventually filled in the 7th order garden-variety cube and had it published. Nobody to my knowledge ever dreamt that it would be possible to get magic squares throughout a cube until Myers did so. (Editors note: Myers cube contained only simple magic squares.) So the definition changed for perfect cube to row, columns, pillars, the four triagonals and all the diagonals in all the planes including the broken ones. This allowed Collison and others to show an order 7 such cube. These are considered nowadays as pandiagonal magic cubes.

Meanwhile, working in isolation, apart from the mathematical community, I felt that such a cube is not equivalent to a pandiagonal magic square and went searching for the pantriagonal cube. I did not care about the planar diagonals, but did care about the broken triagonals, hence I came up with an order 4 such cube and had it published. Then, the critics advised me that someone else had such a cube on file at a university in the east and that I was not the first to make such a cube. It turned out that I was the first to publish such a cube.

Then, I got busy with the meteorological service and marriage and had no more time for several years to look into such mathematical matters, During that interval, Capt. Benson [2] came along and made a perfect 8th order magic cube, wrote a book and so forever more one would conclude that the matter was settled and the definition should be immediately updated for perfect cubes for all time. They referred to this cube (which contains 30 pandiagonal magic squares) as pandiagonally perfect. They called the Myers cube (which contains 30 simple magic squares) as perfect. It is now referred to as a diagonal magic cube.

Back at the drawing board, I concluded that a perfect magic tesseract would have to have everything working too. I did publish the first magic tesseract in one diagram and all 57 more, I did publish the first panquadragonal magic tesseract of order 4. But these were not perfect.

Eventually, after “retirement” I found the key and self-published the perfect magic tesseract of order 16 and the 5-dimensional magic hypercube of order 32 also in the same booklet [3], I also discounted the Cameron Cube [4], which was the name given to a special magic tesseract, because a simple examination of the triagonals of some of the cubes in the tesseract simply do not add up. I also published a perfect 8th order magic cube,” along with 9th and 11th order ones [5].

John

Footnotes were added by the editor
[1]  Andrews, W.S., Magic Squares & Cubes, Dover Publ., 1960 (original publication Open Court,1917)
[2]  Benson, W. & Jacoby, O., Magic Cubes: New Recreations, , Dover Publ., 1981, 0-486-24140-8
[3]  J.R.Hendricks, Perfect n-Dimensional Magic Hypercubes of Order 2n, Self-published,1999, 0-9684700-4-1
[4]  Arkin Arney & Porter, A Perfect 4_Dimensional Hypercube of Order-7, JRM:21:2, 1989, 81-88
[5]  J. R. Hendricks, Magic Squares to Tesseracts by Computer, Self-published 1999, 0-9684700-0-9

Definitions

To help our understanding of the term ‘perfect’ as it applies to magic objects, I have included some appropriate definitions. These are taken from Magic Square Lexicon: Illustrated, but have been edited for brevity and most illustrations removed.

Compact Plus
When the eight corners of all orders of sub-cubes contained within a cube including wrap-around, sum to 8S/m where m is the order of the parent cube. I have adapted this term from Gakuho Abe’s [1] term ‘compact’ which he used to indicate that all 2x2 squares in an order-4 magic square sum to S.
Kanji Setsuda [2] uses the term ‘composite’ for this feature in magic cubes but I feel that this can cause confusion with ‘composite’ magic squares.

Complete
Every pantriagonal contains m/2 complement pairs, spaced m/2 apart. Note that this is a requirement for most-perfect magic squares. Coined by Kanji Setsuda [2].

[1] Gakuho Abe, Fifty Problems of Magic Squares, Self published 1950. Later republished in Discrete Math, 127, 1994, pp 3-13.
[2] Kanji Setsuda’s Compact (composite) and Complete magic Cubes Web pages may be accessed from here. http://homepage2.nifty.com/KanjiSetsuda/pages/EnglishP1.html

Diagonal magic cube
A magic cube that has the additional feature that both main diagonals of all 3m planar squares sum to S. Because all rows and columns sum correctly as the original requirement for a magic cube, this means that all 3m orthogonal planes are simple magic squares. Some, but not all of these planar squares may be pandiagonal magic. The six oblique squares will automatically be be magic too. Order 5 is the smallest possible diagonal magic cube.
For a short time, I used the term 'myers' for this type of magic cube. However, this name, I believe, is more suitable, and so will be used from now on. The name diagonal magic cube was suggested by Aale de Winkel.
This class of cube was missed in Hendricks original unified classification.
The Myer's diagonal cube was popularized as 'perfect' by Martin Gardner in Jan. 1976.
ALL singly-even orders of diagonal magic cubes are proper (see definition for proper).
Christian Boyer and Walter Trump refer to this class as perfect. Trump has since started using the term strictly-magic to avoid confusion with Hendricks perfect.

i-row
An i-row is a row, column, pillar, file, etc., of an n-dimensional hypercube of order-m. Some authors refer to these as “the orthogonals” because they are all mutually perpendicular to each other. (An i-row is parallel to an xi-axis where the axes are numbered x1, x2, x3, etc.)
A more modern term for i-row is monagonal (or 1-agonal). It should be used instead of this term in future references.

Magic cube
An m x m x m array of cells with each cell containing a number, usually an integer. These numbers are arranged so that the sum for each row, each column, each pillar, and the four main triagonals are all the same. Note that it is not required that the squares in the 3m planes of the cube have correct diagonals.
These are the minimum requirements for a simple magic cube. [1][2] All magic cubes later defined have these features plus the additional required features.
[1] This was first (?) published in W. S. Andrews, Magic Squares and Cubes, Open Court Publ., 1908 p 64.
[2] This definition also appears in the better known edition 2 published in 1917, also on page 64.

Magic hypercube
An n-dimensional array of mn cells containing the numbers1, 2, ..., mn arranged in such a way that all rows, columns, etc sum the magic sum, as well as the 2n-1 n-agonals. While usually used to refer to a higher dimension object, a square or cube may be considered 2 or 3-dimensional hypercube (respectively).
There are 2 classes or ranks of magic hypercubes of dimension two, 6 classes or ranks of magic hypercubes of dimension three, and 18 classes for dimension four, the tesseract!

Magic Sum
The constant each row, column, etc., sums to is called the magic sum. It is denoted by S.
For a normal n-dimensional magic hypercube of order-m the sum is m(mn + 1)/2.

Magic tesseract
A magic tesseract is a four-dimensional array, equivalent to the magic cube and magic square of lower dimensions, containing the numbers 1, 2, 3, …, m4 arranged in such a way that the sum of the numbers in each of the m3 rows, m3 columns, m3 pillars, m3 files and in the eight major quadragonals passing through the center and joining opposite corners is a constant sum S, called the magic sum, which is given by: S = m(m4+1)/2 and where m is the order of the tesseract.

Monagonal
A row, column, pillar, file, etc., of an n-dimensional hypercube of order-m. Some authors refer to these as “the orthogonals” because they are all mutually perpendicular to each other. (A monagonal (ie 1-agonal) is parallel to an xi-axis where the axes are numbered x1, x2, x3, etc.)
Customarily, a row runs from left to right; a column from front to back; a pillar runs up and down and a file runs obliquely to the other three in the projection of a tesseract. There are n(mn-1) monagonals in an n-dimensional hypercube of order-m.
If 1-agonal is used for rows , columns, etc., the nasik (perfect) magic hypercube may then be defined as having all (including broken) r-agonals summing correctly for r = 1 ... n.

Nasik cubes
In 1866, A. H. Frost introduced the term Nasik for magic squares having the property that all monagonals and diagonals (including broken ones), summed to the magic constant. These magic squares would later be called pandiagonal or perfect.
In 1905, C. Planck extended the term to to refer to magic objects of any dimension in which all r-agonals summed to the constant.
If all pan-r-agonals are correct for r = 1...n, we have a nasik (perfect) magic hypercube of dimension n.
There is an extensive C. Planck quotation here.
Nasik is unambiguous, and therefore the preferred term for the often confusing perfect when referring to magic hypercube classes. (See perfect magic cube.)

n-agonals
n-agonal (continuous): A line going from 1 corner, through the center to the opposite corner, of a magic hypercube. For a cube or greater dimension hypercube, this is sometimes called a space diagonal. There are 2n corners and 2n-1  n-agonals in a magic hypercube.
n-agonal (broken ): Lines parallel to a continuous n-agonal. For a two-dimensional object (a magic square) these lines will consist of 2 segments totaling length m. For a cube, the line would consist of 2 or 3 segments, etc.

A 1-agonal (monagonal) is a line which crosses only 1 dimension. A 2-agonal is usually called a diagonal. It crosses two dimensions. [1]
A 3-agonal is usually called a triagonal and crosses three dimensions, a quadragonal crosses 4 dimensions, etc. The variable r may be used instead of n to indicate these other values for the agonal. (See r-agonal)

[1] First published mention was John R. Hendricks, The Pan-3-Agonal Magic Cube, JRM 5:1:1972, pp 51-54

Number of broken n-agonals for each continuous one
n 2 seg. 3 segments 4 segments Total
2 m-1 0 0 m
3 3(m-1) (m-1)(m-2) 0 m2
4 2(5m-8) 2(2m2-7m+7) (m-1)(m-2)(m-3) m3
For each continuous n-agonal in n-dimensional space, there are a number of broken n-agonals, depending upon the order of the hypercube.
There are 2 continuous diagonals in a square, 4 continuous triagonals in a cube, and 8 continuous quadragonals in a tesseract.
So, the numbers in the table must be multiplied by the number of continuous ones in order to determine how many and of which kind of n-agonals are in a hypercube.

Pandiagonal
Pandiagonal means “all diagonal”, which signifies that the broken diagonals are also included. Sometimes pan-2-agonal is used instead. Especially in n-dimensional space. A 2-agonal is described through space if any two coordinates change while the rest remain constant.
For example in a cube of order 4, one could describe a diagonal through (1,2,3) by holding y constant while x and z is allowed to change. Such a set could be:
(1,2,3) ; (4,2,4) ; (3,2,1) ; and (2,2,2)
In this example x is decreasing in increments of one and z is increasing by increments of one and all coordinates are kept within the modulus 4. There are N = n!.mn-1/(n-2)! diagonals in an n-dimensional magic hypercube of order m, including the broken ones.
If all pan-r-agonals are correct for r = 1 and 2, we have a pandiagonal magic square, If r = 1, 2, ... n, a pandiagonal hypercube of dimension n.

Pandiagonal magic cube
A Pandiagonal Magic Cube has the normal requirements of a magic cube plus the additional one that all the squares parallel to the sides of the cube (planar squares) also be pandiagonal.
Remember that an ordinary magic cube does not require even the main diagonals of these squares to be correct.
There are 9m2 + 4 lines that sum correctly (m2 rows, m2 columns, m2 pillars, 4 main triagonals and 6m2 Diagonals). It contains 3m pandiagonal magic squares and 6 oblique squares, 0 to 3 of which are pandiagonal magic and the others simple magic.
Order-7 is the smallest possible order of pandiagonal magic cube. It contains 27 pandiagonal magic squares (3 x 7 + 6).
M. Gardner referred to H. Langman's 1962 pandiagonal magic cube as a perfect magic cube at the same time he was calling the Myer's diagonal cube perfect! Presumably he did not recognize the difference between the three types of cubes.

Pandiagonal magic square
Also known as Diabolic, Nasic, Continuous, Indian, Jaina or Perfect. To be pandiagonal, the broken diagonal pairs must also sum to the constant. This is considered the top class of magic squares. There are 4m lines that sum correctly (m rows, m columns and 2m diagonals).

Panquadragonal
Broken quadragonal pairs that are parallel to a quadragonal and that sum to the magic constant. If all these pairs sum correctly, the magic tesseract is panquadragonal. It is analogous to a pandiagonal magic square but instead of moving a row or column from one side to the other and retaining the magic properties, you move any cube from one side to the other. When one moves along the panquadragonal, 1 cell at a time, four coordinates change. See also, Pantriagonal.

Pantriagonal
Sometimes called Pan-3-agonal.
This term is used for cubes, or high dimensional hypercubes. In n-dimensional space, if any three coordinates are changing while the rest remain constant, then one describes a triagonal through space, of which most are broken. The main triagonal is the one which passes through (1,1,1) and has successive coordinates (2,2,2),…, (m,m,m) in a cube.
In N-dimensional space, the n-agonal may be broken into as many as n segments. For magic cubes there are:
     4 continuous triagonals
   12(m-1) triagonals broken into pairs, and
     4(m-2)(m-1) triagonals broken into 3 sections.
If all the broken Triagonal lines sum correctly, the magic cube is pantriagonal.

Pantriagonal magic cube
If all triagonal pairs and triplets (pan-triagonals) sum correctly, the magic cube is pantriagonal. [1] It is analogous to a pandiagonal magic square but instead of moving a row or column from one side to the other and maintaining the magic properties, you may move any plane from one side to the other.
There are 7m2  lines that sum correctly (m2 rows, m2 columns, m2 pillars, and 4m2 triagonals). There may be some diagonals in the cube, but they are not required. There may also be some magic squares, either simple or pandiagonal, but they also are not required. Order-4 is the smallest possible order pantriagonal magic cube. See also, Pandiagonal magic cube.

[1] First published mention was John R. Hendricks, The Pan-3-Agonal Magic Cube, JRM 5:1:1972, pp 51-54

Pantriagonal Diagonal
A magic cube that is a combination Pantriagonal and Diagonal cube. All main and broken triagonals must sum correctly, In addition, it will contain 3m order m simple magic squares in the orthogonal planes, and 6 order m pandiagonal magic squares in the oblique planes.
For short, I will reduce this unwieldy name to PantriagDiag. This is number 4 in what is now 6 classes of magic cubes. So far, very little is known of this class of cube. The only ones constructed so far (both by Nakamura) are order 8 (not associated and associated).
This cube was discovered by Mitsutoshi Nakamura and named by him in 2004

Pathfinder
An orderly and systematic way to find one’s way through n-dimensional space. Through any given element, or cell, there are (3n -1)/2 different paths, or lines. For a square, this means that there are 4 paths, which are a row, a column and two (broken, if needed) diagonal ways. Through any cell of a cube, there are 13 routes. Through a tesseract, there are 40. One may travel forwards, or backwards on any route, or path. The method is found in Magic Squares to Tesseracts by Computer. Hendricks uses this method to show the numbers contained in his higher order magic hypercubes (via simple computer programs).

Perfect magic cube
A perfect magic cube is pantriagonal and all of its planes (the magic squares) are pandiagonal. In a perfect magic cube there are 9m pandiagonal magic squares. That is, all 3m orthogonal planes, the 6 oblique planes, and the 6(m-1) broken planes parallel to the oblique planes. There are 13m2 lines that sum correctly (m2 rows, m2 columns, m2 pillars, 4m2 triagonals and 6m2 diagonals).
Order-8 is the smallest possible order perfect magic cube. Perfect magic cubes of orders 10, 14, 18, etc. and 12, 20, etc. are impossible. this was proved by Rosser and Walker in 1939, and by Stertenbrink and de Winkel in 2004. . See Pandiagonal Impossibility Proof.
*** The above is a new definition. ***
Examples of an older definition of a Perfect Magic Cube was the Frankenstein 1875, Myers 1970 order 8 cubes. These cubes contained 3m simple magic squares and are now referred to as Diagonal magic cubes. Perfect is now construed to mean that the cube is pandiagonal and pantriagonal, and all lower order magic objects (i.e. squares) within it are perfect. This makes the definition consistent for all dimensions. See the definition (above) for pandiagonal and pantriagonal magic cubes .
This is also consistent with C. Planck's (1905) revised definition for A. H. Frost's (1866) term Nasik . (See Perfect magic hypercube)

Mitsutoshi Nakamura uses the terms pan-2,3-agonal and nasik instead of perfect to avoid confusion. He also uses the term strictly-magic for the diagonal class, to avoid confusion over Boyer's perfect.

Perfect magic hypercube
A hypercube of dimension n is perfect if all pan-n-agonals sum correctly, and all lower dimension hypercubes contained in it are perfect.
Through every cell on the perfect hypercube there are  (3n -1)/2 different routes that must sum the magic sum.
As per Dr. C. Planck (1905), these hypercubes are of type Nasik. The pandiagonal magic square is a perfect hypercube of dimension 2 (and was called Nasik by Dr. A.H. Frost in 1866).
If all pan-r-agonals are correct for r = 1...n, we have a nasik (Hendricks perfect) magic hypercube of dimension n.
Because nasik in unambiguous, it is preferred instead of the often confusing perfect.

Perfect magic square
Another traditional (but now not commonly used) name for Pandiagonal magic square. However, this name shows the relationship of the highest class of rectilinear magic figures, the perfect square, perfect cube, perfect tesseract, etc. See the comment re nasik in perfect magic hypercube.

Perfect magic tesseract
A tesseract is a 4-dimensional hypercube. It is perfect if all pan-quadragonals are correct, and all the magic squares and magic cubes within it are perfect. i.e. the magic squares are all pandiagonal and the magic cubes are all pantriagonal and pandiagonal. There are 40m2 lines that sum correctly. They are m3 rows, m3 columns, m3 pillars, m3 files, 8m3 quadragonals, 16m3 triagonals, and 12m3 diagonals.
John R. Hendricks constructed the first perfect magic tesseract (order-16) in 1998. It was confirmed correct by Clifford Pickover in 1999. He later published the equations for a 5-dimensional perfect magic hypercube of order-32. However, as it contains the numbers 1 to 33,554,432, he thought it impractical to publish the hypercube itself!! The numbers in these two hypercubes may be inspected using his simple Pathfinder programs.
If all pan-r-agonals are correct for r = 1...n, we have a nasik (perfect) magic hypercube of dimension n.
Because nasik in unambiguous, it is preferred instead of the often confusing perfect.

Proper
When applied to a magic cube of a particular class, means that this cube contains only the minimum features required for that class.
For example: a simple magic cube requires that no planes within it be magic squares. However, some planes may be magic and the cube is still called simple, because the next classification requires that ALL planes be simple magic squares.
So if a cube contains NO magic squares, it may then be referred to as a proper simple magic cube!
Likewise a proper pantriagonal magic cube would contain NO magic squares, a proper diagonal magic cube would contain NO pandiagonal magic squares, etc.
This term was suggested by Mitsutoshi Nakamura in an Apr. 15, 2004 email.
He also reported that all singly-even orders of diagonal magic cubes are proper!

r-agonal
Term used to indicate a group of agonals (diagonal, triagonal, etc). (See n-agonal)
Examples:
If all r-agonals are correct for r = 1 and 2, we have the minimum qualifications for a simple magic square.
If all pan-r-agonals are correct for r = 1...n, we have a nasik (Hendricks perfect) magic hypercube of dimension n.

Simple magic hypercube
A magic square, cube, tesseract, etc., where all orthogonal lines plus all space diagonals sum correctly.
If all r-agonals are correct for r = 1 and 2, we have the minimum qualifications for a simple magic square. If r = 1 and n, a simple magic hypercube of n dimensions!

Space diagonal
A line that goes from a corner of a magic hypercube, through the center, to the opposite corner. See (n-agonal)

Triagonal
A space diagonal that goes from 1 corner of a magic cube to the opposite corner, passing through the center of the cube. There are 4 of these in a magic cube and all must sum correctly (as well as the rows, columns and pillars) for the cube to be magic. As you go from cell to cell along the line, all three coordinates change. In tesseracts this is called a quadragonal. For higher order hypercubes, this is called an n-agonal or space diagonal. Of course, with these higher dimensions there are more coordinates. A triagonal is sometimes called a long diagonal. See n-agonal

Inter-dimensional Comparisons

The magic sum for an n-Dimensional Magic Hypercube of Order m is given by:  S = m(1 + mn)/2

In a magic object, there are many lines that produce the magic sum. The table below, shows the minimum requirement of the number of lines for various types of magic hypercubes and is derived from the following equation:

                           N = 2(r-1)n!m(n-1)/[r!(n-r)!]

Where:            N is the number of r-agonals
                       n is the dimension of the hypercube
                       m is the order of the hypercube, and
                       r is the dimension of the hyperplane.

When r = 1, the number of orthogonals is given by N. As well, shown is the smallest order for the various classifications of pandiagonal, pantriagonal, etc. which is known. for each dimension. Some of the tesseracts are not known yet and some of these varieties have not been constructed yet.
This table provides the minimum requirements for each category. Usually, there are some extra lines, which may sum the magic sum, but not a complete set so as to change the category.

        n-agonals   Lines
Magic Hypercube n Lowest
Order
i -
rows
2 3 4 Total Equivelent
order 8
Square 2              
Simple   3 2m 2     2m + 2 18
Perfect   4 2m 2m     4m 32
Cube 3              
Simple   3 3m2   4   3m2 + 4 196
Diagonal   5 3m2 6m 4   3m2+6m+ 4 244
Pantriagonal   4 3m2   4m2   7m2 448
PantriagDiag   8? 3m2 6m 4m2   3m2+6m+ 4m2 452
Pandiagonal   7 3m2 6m2 4   9m2 + 4 580
Perfect   8 3m2 6m2 4m2   13m2 832
Tesseract 4              
Simple   3 4m3     8 4m3 + 8 2056
Panquadragonal   4 4m3     8m3 12m3 6144
Pandiagonal   ? 4m3 12m3   8 16m3 + 8 8200
Pantriagonal   ? 4m3   16m3 8 20m3 + 8 10240
Pan2 + pan4   ? 4m3 12m3   8m3 24m3 12296
Pan3 + pan4   ? 4m3   16m3 8m3 28m3 14336
Pan2 + pan 3   ? 4m3 12m3 16m3 8 32m3 + 8 16392
Perfect   16 4m3 12m3 16m3 8m3 40m3 20480

Hypercubes – number of correct summations. [1]

 

[1] H. D. Heinz and J. R. Hendricks, Magic Square Lexicon: Illustrated, 2000, 0-9687985-0-0, page 165

Comparison - Correct Summations Required
magic Square
Regular
Magic Cube
Regular
Magic Tesseract
Regular
m rows m2 rows m3 rows
m columns m2 columns m3 columns
2 diagonals m2 pillars m3 pillars
  4   3-agonals m3 files
    8   4-agonals
Perfect Perfect Perfect
m rows m2 rows m3 rows
m columns m2 columns m3 columns
2m diagonals m2 pillars m3 pillars
  4m2   3-agonals m3 files
  6m2   2-agonals 8m3   4-agonals
    12m3   3-agonals
    16m3   2-agonals
For a normal n-dimensional magic hypercube of order-m,
the sum is   m(mn+1)/2
Magic Squares, Cubes and Tesseracts Compared [2]

[2] H. D. Heinz and J. R. Hendricks, Magic Square Lexicon: Illustrated, 2000, 0-9687985-0-0, page 90

  Hyperplanes contained in a hypercube
Dimension i-rows Squares Cubes Tesseracts 5-D Hyper.
2 2m 1 0 0 0
3 3m2 3m 1 0 0
4 4m3 6m2 4m 1 0
5 5m4 10m3 10m2 5m 1
6 6m5 15m4 20m3 15m2 6m
7 7m6 21m5 35m4 35m3 21m2 [3]

An n-dimensional array of mn cells containing the numbers1, 2, ..., mn arranged in such a way that all rows, columns, etc sum the magic sum, as well as the 2n-1 n-agonals.
Remember that i-rows are orthogonals only. Correct n-agonals are not shown in this table.
If the hypercube is perfect, all these hyper-planes will also have all the n-agonals summing correctly.

[3] H. D. Heinz and J. R. Hendricks, Magic Square Lexicon: Illustrated, 2000, 0-9687985-0-0, page 80

Hypercubes cut by n hyperspaces

A magic square may be cut by a
1-dimensional magic  i-row in 2 ways
A magic cube may be cut by a
2 -dimensional magic square in 3 ways.
A magic tesseract may be cut by a
3 -dimensional magic cube in 4 ways.

If you are wondering where the cube in the fourth direction (in the tesseract) is, it is formed by the center square planes in the 3 horizontal planes of cubes.
All order-3 magic hypercubes are associated magic. The hypercubes they are cut by are also associated magic with correct n-agonals.

Examples - Cubes

The 4 Basic Order-3 Magic Cubes

Catalogue numbers are
          1-15-17-23                         2-15-18-24                          4-17-18-26   and                  6-16-17-26
Each of these four may be viewed in 48 aspects due to rotations and reflections. There is 1 basic order-3 magic square with 8 aspects and 58 basic magic tesseracts, each with 384 aspects due to rotations and reflections.
The 3 squares that bisect each of these four cubes are also magic although that is not a requirement of a simple magic cube.

 

Pantriagonal magic Cube

05  58  08  59        28  39  25  38       53  10  56  11        44  23  41  22
52  15  49  14        45  18  48  19       04  63  01  62        29  34  32  35
09  54  12  55        24  43  21  42       57  06  60  07        40  27  37  26
64  03  61  02        33  30  36  31       16  51  13  50        17  46  20  47
 
(x, y, 1)                (x, y, 2)                    (x, y, 3)                       (x, y, 4)
This is text format. Best used for larger magic cubes.

Pantriagonal is the lowest class of magic cube (next to the simple). Lines are required to sum correctly in 7m2 ways: m2 rows, m2 columns, m2 pillars, and 4m2 triagonals. Note that diagonals are NOT required to sum correctly.

Just as a complete row or column may be moved from 1 side to the other of a pandiagonal magic square, so too can a square plane be moved to the opposite side of this pantriagonal magic cube without destroying the triagonals.

J. R. Hendricks, Magic Squares to Tesseracts by Computer, Self-published 1999, 0-9684700-0-9, p. 70

An Order-8 Perfect Magic Cube

A perfect magic cube must add up in all possible ways. There are 13 such ways through each element.
Looking at it the other way, there are a total of l3m2 paths that sum correctly.
      m2 rows
      m2 columns
      m2 pillars
    4m2 triagonals
    6m2 diagonals

Order-8 is the smallest possible magic cube that can be perfect, with 832 lines summing to 2052. This one by J. R. Hendricks is an example of such a cube. 

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

[1] J. R. Hendricks, Magic Squares to Tesseracts by Computer, Self-published 1999, 0-9684700-0-9, pp 81-84.
[2] W. S. Andrews, Magic Squares & Cubes, 2nd edition, Dover Publ. 1960, 9 (1917) Dr. Planck, p 366.

Dimensions 4 and 5

A magic tesseract is a dimension-4 hypercube. To be simply magic, it is required only that all rows, columns, pillars, files, and the 8 quadragonals sum correctly.

Basic Order-3 Magic Tesseract MT#9 (Index # 54)

One of the authors (Hendricks) has found and all 58 basic magic tesseracts of order-3. He lists and displays illustrations of each of them in his book All Third-Order magic Tesseracts using the following indexing method:
  • Identify the lowest of the 16 corner numbers.
  • Take the adjacent number to this corner in each of the four lines.
  • Rearrange these four numbers (if necessary) in ascending order and write them after the corner number.

In this figure, the lowest corner number is 12 and the four numbers adjacent to it are 52, 61,62, and 76. Taking them in order; row, column, pillar and file they are already in ascending order, and, because the lowest corner is in the bottom left position we realize this tesseract is in the standard position. This definition is consistent with that of the Basic magic cube.

This tesseract (and each of the 57 others) can be displayed in 383 other aspects (orientations). These are not considered unique solutions.

John refers to this solution as MT#9 because it is the ninth order-3 tesseract he constructed.

H. D. Heinz and J. R. Hendricks, Magic Square Lexicon: Illustrated, 2000, 0-9687985-0-0, page 14

An Order-4 Quadragonal Magic Tesseract

A PAN-4-AGONAL MAGIC TESSERACT OF ORDER 4

The ability to translocate a row, or column of a magic square from one side of the square to the other side without destroying the diagonals is the hallmark of being pandiagonal.
Pantriagonal magic cubes also have this feature, but instead of translocating a single row, or column, whole planes of numbers can be moved.
With the panquadragonal magic tesseract, you will find entire cubes of number can be translocated. In the table below, the set of squares on the left-hand side, designated (4,x,y,1) to (1,x,y,l) constitute a cube. They may be translocated to the right-hand side as a group (to the top in the above diagram) and the “new” tesseract is magic. None of the main quadragonals has lost its magic property, even though the numbers in them are different.

J. R. Hendricks, Magic Squares to Tesseracts by Computer, Self-published 1999, 0-9684700-0-9, page 126
J. R. Hendricks, The Pan-4-Agonal Magic Tesseract, American Mathematical Monthly, Vol. 75, No. 4, April 1968, page 384.

NOTE that the squares and cubes mentioned in the above quotation are themselves not magic. The diagonals of the squares sum incorrectly, as do the triagonals of the cubes. Only the rows, columns, pillars and files and the 8 quadragonals are required to sum correctly for a simple magic tesseract. This is exactly the equivalent of a simple magic cube which requires only that the rows, columns, pillars and 4 main triagonals.

The quadragonal magic tesseract is the next higher class after the simple magic tesseract.
Required to sum correctly for this class of magic tesseract :
     m3 rows
     m3 columns
     m3 pillars
     m3 files
   8m3 quadragonals
Equals 12m3 lines that sum correctly (other lines may sum correctly but are not required).

Text format for the above Order-4 Quadragonal Magic Tesseract
239 116 30 129   56 154 197 107   210 77 35 192   9 167 252 86
153 199 108 54 79 36 190 209 168 250 85 11 114 29 131 240
34 189 211 80 249 87 12 166 31 132 238 113 200 106 53 155
88 10 165 251 130 237 115 32 105 55 156 198 191 212 78 33
4, x, y, 1 4, x, y, 2 4, x, y, 3 4, x, y, 4
138 229 123 24 109 51 160 194 183 220 70 41 84 14 161 255
52 158 193 111 218 69 43 184 13 163 256 82 231 124 22 137
71 44 182 217 164 254 81 15 122 21 139 232 157 195 112 50
253 83 16 162 23 140 230 121 196 110 49 159 42 181 219 72
3, x, y, 1 3, x, y, 2 3, x, y, 3 3, x, y, 4
19 144 226 125 204 102 57 151 46 177 223 68 245 91 8 170
101 59 152 202 179 224 66 45 92 6 169 247 142 225 127 20
222 65 47 180 5 171 248 90 227 128 18 141 60 150 201 103
172 246 89 7 126 17 143 228 149 203 104 58 67 48 178 221
2, x, y, 1 2, x, y, 2 2, x, y, 3 2, x, y, 4
118 25 135 236 145 207 100 62 75 40 186 213 176 242 93 3
208 98 61 147 38 185 215 76 241 95 4 174 27 136 234 117
187 216 74 37 96 2 173 243 134 233 119 28 97 63 148 206
1 175 244 94 235 120 26 133 64 146 205 99 214 73 39 188
1, x, y, 1 1, x, y, 2 1, x, y, 3 1, x, y, 4

The colored cells indicate the corners of the tesseract,

The Perfect Magic Tesseract

Required to sum correctly for this highest class of dimension 4 magic hypercube are:
  • m3 rows
  • m3 columns
  • m3 pillars
  • m3 files
  • 8m3 quadragonals
  • 16m3 triagonals
  • 12m3 diagonals

Equals 40 m3 ways (lines) that sum correctly (this is all the possible paths through any given point).

Corner values are shown for the order 16 Perfect magic tesseract.
Colors indicate the ends of the 8 main quadragonals.

The order-16 is the smallest possible perfect magic tesseract.
John R. Hendricks constructed the first one in 1998.
It contains the consecutive numbers from 1 to 65,536 and has the magic sum of 1,048,592 which is obtained in the following 163,840 ways.

     49,152 diagonals
     65,536 triagonals
     32,768 quadragonals
     16,384 rows columns pillars and files
It contains 64 perfect magic cubes and 1 536 perfect (pandiagonal) magic squares.

This perfect tesseract and the order 32 perfect dimension-5 hypercube he later constructed are obviously too large to publish here. The numbers in these two hypercubes may be inspected using his simple Pathfinder programs.[1]

More information on this order 16 and an order 6 Inlaid magic tesseract may be seen on John R. Hendricks archived web site.

[1]  J. R. Hendricks, Magic Squares to Tesseracts by Computer, Self-published 1999, 0-9684700-0-9, Appendix C.

A 5-Dimensional Perfect Magic Hypercube of order-32

This magic hypercube was constructed by John Hendricks in 2000.

33,554,432
5,242,880
327,680
10,240
160
Consecutive numbers, resulting in:
 i-rows (rows, columns, etc)
 perfect magic squares
 perfect magic cubes
 perfect magic tesseracts
Which translates to:
5,242,880
20,971,520
41,943,040
41,943,040
16,777,216
126,877,696
  i-rows (monagonal)
 diagonals
 3-agonals (triagonals)
 4-agonals (quadragonals)
 5-agonals
total lines, each summing to 536,870,928

J. R. Hendricks, Perfect n-Dimensional Magic Hypercubes of Order 2n, Self-published,1999, 0-9684700-4-1, page 25

Pathfinders

Obviously, magic objects with this many numbers cannot be printed out for visualization or study. Mr. Hendricks has come up with the concept of pathfinders. These are relatively simple computer programs [1][2] that generate the numbers that appear in any magic line through the hypercube. Conversely, the programs may be used to find the coordinate position of a given number in the magic hypercube.

Using the tesseract as an example: To show any row, column, or whatever you want. Pick any starting position (w,x,y,z) and any route from 1 to 40 and enter the values into the computer. Out come the numbers and the sum. If you want the reverse direction enter the route as a negative number (–5 instead of 5) and the numbers will all be reversed. For coordinates, 0 is the same as 16. For routes, zero is not a route.

Some of the routes might be:

  • Route #1 is a pillar. Z-changes.
  • Route #3 is a column. Only y changes.
  • Route #9 is a row. Only x changes.
  • Route #27 is a file. Only w changes.
  • . . .
  • Route #40 is the main quadragonal.

[1]  J. R. Hendricks, Magic Squares to Tesseracts by Computer, Self-published 1999, 0-9684700-0-9, Appendix C.
[2] J. R. Hendricks, Perfect n-Dimensional Magic Hypercubes of Order 2n, Self-published,1999, 0-9684700-4-1, pages 27-36.

Conclusions and References

On this page I have attempted to explain the meaning and reasoning behind the term ‘perfect’ when applied to magic hypercubes.
In an attempt to avoid confusion, I have included definitions for related terms.
I have expanded on this idea with illustrations and tables, including 2 orders of perfect magic cubes.
Much of the information here appears also on other pages, but has been included here for convenience.

Much of the material for this page was obtained from the two books below by John Hendricks. These books, however, go into much greater detail and should be referred to if a more in-depth explanation is desired.

Over many years, Mr. Hendricks has contributed much to the study of higher order magic hypercubes. However, He has also done a lot of original work with the lowly magic square, especially in the development of unique variations.

I encourage you to see more of his work via the link below. Also much of his work is featured on my J. R. Hendricks page. Also, on my newer section (of this site) on Tesseracts.

J. R. Hendricks, Perfect n-Dimensional Magic Hypercubes of Order 2n, Self-published,1999, 0-9684700-4-1.
36 pages of theory, equations and discussion on the definition of perfect as related to magic objects.
Also pathfinder basic programs for order-16 and 32 perfect dimension 4 and 5 hypercubes

J. R. Hendricks, Magic Squares to Tesseracts by Computer, Self-published 1999, 0-9684700-0-9
212 pages of text, theory, appendices, diagrams , etc, including basic program listings.

H. D. Heinz and J. R. Hendricks, Magic Square Lexicon: Illustrated, 2000, 0-9687985-0-0
239 definitions, most with illustrations, dealing with a large variety of magic objects.
More information and how to order the book is here.

Clifford A. Pickover, The Zen of Magic Squares, Circles, and Stars, Princeton Univ. Pr., 2002, 0-691-07041-5
A great new book destined to become a classic on magic squares, cubes, etc.
Specifically mentioned on page 101 is the new requirements for a cube to be considered 'perfect'.

W. H. Benson and O. Jacoby, Magic Cubes: New Recreations, Dover, 1981, 0-486-24140-8
A great book, but terminology and examples are not too clear. He refers to 'perfect' and 'pandiagonal perfect' cubes
but these are our definition for pandiagonal and pantriagonal magic cubes.

Martin Gardner, Time Travel and Other Mathematical Bewilderments, W. H. Freeman & Sons, 1988, 0-7167-1924-X. This includes a chapter on the first 'perfect' magic cubes, but these are all by the old definition.
This is mostly from his Scientific America, Jan. 1976 column. He includes references to some old works.

W. S. Andrews, Magic Squares & Cubes, Dover Publ., 1960 (original publication Open Court,1917)
The 'bible' on the subject of magic objects. Of course, it is very much out of date but indicates how much was known 100 years ago.

Here is a more extensive bibliography of magic hypercube related literature.

This page was originally posted December 2002
It was last updated December 09, 2009
Harvey Heinz   harveyheinz@shaw.ca
Copyright © 1998-2009 by Harvey D. Heinz