A magic square is one in which the sum of the numbers in each row, column, and both main diagonals is the same.
[a 3x3 magic square example][1]

There are 8 combinations of a 3x3 magic square.

If we fill a Rubik's Cube with no color and fill each side with a magic square, how many combinations can be filled on this Rubik's Cube?

What if we extend 3 to $n$?


  [1]: https://i.sstatic.net/BBLY6.png