In mathematics, a magic hypercube is the k-dimensional generalization of magic squares and magic cubes, that is, an n × n × n × ... × n array of integers such that the sums of the numbers on each pillar (along any axis) as well as on the main space diagonals are all the same. The common sum is called the magic constant of the hypercube, and is sometimes denoted Mk(n). If a magic hypercube consists of the numbers 1, 2, ..., nk, then it has magic number
M k ( n ) = n ( n k + 1 ) 2 {\displaystyle M_{k}(n)={\frac {n(n^{k}+1)}{2}}} . For k = 4, a magic hypercube may be called a magic tesseract, with sequence of magic numbers given by OEIS: A021003. The side-length n of the magic hypercube is called its order. Four-, five-, six-, seven- and eight-dimensional magic hypercubes of order three have been constructed by J. R. Hendricks. Marian Trenkler proved the following theorem: A p-dimensional magic hypercube of order n exists if and only if p > 1 and n is different from 2 or p = 1. A construction of a magic hypercube follows from the proof. The R programming language includes a module, library(magic), that will create magic hypercubes of any dimension with n a multiple of 4.
Perfect magic hypercubes
If, in addition, the numbers on every cross section diagonal also sum up to the hypercube's magic number, the hypercube is called a perfect magic hypercube; otherwise, it is called a semiperfect magic hypercube. The number n is called the order of the magic hypercube. This definition of "perfect" assumes that one of the older definitions for perfect magic cubes is used. The Universal Classification System for Hypercubes (John R. Hendricks) requires that for any dimension hypercube, all possible lines sum correctly for the hypercube to be considered perfect magic. Because of the confusion with the term perfect, nasik is now the preferred term for any magic hypercube where all possible lines sum to S. Nasik was defined in this manner by C. Planck in 1905. A nasik magic hypercube has 1/2(3n − 1) lines of m numbers passing through each of the mn cells.
Nasik magic hypercubes A Nasik magic hypercube is a magic hypercube with the added restriction that all possible lines through each cell sum correctly to S = m(mn+1)/2 where S is the magic constant, m the order and n the dimension of the hypercube. Or, to put it more concisely, all pan-r-agonals sum correctly for r = 1...n. This definition is the same as the Hendricks definition of perfect, but different from the Boyer/Trump definition. The term nasik would apply to all dimensions of magic hypercubes in which the number of correctly summing paths (lines) through any cell of the hypercube is P = 3n − 1/2. A pandiagonal magic square then would be a nasik square because 4 magic line pass through each of the m2 cells. This was A.H. Frost’s original definition of nasik. A nasik magic cube would have 13 magic lines passing through each of its m3 cells. (This cube also contains 9m pandiagonal magic squares of order m.) A nasik magic tesseract would have 40 lines passing through each of its m4 cells, and so on.
History In 1866 and 1878, Rev. A. H. Frost coined the term Nasik for the type of magic square we commonly call pandiagonal and often call perfect. He then demonstrated the concept with an order-7 cube we now class as pandiagonal, and an order-8 cube we class as pantriagonal. In another 1878 paper he showed another pandiagonal magic cube and a cube where all 13m lines sum correctly i.e. Hendricks perfect. He referred to all of these cubes as nasik as a respect to the great Indian Mathematician D R Kaprekar who hails from Deolali in Nasik District in Maharashtra, India. In 1905 Dr. Planck expanded on the nasik idea in his Theory of Paths Nasik. In the introductory to his paper, he wrote;
Analogy suggest that in the higher dimensions we ought to employ the term nasik as implying the existence of magic summations parallel to any diagonal, and not restrict it to diagonals in sections parallel to the plane faces. The term is used in this wider sense throughout the present paper. In 1917, Dr. Planck wrote again on this subject.
It is not difficult to perceive that if we push the Nasik analogy to higher dimensions the number of magic directions through any cell of a k-fold must be ½(3k-1). In 1939, B. Rosser and R. J. Walker published a series of papers on diabolic (perfect) magic squares and cubes. They specifically mentioned that these cubes contained 13m2 correctly summing lines. They also had 3m pandiagonal magic squares parallel to the faces of the cube, and 6m pandiagonal magic squares parallel to the space-diagonal planes.
Notations in order to keep things in hand a special notation was developed:
[
k i ; k ∈ { 0 , ⋯ , n − 1 } ; i ∈ { 0 , ⋯ , m − 1 } ] {\displaystyle \left[{}_{k}i;\ k\in \{0,\cdots ,n-1\};\ i\in \{0,\cdots ,m-1\}\right]} : positions within the hypercube
⟨
… excerpt ends here. Continue reading the full article.
