# magic cube

A magic cube is similar to a magic square but has three
dimensions instead of two. It contains the integers from 1 to *n*^{3} and has 3*n*^{2} + 4 lines that sum correctly. All rows, columns,
pillars, and the four triagonals (three-dimensional diagonals) must sum
to the constant ½*n*(*n*^{3} + 1). A cross-section
through a magic cube is a magic square.