Magic square solving

1.3k Views Asked by At

I'm trying to solve a 3x3 magic square for 99 which starts at 29. I got the rows, columns and one diagonal but the other diagonal is (way) off.

Is there even a magic square which satisfies both diagonals for these parameters? As you can see I've been playing around in a spreadsheet, moving numbers around. But is there a quicker way to spot if a magic square for a number starting at an arbitrary number is possible?

enter image description here

enter image description here

3

There are 3 best solutions below

0
On BEST ANSWER

One magic square that works is

$$ \begin{matrix} 32&31&36\\37&33&29\\30&35&34 \end{matrix} $$

It might interest you that one of Ramanujan's first hobbies was trying to understand magic squares, and they appear in his first notebook often.

1
On

Construction

I always construct it in following manner and it works, I don't know whether there is alternative way to do this or what's proof of correctness of my construction.

$a_1$ is starting number

$$ \begin{matrix} a_8 & a_1 & a_6 \\ a_3 & a_5 & a_7 \\ a_4 & a_9 & a_2 \\ \end{matrix} $$

0
On

This is an odd*odd magic square. The arrangement would be as such:-

36 29 34
31 33 35
32 37 30

Start at the centre of the first row with the smallest digit. Go one row above and shift to one position right. If the position is already occupied place the digit below the first digit.(35 is placed below 34 as 32 occupies the required position.Similarly 32 is placed below 31 for the same reason.)