On the existence of magic squares of every order different from $2$

I was reading about magic squares and suppose that we speak here only of the magic squares that have in itself numbers from $1$ to $n^2$.

It is easy to see that we cannot have $2$x$2$ magic square because we cannot arrange numbers $1,2,3,4$ in such a square so that the sum of numbers in every row, column and diagonals is the same number.

But the natural questions that comes is:

Is it true (if it is proven, can someone point me to some references?) that for every $n \in \mathbb N \setminus \{2\}$ there exists at least one $n$x$n$ magic square?

• Yes. There are algorithms given here, for example. – rogerl Feb 9 '16 at 1:49
• @rogerl Thank you. Do you know does there exists any unifying proof which deals with all cases at once? – Farewell Feb 9 '16 at 1:54
• It's not hard to see, just by setting up $2n+2$ homogeneous equations in $n^2$ unknowns, that there is a magic square with common sum $0$ if $n>2$. Adding a constant to each square then produces a magic square with a nonzero sum. It is not obvious (to me), however, that the elements can be chosen so that the entries are $1$ through $n^2$. – rogerl Feb 9 '16 at 2:06
• @rogerl: That looks like a very weak argument to me! You seem to consider the zero matrix as a magic square.Or perhaps I have misunderstood? – TonyK Apr 14 '16 at 0:02

Wikipedia gives a technique for constructing examples. For odd order, the elements from $kn+1$ to $(k+1)n$ are written on a (broken) diagonal so that each row and column contain one of each residue $\bmod n$ and one of each block $[1,n], [n+1,2n], \dots [n^2-n+1,n^2]$. The ones that are a multiple of $4$ are constructed by reflecting some of the numbers through the center. Those of the form $4n+2$ are formed from a square of size $2n+1$