[Math] Magic square solving

magic squarenumber theory

I'm trying to solve a 3×3 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

Best Answer

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} $$

Related Question