The centers of the faces of a certain cube are the vertices of a regular octahedron. The feet of the altitudes of this octahedron are the vertices of another cube, and so on to infinity. What is the sum of the volumes of all the cubes, if the edge of the first cube is $a$?
Let the midpoint of one edge of the octahedron be denoted by $M$, and connect this point to the vertices $A$ and $B$ of the opposite faces of the edge. $A M$ and $B M$ are the heights of two faces of the octahedron, and $C$ and $D$ are the feet of these heights, such that $C M=\frac{1}{2} A C$ and $D M=\frac{1}{2} B D$. Thus, $C D$ is one edge of the second cube. Since $\Delta A M B \sim \Delta C M D$, we have

$$
C D: A B = M D: M B = 1: 3
$$

which implies

$$
C D = \frac{A B}{3}
$$

But $A B$ connects the centers of opposite faces of the cube and is therefore equal to the length $a$ of one edge of the cube. Hence,

$$
C D = a_{1} = \frac{a}{3}
$$

Similarly,

$$
\begin{aligned}
& a_{2} = \frac{a_{1}}{3} = \frac{a}{9} \\
& a_{3} = \frac{a}{27} \text{, and so on.}
\end{aligned}
$$

The sum of the volumes of the cubes is therefore

$$
S = a^{3} + \frac{a^{3}}{3^{3}} + \frac{a^{3}}{3^{6}} + \ldots = \frac{a^{3}}{1 - \frac{1}{3^{3}}} = \frac{27}{26} a^{3}
$$