Diagonal magic cube

The class of diagonal magic cubes is the second of the six magic cube classes (when ranked by the number of lines summing correctly), coming after the simple magic cubes.

In a diagonal magic cube of order m, all 6m of the diagonals in the m planes parallel to the top, front, and sides of the cube must sum correctly. This means that the cube contains 3m simple magic squares of order m. Because the cube contains so many magic squares, it was considered for many years to be "perfect" (although other types of cubes were also sometimes called a "perfect magic cube").

It is now known that there are three higher classes of cubes.

The (proper) diagonal magic cube has a total of 3m2 + 6m + 4 correctly summing lines and 3m + 6 simple magic squares.

The new definition perfect magic cube has a total of 13m2 correct lines and 9m pandiagonal magic squares.