Why does the filling up of odd order magic square with numbers follow the knight movement?

I was reading about magic square, where I came up with the knight movement filling up of the magic square modulo the order of the square.

Why does the algo create magic squares? Why doesn't the algo work for even order squares.

Please enlighten. Thank you.

EDIT: fillip up of the magic square by knight movement- After placing the first number in any of the unit square of the magic square grid, the next number is to be placed two steps down and one step to the right of the previous number(just like movement of knight in chess), if in this process, the position of the number is going out of the grid, we have to take modulo n(order of the grid) and fill up the unit square at our desired location. If the desired location is already filled up, we have to place the number below the desired location.

I hope I could clarify my question now.

\begin{pmatrix} . & . & . & . & .\\ . & . & . & . & .\\ . & . & . & . & .\\ . & . & . & . & .\\ . & . & . & 1 & .\\ \end{pmatrix}

  • 2
    $\begingroup$ I think I can guess about what you mean but it would be good to show a $5 \times 5$ example $\endgroup$ – Ross Millikan Aug 12 '14 at 21:01
  • $\begingroup$ @Swadhin I added some space to fill in an example. Could you please demonstrate what you mean by giving the final output of your procedure? $\endgroup$ – Erick Wong Aug 13 '14 at 21:07

Most methods of creating magic squares of order $n$ express the numbers as $an+b$ If you subtract $1$ from all the entries, they range from $0$ to $n^2-1$. Each entry has a unique $a,b$ in the range $[0,n-1]$ Your method distributes the $a$'s and $b$'s uniformly among the columns. It doesn't work for even squares because $2$ divides the order and you don't get equal distribution. Then you have to worry about the diagonals. You have not described the method in sufficient detail to understand how they work.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.