A hard magic square puzzle
For a 3 x 3, there's only one distinct magic square; with a 4 x 4 there are 880 magic squares and for a 5th order-sized magic square, you can have 275,305,224 distinct magic squares.
Can you figure out a formula that can relate the number of members of a magic square with how many magic squares can exist for the third, fourth and fifth orders? That is:
9 1.................. third order level
16 880............. fourth order level
25 275,305,224.. fifth order level
where 9, 16 and 25 are the number of members for the third-, fourth- and fifth-order magic square respectively and 1, 880 and 275,305,224 are the number of distinct third-, fourth- and fifth-order magic squares respectively.