This is a simple script meant to be run on the terminal on which the Magic Cube is constructed for n numbers per side.
The magic is not only in the cube, but also in the ability for the user to select n! All you have to do is select a natural number.
Enjoy!
The implemented algorithm was followed by the paper [1], without concerning the case where (n-2)%4 = 0.
[1] Trenkler, Marián & Marian,. (2000). A Conctruction of Magic Cubes. The Mathematical Gazette. 84. 36-41. 10.2307/3621472.