Enumerating the magic cubes
Public  08/11/17  8xp  Programming  72.7% 
A magic cube is the 3D equivalent of a magic square.
Here is an exemple of a $3 \times 3 \times 3$ magic cube with all integers from 1 to 27:
 The sum of all rows and columns in the 3 directions are equals
$4+26+12=42$
$4+18+20=42$
$4+17+21=42$
 The sum of the 4 main diagonals are equals
$4+14+24=42$
$21+14+7=42$
$16+14+12=42$
$20+14+8=42$
How many $3 \times 3 \times 3$ magic cubes with integers in $\{ 1, \dots , 27 \}$ are there ?
Answer format: (Count) (colon) (comma separated list of values for the cube of rank 123).
Example : 999:4,17,21,18,19,5,20,6,16,26,3,13,1,14,27,15,25,2,12,22,8,23,9,10,7,11,24
(Corresponds to the cube in the above picture)
[My timing: 2 min]
PS:
We ignore symmetries : facing the 6 faces of this example, we get 6 distinct solutions.
To rank the cubes, represent them as a 27 elements vectors (as in the above example), then sort the vectors in lexicographic order.
Here is an exemple of a $3 \times 3 \times 3$ magic cube with all integers from 1 to 27:
 The sum of all rows and columns in the 3 directions are equals
$4+26+12=42$
$4+18+20=42$
$4+17+21=42$
 The sum of the 4 main diagonals are equals
$4+14+24=42$
$21+14+7=42$
$16+14+12=42$
$20+14+8=42$
How many $3 \times 3 \times 3$ magic cubes with integers in $\{ 1, \dots , 27 \}$ are there ?
Answer format: (Count) (colon) (comma separated list of values for the cube of rank 123).
Example : 999:4,17,21,18,19,5,20,6,16,26,3,13,1,14,27,15,25,2,12,22,8,23,9,10,7,11,24
(Corresponds to the cube in the above picture)
[My timing: 2 min]
PS:
We ignore symmetries : facing the 6 faces of this example, we get 6 distinct solutions.
To rank the cubes, represent them as a 27 elements vectors (as in the above example), then sort the vectors in lexicographic order.
Fresh Problems

Polygons ratio 1d:19h
solved by 7 
Best Matrices Multiplication 1w:1d
solved by 9 
Equations 1w:5d
solved by 10 
First semiprime 2w:1d
solved by 10 
Triangles ratio 2w:6d
solved by 12