magic.4np2: Magic squares of order 4n+2

Description Usage Arguments Note Author(s) References See Also Examples

Description

Produces a magic square of order 4n+2 using Conway's “LUX” method

Usage

1

Arguments

m

returns a magic square of order n=4m+2 for m>=1, using Conway's “LUX” construction

Note

I am not entirely happy with the method used: it's too complicated

Author(s)

Robin K. S. Hankin

References

http://mathworld.wolfram.com/MagicSquare.html

See Also

magic

Examples

1
2

Example output

Loading required package: abind
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]   32   29    4    1   24   21
[2,]   30   31    2    3   22   23
[3,]   12    9   17   20   28   25
[4,]   10   11   18   19   26   27
[5,]   13   16   36   33    5    8
[6,]   14   15   34   35    6    7
[1] TRUE

magic documentation built on May 2, 2019, 12:21 p.m.