# Most-Perfect Magic Cubes

Most, if not al, magic squares with special features have an equivalent in magic cubes (and higher dimension magic objects).

For example; multiply, border, inlaid, multimagic, prime number, composition, etc., magic squares all have the equivalent in magic cubes.

This page will explore the 3 dimensional equivalent of the most-perfect magic square.

For convenience in explaining the features of a most-perfect magic square, I will reproduce here an excerpt from the relevant page of my magic squares site. For more information  go to

### Features of Most-perfect magic squares

 4 5 16 9 14 11 2 7 1 8 13 12 15 10 3 6
All 48 pandiagonal magic squares of order-4 are most-perfect!

For other orders, not all pandiagonal magic squares are most-perfect.

The 4 corner cells of any square array of cells in an order-4 most-perfect magic square sum to S.

Definition

1.      Every 2 x 2 block of cells (including wrap-around) sum to 2T (where T= n2 + 1)

2.      Any pair of integers distant ½n along a diagonal sum to T

3.      Doubly-even pandiagonal normal magic squares (i.e. orders 4, 8, 12, etc. using integers from 1 to n2)

See
McClintock  E. (1897) On the most perfect forms of magic squares  with methods for their production. American Journal of Mathematics 19 p.99-120.
Ollerenshaw K. (1986) On ‘most perfect’ or ‘complete’ 8 x 8 pandiagonal magic squares. Proceedings of the Royal Society of London A407  p.259-281
Kathleen Ollerenshaw and David Brée  Most-perfect Pandiagonal Magic Squares  Institute of Mathematics and its Applications  1988  0-905091-06-X

 Note1   Note2:   Note 3. For mathematical convenience  the authors use the series from 0 to n2-1. In that case S=n(n2-1)/2  T = n2-1. I have chosen to use the series from 1 to n2 to be consistent with the definition of a normal magic square with S=n(n2+1)/2. I use the symbol S to indicate the magic sum and T to indicate the value of n2 + 1) which the authors indicates with S. Furthermore, I use m to indicate the order, reserving n as the symbol for the dimension. On these pages T=mn + 1 and S=m(mn+1)/2 The term 'perfect cube' as used on this page (and this site) refers to a cube in which all possible lines through each cell sum to the magic constant. This is consistent with the alternate name for a pandiagonal magic square, in which all 4 possible lines through each cell sum to the magic constant

When we extend the above requirements for most-perfect to 3 dimensions we have

 Most-Perfect Magic Square Most-Perfect Magic Cube Every 2 x 2 block of cells (including wrap-around) sum to 2T (where T= m2 + 1). Every 2 x 2 x 2 block of cells (including wrap-around) sum to 4T (where T= m3 + 1). Any pair of integers distant ½m along a pandiagonal sum to T Any pair of integers distant ½m along a pantriagonal sum to T Must be Doubly-even pandiagonal (also historically called perfect) normal magic square Must be a Doubly-even Perfect normal magic cube. (The lowest order perfect magic cube is order 8.)

All 48 pandiagonal magic squares of order-4 are most-perfect!
All (number not known) perfect magic cubes of order-8 are most-perfect!

### Order-4

This order 4 cube has the characteristics of a most perfect magic cube, except that it is not a perfect magic cube.

```Cube_4-Hendricks-JRM-1	Pantriagonal and a Group I cube
01  32  49  48    62  35  14  19    04  29  52  45    63  34  15  18
56  41  08  25    11  22  59  38    53  44  05  28    10  23  58  39
13  20  61  36    50  47  02  31    16  17  64  33    51  46  03  30
60  37  12  21    07  26  55  42    57  40  09  24    06  27  54  43```

NOTE: Not all order 4 pantriagonal cubes belong to group I. The following cube is an example. Although it is pantriagonal, notice that not all 2 x 2 sub-squares sum to S. Also, not all pairs of integers distant ½n along a pantriagonal sum to T

I choose this particular cube as an example, because of another outstanding feature. This numbers in this cube by Guenter Stertenbrink are arranged in a chess knight closed tour!

```Cube_4-Stertenbrink-2.xls	Pantriagonal but not a group I cube
20  41  14  55    15  54  17  44    42  19  56  13    53  16  43  18
39  30  57  04    60  01  38  31    29  40  03  58    02  59  32  37
10  51  24  45    21  48  11  50    52  09  46  23    47  22  49  12
61  08  35  26    34  27  64  05    07  62  25  36    28  33  06  63```

