lozenge {magic} | R Documentation |
Conway's lozenge algorithm for magic squares
Description
Uses John Conway's lozenge algorithm to produce magic squares of odd order.
Usage
lozenge(m)
Arguments
m |
magic square returned is of order |
Author(s)
Robin Hankin
See Also
Examples
lozenge(4)
all(sapply(1:10,function(n){is.magic(lozenge(n))}))
[Package magic version 1.6-1 Index]