A pandiagonal semiperfect magic cube is a semiperfect magic cube that remains semiperfect when any single orthogonal section is "restacked"
cyclically so that the ordering of any set of plane sections becomes ,,,
..., or (Benson and Jacoby 1981, p. 4).
There is no pandiagonal semiperfect magic cube of order 3 (Benson and Jacoby 1981, p. 14).
The order 4 and 5 magic cubes shown above are pandiagonal semiperfect magic cubes with magic constants 130 and 315, respectively
(Benson and Jacoby 1981, pp. 15-23 and 30).
The order-4 example is also compact: every adjacent block in a plane parallel
to a face, including blocks that wrap around the array,
sums to 130 (Duangmoon et al. 2022, p. 3). For example, the upper-left
block in the first layer has sum.