I was looking at the wikipedia page for the "Magic Square":
and it gave this equation to generate the numbers for a given square:
n((i+j-1+(n/2)) mod n) + ((i+2j-2) mod n)+1 , where i and j are rows and columns
But it doesn't seem to generate the correct numbers for me. For example for a n=3 (3x3) magic square the first element should be 8, but if I put i=1, j=1, n=3 into equation I get 9.5.
What's the deal?