# Hypercube Classes         Introduction       Magic Squares      Magic Cubes      Magic Tesseracts Introduction
Magic hypercubes may be classified by reference to which r-agonals sum correctly to the magic constant. For magic squares and magic cubes, this has been discussed previously.    
A brief review will be presented on this page, using a different prospective. Then I will present the classes for the magic tesseract. Note that within these classes, the hypercube may have additional features, such as associated, compact complete, inlaid, multiply, etc.

On this page, the variable r will range from 1 to m, where m indicates the order. n, as usual on my pages, will indicate the dimension of the hypercube.
Another name for  1-agonal is orthogonal lines (those parallel to the edges of the hypercube). Only 1 coordinate change when moving along the line.
Another name for 2-agonal is diagonal. 2 coordinates change when moving along the line.
Another name for 3-agonal is triagonal. 3 coordinates change when moving along the line.
Another name for 4-agonal is quadragonal. 4 coordinates change when moving along the line.
A particular hypercube may have some, but not all of the correct r-agonals that would qualify it for a higher class.

The prefix pan indicates all of that r-agonal, both 1-segment and multi-segment (broken).

A pandiagonal magic square may be transformed to another pandiagonal magic square by moving a row or column from one side of the square to the opposite side. Similarly, a pantriagonal magic cube may be transformed into another pantriagonal magic cube by moving a plane from one side of the cube to the other! Furthermore, a panquadragonal magic tesseract may be transformed to another one by moving a cube from one side to the other! Etc. Magic squares (n = 2)

There are only two classes of magic squares.

 Class name Minimum requirements Minimum correct summation Lowest order Simple All 1-agonals and the two main 2-agonals sum correctly. 2m + 2 3 Pandiagonal (nasik) All 1-agonals and all 2-agonals sum correctly. This class has been referred to historically as being Perfect, and has been so called in Hendricks Universal Classification System. Frost called it Nasik. To avoid confusion in the higher dimensions for this highest possible class, I have started using the term nasik in place of perfect.  4m 4 Magic cubes (n = 3)

There are six classes of magic cubes.

 Class name Minimum requirements Minimum correct summations Lowest order Simple all 1-agonals and the four main 3-agonals sum correctly. 3m2 + 4 3 Pantriagonal all 1-agonals and all 3-agonals sum correctly. 7m2 4 Diagonal all 1-agonals and the four main 3-agonals sum correctly. In addition, the two main diagonals (2-agonals) of each orthogonal plane sum correctly. 3m2+6m+4 5 Pantriagonal diagonal all 1-agonals and all 3-agonals sum correctly. In addition, the two main diagonals (2-agonals) of each orthogonal plane sum correctly. 7m2+6m 5 Pandiagonal all 1-agonals and the four main 3-agonals sum correctly. In addition, all 2-agonals of each orthogonal plane sum correctly. 9m2 + 4 7 Nasik this is a combination Pantriagonal and Pandiagonal cube, so all 1-agonals and all 3-agonals sum correctly, and all 2-agonals of each orthogonal plane sum correctly. Hendricks calls this top class (all possible lines sum correctly) perfect. Nakamura calls it pan-2,3-agonal. 13m2 8  Magic tesseracts (n = 4)

There are 2 classes of magic squares and 6 classes of magic cubes. So it is to be expected that there will be many more classes of magic tesseract. In fact, there are 18. Names of these are arbitrarily chosen to be descriptive, rather then concise. As in the case for the square and the cube, these classes are listed in order of increasing number of correct lines. In late 2007, Mitsutoshi Nakamura had constructed a tesseract in most of these classes. 

 Class name Minimum requirements Minimum correct summations Lowest order Simple All 1-agonals and the eight main (1-segment) 4-agonals sum correctly. This is a basic requirement for classes of tesseract to be magic. 4m3 + 8 3 Triagonal Basic + all main (1-segment) 3-agonals sum correctly. 4m3 + 16m + 8 4 Diagonal Basic + all main (1-segment) 2-agonals sum correctly. 4m3 + 12m2 + 8 4 Diagonal + Triagonal Basic + all main 2-agonals and 3-agonals sum correctly. 4m3 + 12m2 + 16m + 8 8? Panquadragonal Basic + all 4-agonals sum correctly. 12m3 4 Triagonal + Pan4 Basic + all 1-segment 3-agonals + all 4-agonals. 12m3 + 16m 4 Diagonal + Pan4 Basic + all 1-segment 2-agonals + all 4-agonals. 12m3 + 12m2 8? Diagonal + Triagonal + Pan4 Basic + all 1-segment 2-agonals + all 1-segment 3-agonals + all 4-agonals. 12m3 + 12m2 + 16m 8? Pandiagonal Basic + all 2-agonals. 16m3 + 8 9? Triagonal + Pan2 Basic + all 1-segment 3-agonals + all 2-agonals. 16m3 + 16m + 8 ? Pantriagonal Basic + all 3-agonals. 20m3 + 8 4 Diagonal + Pan3 Basic + all 1-segment 2-agonals + all 3-agonals. 20m3 + 12m2 + 8 ? Pan2 + Pan4 Basic + all 2-agonals + all 4-agonals. 24m3 13? Triagonal + Pan2 + Pan4 Basic + all 1-segment 3-agonals + all 2-agonals + all 4-agonals. 24m3 + 16m 16? Pan3 + Pan4 Basic + all 3-agonals + all 4-agonals. 28m3 4 Diagonal + Pan3 + Pan4 Basic + all 1-segment 2-agonals + all 3-agonals + all 4-agonals. 28m3 + 12m2 8 Pan2 + Pan3 Basic + all 2-agonals + all 3-agonals. 32m3 + 8 15? Nasik     Basic + all 2-agonals + all 3-agonals + all 4-agonals. Hendricks calls this top class (all possible lines sum correctly) perfect. Nakamura calls it pan-2,3,4-agonal . 40m3 16

Statistical information on these classifications are shown in tables on my Hypercube Math page.
I have not personally checked most of the tesseracts mentioned in this table. Footnotes
 Heinz & Hendricks, A Unified Classification System for Magic Hypercubes, Journal of Recreational Mathematics, 32:1, 2003-2004, pages 30-36
 H. D. Heinz, The First (?) Perfect Magic Cubes, JRM, 33:2, 2004-2005, pages 116-119
 My Six Classes of Cubes article
 Mitsutoshi Nakamura’s http://homepage2.nifty.com/googol/magcube/en/classes.htm
 Nasik   from Frost’s original term for pandiagonal magic squares, and Planck’s subsequent expansion of the definition to include the highest class of all dimensions of magic hypercubes. See  and my Nasik article. Less ambiguous then perfect!

A. H. Frost, Invention of Magic Cubes, Quarterly Journal of Mathematics, 7, 1866, pages 92-102. See page 99, para. 23 and page 100, para. 26.
 C. Planck, The Theory of Path Nasiks, Printed for private circulation by A. J. Lawrence, Printer, Rugby (England),1905
(Available from The University Library, Cambridge).
 W. S. Andrews, Magic Squares and Cubes. Open Court Publ.,1917. Pages 365,366, by Dr. C. Planck.  Re-published by Dover Publ., 1960, Pages 365,366 (no ISBN); Dover Publ., 2000, 0486206580; Cosimo Classics, Inc., 2004, 1596050373      This page was originally posted November 2007 It was last updated October 20, 2010 Harvey Heinz   harveyheinz@shaw.ca Copyright © 1998-2009 by Harvey D. Heinz