Polyhedral Cones of Magic Cubes and Squares
  Using computational algebraic geometry techniques and Hilbert bases of polyhedral cones we derive explicit formulas and generating functions for the number of magic squares and magic cubes. 
M. Ahmed, J. De Loera, R. Hemmecke