A cube of side n painted on all faces and cut into unit cubes produces cubes with three, two, one or no painted faces.
1Painted cube formulas (side n)
Total small cubes = n³
Three faces painted (corners) = 8
Two faces painted (edges) = 12(n − 2)
One face painted (face centres) = 6(n − 2)²
No face painted (core) = (n − 2)³
Example
n = 4: 8 + 24 + 24 + 8 = 64 = 4³.