5. The edge length of a wooden cube is a natural number greater than 2. We paint the cube and then cut it into unit cubes. The number of unit cubes that have exactly two painted faces is a divisor of the number of unit cubes that have no painted faces. Determine the smallest natural number that can be the edge length of the original cube.

## 51st Mathematical Competition for High School Students in Slovenia

Optional Competition, April 4, 2007

## Problems for 2nd Year Students
I/5. Cubes that have exactly two faces painted are located along the edges, but not at the corners of the original cube. Along each edge, there are $a-2$ of them. There are 12 edges in total, so there are $12 \cdot (a-2)$ of them.

Let's count the unit cubes that have no faces painted. In the original cube, these are located in the interior, forming a cube with an edge length of $a-2$. There are $(a-2)^{3}$ of them.

Since the number $12 \cdot (a-2)$ divides $(a-2)^{3}$, it follows that $12 = 2^{2} \cdot 3$ divides $(a-2)^{2}$. Therefore, 6 divides $a-2$. The smallest number for which this is true is $6 = a-2$, which is $a=8$.

Counting the cubes with two painted faces .................................... 1 point

![](https://cdn.mathpix.com/cropped/2024_06_07_a8720c28cfa2c07912d2g-08.jpg?height=49&width=1631&top_left_y=638&top_left_x=224)

![](https://cdn.mathpix.com/cropped/2024_06_07_a8720c28cfa2c07912d2g-08.jpg?height=54&width=1631&top_left_y=681&top_left_x=218)

![](https://cdn.mathpix.com/cropped/2024_06_07_a8720c28cfa2c07912d2g-08.jpg?height=57&width=1633&top_left_y=731&top_left_x=220)

Conclusion $a=8$.................................................................................................