A simple magic cube is an n×n×n array of distinct positive integers (n > 1) such that the sums of the entries in any row parallel to an edge of the array (there are 3n2 of these rows) and the sums along the four space diagonals are all equal. A perfect magic cube is a simple magic cube such that the sums along the diagonals parallel to a face diagonal (there are 6n of these diagonals) are also equal to the other sums.
Try to find cubes whose largest entry is as small as possible.