Shapovalov A.V.

For what largest $n$ can one choose $n$ points on the surface of a cube so that not all of them lie in the same face of the cube and are vertices of a regular (planar) $n$-gon.
On one face of a cube, no more than two vertices of a polygon can lie (otherwise, the entire polygon would lie in this face). Therefore, the polygon cannot have more than 12 vertices.

To obtain a 12-sided polygon, recall that there exists a section of the cube by a plane that forms a regular hexagon. This section passes through the midpoints of six edges of the cube (see the left figure).

Indeed, the "large" diagonals of the section—segments connecting the midpoints of opposite edges of the cube—obviously pass through the center of the cube and, therefore, lie in the same plane. The regularity of the hexagon follows from the symmetry of the picture.

By taking two points on each side of the regular hexagon that divide it in the ratio $1: \sqrt{3}: 1$, we, as it is easy to verify, obtain the vertices of a regular 12-sided polygon (see the right figure).
![](https://cdn.mathpix.com/cropped/2024_05_06_8c5c78c6462ff090b828g-17.jpg?height=482&width=1168&top_left_y=1348&top_left_x=456)

Answer

$n=12$.