Magic hyperbeam
A magic hyperbeam (ndimensional magic rectangle) is a variation on a magic hypercube where the orders along each direction may be different. As such a magic hyperbeam generalises the two dimensional magic rectangle and the three dimensional magic beam, a series that mimics the series magic square, magic cube and magic hypercube. This article will mimic the magic hypercubes article in close detail, and just as that article serves merely as an introduction to the topic.
Contents
Conventions
It is customary to denote the dimension with the letter 'n' and the orders of a hyperbeam with the letter 'm' (appended with the subscripted number of the direction it applies to).
 (n) Dimension : the amount of directions within a hyperbeam.
 (m_{k}) Order : the amount of numbers along kth monagonal k = 0, ..., n − 1.
Further: In this article the analytical number range [0.._{k=0}∏^{n1}m_{k}1] is being used.
Notations
in order to keep things in hand a special notation was developed:
 [ _{k}i; k=[0..n1]; i=[0..m_{k}1] ]: positions within the hyperbeam
 < _{k}i; k=[0..n1]; i=[0..m_{k}1] >: vectors through the hyperbeam
Note: The notation for position can also be used for the value on that position. There where it is appropriate dimension and orders can be added to it thus forming: ^{n}[_{k}i]_{m0,..,mn1}
Construction
Basic
Description of more general methods might be put here, I don't often create hyperbeams, so I don't know whether Knightjump or Latin Prescription work here. Other more adhoc methods suffice on occasion I need a hyperbeam.
Multiplication
Amongst the various ways of compounding, the multiplication^{[1]} can be considered as the most basic of these methods. The basic multiplication is given by:
^{n}B_{(m..)1} * ^{n}B_{(m..)2} : ^{n}[_{k}i]_{(m..)1(m..)2} = ^{n}[ [[_{k}i \ m_{k2}]]_{(m..)1}_{k=0}∏^{n1}m_{k1}]_{(m..)2} + [_{k}i % m_{k2}]_{(m..)2}]_{(m..)1}_{(m..)2}
(m..) abbreviates: m_{0},..,m_{n1}.
(m..)_{1}(m..)_{2} abbreviates: m_{01}m_{02},..,m_{n11}m_{n12}.
Curiosities
all orders are either even or odd
A fact that can be easily seen since the magic sums are:
S_{k} = m_{k} (_{j=0}∏^{n1}m_{j}  1) / 2
When any of the orders m_{k} is even, the product is even and thus the only way S_{k} turns out integer is when all m_{k} are even.
Thus suffices: all m_{k} are either even or odd.
This is with the exception of m_{k}=1 of course, which allows for general identities like:
 N_{m}^{t} = N_{m,1} * N_{1,m}
 N_{m} = N_{1,m} * N_{m,1}
Which goes beyond the scope of this introductory article
Only one direction with order = 2
since any number has but one complement only one of the directions can have m_{k} = 2.
Aspects
A hyperbeam knows 2^{n} Aspectial variants, which are obtained by coördinate reflection ([_{k}i] > [_{k}(i)]) effectively giving the Aspectial variant:
^{n}B_{(m0..mn1)}^{~R} ; R = _{k=0}∑^{n1} ((reflect(k)) ? 2^{k} : 0) ;
Where reflect(k) true iff coördinate k is being reflected, only then 2^{k} is added to R.
In case one views different orientations of the beam as equal one could view the number of aspects n! 2^{n} just as with the magic hypercubes, directions with equal orders contribute factors depending on the hyperbeam's orders. This goes beyond the scope of this article.
Basic manipulations
Besides more specific manipulations, the following are of more general nature
 ^[perm(0..n1)] : coördinate permutation (n == 2: transpose)
 _2^{axis}[perm(0..m1)] : monagonal permutation (axis ε [0..n1])
Note: '^' and '_' are essential part of the notation and used as manipulation selectors.
Coördinate permutation
The exchange of coördinaat [_{k}i] into [_{perm(k)}i], because of n coördinates a permutation over these n directions is required.
The term transpose (usually denoted by ^{t}) is used with two dimensional matrices, in general though perhaps "coördinaatpermutation" might be preferable.
Monagonal permutation
Defined as the change of [_{k}i] into [_{k}perm(i)] alongside the given "axial"direction. Equal permutation along various axes with equal orders can be combined by adding the factors 2^{axis}. Thus defining all kinds of ragonal permutations for any r. Easy to see that all possibilities are given by the corresponding permutation of m numbers.
normal position
In case no restrictions are considered on the nagonals a magic hyperbeam can be represented shown in "normal position" by:
[_{k}i] < [_{k}(i+1)] ; i = 0..m_{k}2 (by monagonal permutation)
Qualification
Qualifying the hyperbeam is less developed then it is on the magic hypercubes in fact only the k'th monagonal direction need to sum to:
S_{k} = m_{k} (_{j=0}∏^{n1}m_{j}  1) / 2
for all k = 0..n1 for the hyperbeam to be qualified {magic}
When the orders are not relatively prime the nagonal sum can be restricted to:
S = lcm(m_{i} ; i = 0..n1) (_{j=0}∏^{n1}m_{j}  1) / 2
with all orders relatively prime this reaches its maximum:
S_{max} = _{j=0}∏^{n1}m_{j} (_{j=0}∏^{n1}m_{j}  1) / 2
Special hyperbeams
The following hyperbeams serve special purposes:
The "normal hyperbeam"
^{n}N_{m0,..,mn1} : [_{k}i] = _{k=0}∑^{n1} _{k}i m_{k}^{k}
This hyperbeam can be seen as the source of all numbers. A procedure called "Dynamic numbering" makes use of the isomorphism of every hyperbeam with this normal, changing the source, changes the hyperbeam. Basic multiplications of normal hyperbeams play a special role with the "Dynamic numbering" of magic hypercubes of order _{k=0}∏^{n1} m^{k}.
The "constant 1"
^{n}1_{m0,..,mn1} : [_{k}i] = 1
The hyperbeam that is usually added to change the here used "analytic" numberrange into the "regular" numberrange. Other constant hyperbeams are of course multiples of this one.
See also
References
This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (December 2014) (Learn how and when to remove this template message)

 ^ this is a hyperbeam version of (pe.): Alan Adler magic square multiplication
Further reading
 Thomas R. Hagedorn, On the existence of magic ndimensional rectangles, Discrete Mathematics 207 (1999), 5363.
 Thomas R. Hagedorn, Magic rectangles revisited, Discrete Mathematics 207 (1999), 6572.
 Marián Trenkler, Magic rectangles, The Mathematical Gazette 83(1999), 102105.
 Harvey D. Heinz & John R. Hendricks, Magic Square Lexicon: Illustrated, selfpublished, 2000, ISBN 0968798500.
External links
 http://www.magichypercubes.com/Encyclopedia
 Marián Trenklar CubeRef.html
 Mitsutoshi Nakamura: Rectangles