Returns magic hypercubes of order 4n and any dimension.
magichypercube.4n(m, d = 3)
Magic hypercube produced of order n=4m
Dimensionality of cube
Uses a rather kludgy (but vectorized) method. I am not 100% sure that the method does in fact produce magic squares for all orders and dimensions.
Robin K. S. Hankin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.