The key to construct an ultra magic (= symmetric and panmagic) 7x7 square is: 0 - 6 - 1 - 2 - 3 - 4 - 5
1x number from shift 2 to the right +7x number from reflection 1st grid+1 = 7x7 ultra magic square
0 | 6 | 1 | 2 | 3 | 4 | 5 | 0 | 4 | 2 | 6 | 5 | 3 | 1 | 1 | 35 | 16 | 45 | 39 | 26 | 13 | ||
4 | 5 | 0 | 6 | 1 | 2 | 3 | 6 | 5 | 3 | 1 | 0 | 4 | 2 | 47 | 41 | 22 | 14 | 2 | 31 | 18 | ||
2 | 3 | 4 | 5 | 0 | 6 | 1 | 1 | 0 | 4 | 2 | 6 | 5 | 3 | 10 | 4 | 33 | 20 | 43 | 42 | 23 | ||
6 | 1 | 2 | 3 | 4 | 5 | 0 | 2 | 6 | 5 | 3 | 1 | 0 | 4 | 21 | 44 | 38 | 25 | 12 | 6 | 29 | ||
5 | 0 | 6 | 1 | 2 | 3 | 4 | 3 | 1 | 0 | 4 | 2 | 6 | 5 | 27 | 8 | 7 | 30 | 17 | 46 | 40 | ||
3 | 4 | 5 | 0 | 6 | 1 | 2 | 4 | 2 | 6 | 5 | 3 | 1 | 0 | 32 | 19 | 48 | 36 | 28 | 9 | 3 | ||
1 | 2 | 3 | 4 | 5 | 0 | 6 | 5 | 3 | 1 | 0 | 4 | 2 | 6 | 37 | 24 | 11 | 5 | 34 | 15 | 49 |
You can use this method to construct ultra magic squares of order is prime number from 5x5 to infinity. See 5x5, 7x7, 11x11, 13x13, 17x17, 19x19, 23x23, 29x29, 31x31