Magic squares of order 4n+2
magic.4np2.Rd
Produces a magic square of order \(4n+2\) using Conway's “LUX” method
Examples
magic.4np2(1)
#> [,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
is.magic(magic.4np2(3))
#> [1] TRUE