I have included these order 4 cubes as examples. However, a condition for most-perfect cube is that they belong to the perfect cube class, so we cannot consider order 4 (or 12, 20 etc.).

### Order-8

Order-8 Perfect magic cubes
·        Contain 72 pandiagonal magic squares
·        Each cell is part of 13 lines of 8 integers that sum to S.
·        The corners of all sub-cubes of orders 2 to 7 sum to S (and to 4T).
·        Is complete ( every pantriagonal contains m/2 complement pairs, spaced ½m apart [called T by Ollerenshaw]).

Order-8 Pantriagonal magic cubes
·        May contain no magic squares
·        Only rows, columns, pillars, and pantriagonals are required to sum to S.
·        The corners of most sub-cubes of orders 2 to 7 do not sum to S
·        Is complete (every pantriagonal contains m/2 complement pairs, spaced ½m apart).

Therefore only order 8 perfect magic cubes may be considered as candidates for the title “most-perfect’.
All order 8 perfect magic cubes are most-perfect! This is consistent with order-4 magic squares, where all pandiagonals squares are Most-perfect. In each case, for the smallest possible order, all are most-perfect.

An example cube.

Dr. C. Planck’s Order 8 Perfect Magic Cube         Not associated
From The Theory of Paths Nasic. Printed for private distribution in 1905

```Plane I Top                                 II
31  358  477  161   26  355  476  168      508  136   63  326  509  129   58  323
306  395  244   80  311  398  245   73      237   81  298  403  236   88  303  406
359  478  165   25  354  475  164   32      132   64  327  510  133   57  322  507
394  243   76  312  399  246   77  305       85  297  402  235   84  304  407  238
479  166   29  353  474  163   28  360       60  328  511  134   61  321  506  131
242   75  308  400  247   78  309  393      301  401  234   83  300  408  239   86
167   30  357  473  162   27  356  480      324  512  135   62  325  505  130   59
74  307  396  248   79  310  397  241      405  233   82  299  404  240   87  302
Horizontal Plane III                        IV
50  331  500  144   55  334  501  137      493  145   42  339  492  152   47  342
295  414  229   89  290  411  228   96      196  128  263  446  197  121  258  443
330  499  140   56  335  502  141   49      149   41  338  491  148   48  343  494
415  230   93  289  410  227   92  296      124  264  447  198  125  257  442  195
498  139   52  336  503  142   53  329       45  337  490  147   44  344  495  150
231   94  293  409  226   91  292  416      260  448  199  126  261  441  194  123
138   51  332  504  143   54  333  497      341  489  146   43  340  496  151   46
95  294  413  225   90  291  412  232      444  200  127  262  445  193  122  259
Horizontal Plane V                          VI
39  350  485  153   34  347  484  160      452  192    7  382  453  185    2  379
266  435  204  120  271  438  205  113      213  105  274  427  212  112  279  430
351  486  157   33  346  483  156   40      188    8  383  454  189    1  378  451
434  203  116  272  439  206  117  265      109  273  426  211  108  280  431  214
487  158   37  345  482  155   36  352        4  384  455  190    5  377  450  187
202  115  268  440  207  118  269  433      277  425  210  107  276  432  215  110
159   38  349  481  154   35  348  488      380  456  191    6  381  449  186    3
114  267  436  208  119  270  437  201      429  209  106  275  428  216  111  278
Horizontal Plane VII                        VIII
10  371  460  184   15  374  461  177      469  169   18  363  468  176   23  366
287  422  221   97  282  419  220  104      252   72  319  390  253   65  314  387
370  459  180   16  375  462  181    9      173   17  362  467  172   24  367  470
423  222  101  281  418  219  100  288       68  320  391  254   69  313  386  251
458  179   12  376  463  182   13  369       21  361  466  171   20  368  471  174
223  102  285  417  218   99  284  424      316  392  255   70  317  385  250   67
178   11  372  464  183   14  373  457      365  465  170   19  364  472  175   22
103  286  421  217   98  283  420  224      388  256   71  318  389  249   66  315```

#### Order-12

There are NO order 12 Perfect magic cubes, because it is impossible to construct a cube of this order that is both Pantriagonal and Pandiagonal.
Or, to say it another way, it is impossible to construct an order 12 cube in which all 13 straight lines of m numbers passing through each cell, sum to the
magic constant .

