In
mathematics, a magic hypercube is the
''k''-dimensional generalization of
magic square
In recreational mathematics, a square array of numbers, usually positive integers, is called a magic square if the sums of the numbers in each row, each column, and both main diagonals are the same. The 'order' of the magic square is the number ...
s and
magic cube
In mathematics, a magic cube is the dimension, 3-dimensional equivalent of a magic square, that is, a collection of integers arranged in an ''n'' × ''n'' × ''n'' pattern such that the sums of the numbers on each row, ...
s, that is, an ''n'' × ''n'' × ''n'' × ... × ''n'' array of
integers
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
such that the sums of the numbers on each pillar (along any axis) as well as on the main
space diagonal
In geometry, a space diagonal (also interior diagonal or body diagonal) of a polyhedron is a line connecting two vertices that are not on the same face. Space diagonals contrast with '' face diagonals'', which connect vertices on the same face ( ...
s are all the same. The common sum is called the
magic constant
The magic constant or magic sum of a magic square is the sum of numbers in any row, column, or diagonal of the magic square. For example, the magic square shown below has a magic constant of 15. For a normal magic square of order ''n'' – that is ...
of the hypercube, and is sometimes denoted ''M''
''k''(''n''). If a magic hypercube consists of the numbers 1, 2, ..., ''n''
''k'', then it has magic number
:
.
For ''k'' = 4, a magic hypercube may be called a magic tesseract, with sequence of magic numbers given by .
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
John Robert Hendricks (September 4, 1929 – July 7, 2007) was a Canadian amateur mathematician specializing in magic squares and hypercubes. He published many articles in the Journal of Recreational Mathematics as well as other journals.
Early ...
.
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
R is a programming language for statistical computing and graphics supported by the R Core Team and the R Foundation for Statistical Computing. Created by statisticians Ross Ihaka and Robert Gentleman, R is used among data miners, bioinforma ...
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
Cross section may refer to:
* Cross section (geometry)
** Cross-sectional views in architecture & engineering 3D
*Cross section (geology)
* Cross section (electronics)
* Radar cross section, measure of detectability
* Cross section (physics)
**Ab ...
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 (3
''n'' − 1) lines of ''m'' numbers passing through each of the ''m''
''n'' 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
where ''S'' = 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'' = (3
''n''- 1)/2
A
pandiagonal magic square A pandiagonal magic square or panmagic square (also diabolic square, diabolical square or diabolical magic square) is a magic square with the additional property that the broken diagonals, i.e. the diagonals that wrap round at the edges of the squa ...
then would be a ''nasik'' square because 4 magic line pass through each of the ''m''
2cells. This was A.H. Frost’s original definition of nasik.
A ''nasik'' magic cube would have 13 magic lines passing through each of its ''m''
3 cells. (This cube also contains 9''m'' pandiagonal magic squares of order ''m''.)
A ''nasik'' magic tesseract would have 40 lines passing through each of its ''m''
4 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 13''m'' 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
Dattatreya Ramchandra Kaprekar ( mr, दत्तात्रेय रामचंद्र कापरेकर; 17 January 1905 – 1986) was an Indian recreational mathematician who described several classes of natural numbers incl ...
who hails from
Deolali
Deolali, or Devlali (), is a small hill station and a census town in Nashik district of the Indian state of Maharashtra. Now it is part of Nashik Metropolitan Region.
Deolali has an important army base. Deolali Camp, one of the oldest Indian mi ...
in
Nasik
Nashik (, Marathi: aːʃik, also called as Nasik ) is a city in the northern region of the Indian state of Maharashtra. Situated on the banks of river Godavari, Nashik is the third largest city in Maharashtra, after Mumbai and Pune. Nashik ...
District in
Maharashtra,
India
India, officially the Republic of India ( Hindi: ), is a country in South Asia. It is the seventh-largest country by area, the second-most populous country, and the most populous democracy in the world. Bounded by the Indian Ocean on the ...
.
In 1905 Dr. Planck expanded on the nasik idea in his Theory of Paths Nasik. In the introductory to his paper, he wrote;
In 1917, Dr. Planck wrote again on this subject.
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 13''m''
2 correctly summing lines. They also had 3''m'' pandiagonal magic squares parallel to the faces of the cube, and 6''m'' pandiagonal magic squares parallel to the triagonal planes.
Notations
in order to keep things in hand a special notation was developed:
*