prime composite order perfect hypercubes  

Magic rectangle R_{p,q} 
a p by q rectangle with number 0 .. pq1 with horizontal and vertical sums 
S = _{j=0}∑^{pq} i = m (m  1) / 2 S_{q} = S / p = q (pq  1) / 2 S_{p} = S / q = p (pq  1) / 2 

Note when p an q are relatively prime the diagonal form a single line holding all the numbers, this forms the permutation we need In case p = q we need only "rectangles" summing in one direction these "rowmagic" squares is quite a novelty, to find a permutaton just restart in the starting row. 

double condition permutation P_{p,q} 
a permutation satisfying two simultaneous conditions 
_{k=0}∑^{p1} P_{p,q}[kq + j] = S_{q} ; j = 0 .. q1 _{k=0}∑^{q1} P_{p,q}[kp + j] = S_{p} ; j = 0 .. p1 

The diagonals of a magic rectangle satisfy this  
perfect hypercubes (experimental fact)  
LP({((r+l==n) ? m2^{r} : 2^{r}) ; r,l = 0..n1 ; m2^{r} > 2^{r}}=P_{p,q}) (same but 2^{n1} replaced by (m1)/2) 

note the formula expands to LP({1,2},{1,m2}) LP({1,2,4},{1,2,m4},{1,m2,4}) LP({1,2,4,8},{1,2,4,m8},{1,2,m4,8},{1,m2,4,8}) not the only possibility but the sequence I checked, I also checked the (m1)/2 series 

Counting arguments (preliminairy notes) 
preliminairy notes on counting arguments 
ROWMAGIC SQUARES: in a {rowmagic} square each row number can be freely positioned so p!^{p} versions also the rows can freely be permuted this gives p!^{p+1} variations given a permutation for the squared order hypercubes. (p=3 > 1296 = 2592/2) NOTE a full iteration I found 2592 permutations, so there might be only 2 {rowmagic} order 3 squaress given this degrees of freedom (need to verify) N = N_{p,p} p!^{p+1} RECTANGLES: A (semi) magic rectangle can freely permute it rows and columns so every permutation represents p! * q! variations. N = N_{p,q} p! q! PARAMETERS: Curently I'm without a theory to which or why parameters work with these digit changing permutation, they change the "ragonal offending" parameters into summing lines in the r agonal directions in some manner which currently isn't quite clear. Currently I haven't seen a nonperfect hypercube given the above mentioned parameter sequences FURTHER FACTORS: The various components can freely permute its role giving a factor of n! each components can independently be digit changed: factor (^{N}_{n}) Notice these preliminairy factors multiply in a lot of {perfect} hypercubes, a lot needs to be verified to avoid double counting, a "parameter theory" is yet to be found 

IMPLICATION: The layers of an order p hypercube can be juxtaposed into a p by p^{n1} rectangle the diagonal of which can be used to form a {perfect} order p^{n} hypercube of dimension N (provided p^{n} > 2^{N}) Notice that each square can be positioned in every 8 aspectial variants so there are quite a large number of permutations obtainable give an order p hypercube, also unclear yet whether different hypercubes can generate the same set of permutation (this is probably the case, so it'll be hard to obtain exact counting arguments). And of course the order p hypercube can be placed in any aspectial variant, things need however to be verified against the above noticed degrees of freedom. 

INVESTIGATION: A quick peak at various parameters suggest that the series LP({1,a},{1,b})=[perm] generate ok numberranges when the difference ab is no multiple of either p nor q NOTE suggested by squares of orders 9, 15 and 25, and need further investigation. 
example  

order 3 square 1 6 5 8 4 0 3 2 7 
aligned 0 4 8 6 1 5 3 7 2 
aligned 0 5 7 8 1 3 4 6 2 
0 1 2 4 5 3 8 6 7  0 1 2 5 3 4 7 8 6  
LP({1,2},{1,7})=[0,1,2,4,5,3,8,6,7] 00 10 20 40 50 30 80 60 70 24 43 45 28 74 58 68 03 17 48 35 78 61 63 01 11 22 41 76 59 66 08 15 25 36 46 29 64 02 13 23 39 53 33 79 54 16 18 37 47 31 77 57 71 06 44 51 34 72 55 65 04 14 21 32 75 62 69 07 09 19 38 49 56 67 05 12 26 42 52 27 73 
LP({1,2},{1,7})=[0,1,2,5,3,4,7,8,6] 00 10 20 50 30 40 70 80 60 26 51 27 37 65 77 57 04 16 31 43 71 78 54 01 11 23 48 68 75 58 07 17 24 45 28 38 55 02 14 21 49 34 44 69 72 15 18 46 29 41 66 76 61 08 52 35 42 63 73 56 05 12 22 39 67 79 62 06 09 19 47 32 74 59 03 13 25 53 33 36 64 