Magic Square

Generate a magic square of any size where every row, column and diagonal adds up to the same number — using the odd, singly-even and doubly-even construction methods. Pure math, offline.

Magic constant: 65

17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9