magic (version 1.6-1)

magichypercube.4n: Magic hypercubes of order 4n

Description

Returns magic hypercubes of order 4n and any dimension.

Usage

magichypercube.4n(m, d = 3)

Arguments

m

Magic hypercube produced of order \(n=4m\)

d

Dimensionality of cube

Author

Robin K. S. Hankin

Details

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.

Examples

Run this code
magichypercube.4n(1,d=4)
magichypercube.4n(2,d=3)

Run the code above in your browser using DataLab