The Magic Encyclopedia ™ DataBase

The Latin Prescription
(by Aale de Winkel)
J.R. Hendricks

J.R. Hendricks explains in his self published "magic squares to tesseract by computer" the construction of magic hypercubes with help of what he calls "digit equations". As puny reformalism of the method I defined the matrix I jokingly nicknamed "Latin Prescription" (as just what the dokter ordered to create a "Latin Hypercube")
Being a np+1 by n matrix the "Latin Prescription" LP multiplies a np+1 dimensional positioning vector

J. R. Hendricks's digit(al) equations
Acknowledgement:
In J. R. Hendricks's self published "magic squares to tesseracts by computer" he explains the
use of digit equations for the formation of Latin Hypercubes. Digital equation came
to pass when he formulated his order 25 bimagic cube
Note: the quality of the resulting hypercubes depend on parameters used
the below give a description of the method and is not too concerned about
the quality of te results, samples might be added at some future upload
digit equation modular equation to obtain latin hypercube
LH(x) = [ k=0n-1 akxk + an ] % m
coordinate split coordinate splitup in radix r when order m = rp
xk = l=0p-1 xkp+lrl
I currently don't know wether this can de done in compound orders other
than those of single power, the database holds bimagic squares of orders
8 = 23 and 9 = 32 obtained by this method
digital equation modular equation to obtain latin hypercube on splitup coordinates
LH(x) = [ k=0n-1l=0p-1 akp+lxkp+l + anp ] % m
Hypercube
The hypercube is formed by combining latin hypercubes
note (p = 1 for digit equations)
H(a,x) = k=0n-1 mn-1-k { [ ( l=0n-1l=0p-1 akp+l xkp+l + anp) % m ]=[perm(0..m-1)] }
the latin hypercubes digits obtained from the equation can be changed by means of
applying a digitchanging permutation to those digits as indicated by =[perm(0..m-1)]
(ie: replace digit d by perm(d) for all digits in the latin hypercube)
Latin Prescription
A matrix reformalism of the digit equations
Latin Prescription np+1 by n matrix representing the hypercube
LPkp+i,j = akp+i,j (i = 0..p-1 ; k = 0..n-1) (j = 0..n-1)
LPnp,j = anp,j (j = 0..n-1)
note: j indicates that one needs n latin hypercubes / digit equations
to formulate an hypercube; p is usually 1, if not digital equations are
effectively described by the same formalism as digitequations
H(LP) = k=0n-1 mn-1-k { [ ( l=0np LPkp+l xkp+l) % m ]=[perm(0..m-1)] }
in order for the above matrix multiplication to work note that x is a np+1 vector denoting
the hypercubes coordinates (in normal or split up version) and an additional 1 as last entry
and of course a digitchanging permutation =[perm(0..m-1)] can be performed at any latin
hypercube individually.
LP(k,i),j = ak,i (k = 0..p-1 ; i = 0..n) (j = 0..n-1)
note: j indicates that one needs n latin hypercubes / digit equations
to formulate an hypercube; p is usually 1, if not digital equations are
effectively described by the same formalism as digitequations
Examples
LPi,j = ((i == j-1) ? -1 : 1); i,j = 0..n-1;
(ie n by n matrix all 1 except when i == j-1 then -1)
order 3 square:
LPn=2,j = {2,1}
7 0 5
2 4 6
3 8 1
order 3 cube:
LPn=3,j = {1,0,0}
09 25 05
23 00 16
07 14 18
22 02 15
06 13 20
11 24 04
08 12 19
10 26 03
21 01 17
order 3 tesseract:
LPn=4,j = {0,2,2,2}
cube 0 26 36 58
30 79 11
64 05 51
28 77 15
71 00 49
21 43 56
66 07 47
19 41 60
35 72 13
cube 1 27 76 17
70 02 48
23 42 55
68 06 46
18 40 62
34 74 12
25 38 57
32 78 10
63 04 53
cube 2 67 08 45
20 39 61
33 73 14
24 37 59
31 80 09
65 03 52
29 75 16
69 01 50
22 44 54


further samples can be found troughout this website, at few places (see panmagic hypercubes) a bit differently formalised as those articles theorize on the possible values of parameters to result in hypercubes of given quality