Aale de Winkel's Pantriagonal magic cube (on my Order-12 Cubes page) comes close!

·    It is 'complete', a term defined by Kanji Setsuda for the feature that every pantriagonal contains m/2 complement pairs, spaced m/2 apart.
·    Also,  the eight corners of all 2x2x2,  4x4x4, 6x6x6, 7x7x7, 8x8x8, 10x10x10, and 12x12x12 sub-cubes contained in it sum to 8/12 of   S.
·    It fails to be Most-perfect only due to the failure of condition 3.

#### Order-16

Order-16 Perfect magic cubes

·        Contain 144 pandiagonal magic squares (3m orthogonal plus 6m oblique).

·        Each cell is part of 13 lines of 16 integers that sum to S.

·        On only some cubes do the corners of all 2x2x2 sub-cubes sum to 4T

·        Only some cubes are complete ( every pantriagonal contains m/2 complement pairs, spaced ½m apart).

Order-16 Pantriagonal magic cubes
·        May contain no magic squares

·        Only rows, columns, pillars, and pantriagonals are required to sum to S.
·        On only some cubes do the corners of all 2x2x2 sub-cubes sum to 4T

·        Only some cubes are complete ( every pantriagonal contains m/2 complement pairs, spaced ½m apart).

#### Summary

As is to be expected, higher dimension magic objects increases the complexity.
For example, magic squares have only 2 main classes. Simple and pandiagonal (perfect).
Increasing the dimension by 1 to obtain the magic cube, results in 6 main classes (if we define a class as an increase in features). Ironically, the second lowest (after the simple magic cube), is the pantriagonal cube, the equivalent of the pandiagonal magic square.

It seems to me that to be called most-perfect, the cube should be a subset of the perfect magic cube. This is the highest class of magic cube, just as the pandiagonal magic square is the highest class of square. Although, as shown previously, the required features for a most-perfect magic square are available in both the perfect and the pantriagonal magic cubes.

### Order-4

All order 4 group I cubes fulfill the 3 requirements as called for in the most perfect square. Of course, these cubes do not belong to the ‘perfect’ class, so I suggest they not be called most-perfect.

Order-8

All order 8 perfect magic cubes meet all the requirements for most-perfect magic squares. This assumes that requirement:

1. Has been adapted for cubes from “every 2x2 block of cells…” to corner cells of every 2x2x2 block of cells”.
2. Has been adapted for cubes from “…along a pandiagonal…” to “…along a pantriagonal…”.
3. Has been adapted for cubes from “…pandiagonal magic squares…” to “…perfect magic cubes…”.

The fact that all order 8 perfect magic cubes are most-perfect is consistent with magic squares where all the members of the lowest order possible (order 4) are most-perfect. Also for order 8, 4T =S, which is consistent with order 4 most-perfect magic squares where 2T = S.

### Order-12

There are no order 12 most-perfect magic cubes because there are no order 12 perfect magic cubes.
This is one fact that is inconsistent with most-perfect magic squares where there are order 12 most-perfect..

### Order-16

In this order there are perfect magic cubes, and a sub-set of these are most-perfect by the definitions listed under order 8.
I include here  listings for two order 16 perfect magic cubes. Only the first one is most-perfect.

#### Conclusions

Requirements for a most-perfect magic cube.

1. Corners of every 2 x 2 x 2 block of cells (including wrap-around) sum to 4T (where T = m3 + 1).
2. Any pair of integers distant ½m along a pantriagonal sum to T
3. The cube must be a doubly-even normal perfect magic cube.

Kathleen Ollerinshaw made much use of doubly-even reversible squares for enumerating the most-perfect squares. However, they are not required in defining most-perfect squares. I have made no effort to investigate reversible cubes, although I suspect they do exist. Perhaps someone else will feel motivated to do so.

This is a preliminary study only, and I invite others to investigate most-perfect magic cubes more thoroughly. As explained above, I suggest the following definitions for most perfect magic cubes. Others may have different opinions or further investigation may require changes.

I invite others to study the subject further, and am prepared to modify this page as required by new findings.

A note regarding definitions:
To avoid ambiguity with the term perfect, Mitsutoshi Nakamura calls such a cube pan-2,3-agonal.
He also coined the term cubic-compact for the feature in requirement 1 above (sum of corners of 2x2x2 blocks).