A
magic square of order n is a square array of nē consecutive integer numbers (usually, but not neccessarily, from 1 to nē) arranged so the sum of the numbers in any horizontal, vertical, or
main diagonal line is always the same number, called the magic constant.
For which values of n are there magic squares of order n, with a magic constant of 2007?
The numbers 1 to n^2 sum to n^2(n^2 +1)/2 so each row sums to n(n^2 +1)/2. This is not equal to 2007 for any n but is negative for positive integers 15 or less so it may be possible to add a constant, a, to each number.
Each row must then sum to n^2(n^2 +1)/2 + na.
Setting this equal to 2007 yields integers solutions for a for only n={1,2,3,6,9}
I know there is no order 2 magic square and order 1 doesn't make much sense. So there are 3 solutions for n: {3,6,9}.
The corresponding values of a are {664, 316, 182}.

Posted by Jer
on 20070105 13:33:38 