Magic Matrices

*To*: mathgroup at smc.vnet.net*Subject*: [mg32507] Magic Matrices*From*: "Flip Flippy" <flip at safebunch.com>*Date*: Thu, 24 Jan 2002 05:21:01 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

Hi All, does anyone know of code for Mathematica to produce magic matrices? For example Magic[n] would produce an nxn matrix where all of the row, column and diagonal sums are equal. As an example: Magic[3] would produce as output: {{8,1,6},{3,5,7},{4,9,2}}. Thank you for any inputs, Flip -- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG