a) In the figure below, João painted some faces of the smaller cubes of a $3 \times 3 \times 3$ cube gray. When he disassembled the larger cube into smaller cubes of size $1 \times 1 \times 1$, he noticed that one of them had three, another had two, and the third had only one face gray. If he had painted all the faces of the larger cube gray, how many $1 \times 1 \times 1$ cubes would have exactly one gray face? How many cubes would have exactly two gray faces?

b) If he had painted all the faces of a $5 \times 5 \times 5$ cube gray, and then divided it into $1 \times 1 \times 1$ cubes, how many of them would have exactly one gray face?

c) Still considering the $5 \times 5 \times 5$ cube, how many $1 \times 1 \times 1$ cubes would have no gray faces?
![](https://cdn.mathpix.com/cropped/2024_05_01_80f7f1185898b39e7876g-05.jpg?height=436&width=1170&top_left_y=2104&top_left_x=543)
Solution

a) Since only the cubes painted in the centers of the 6 faces would have exactly one gray face, the answer to the first question is 6. The small cubes with two gray faces are those that are on two faces of the larger cube but are not corners. There are 12 of these small cubes.

b) On each face, the central $3 \times 3$ square would contain the small cubes with only one gray face. Since there are 6 faces, the total is $9 \cdot 6=54$.

c) In the center of the $5 \times 5 \times 5$ cube, there is a $3 \times 3 \times 3$ cube where none of the faces of its small cubes are visible. Since only the visible small cubes received at least one gray face, the total number of unpainted small cubes is $3 \times 3 \times 3=27$.