4. Let $n$ be a natural number. A regular hexagon with side length $n$ is divided by lines, which are parallel to its sides, into equilateral triangles whose sides are of length 1. Determine the total number of regular hexagons whose vertices are also vertices of those equilateral triangles.

(Great Britain)
4. Let $P$ be a given hexagon. The vertices of the considered equilateral triangles are called nodes. For each hexagon $Q$ with vertices at the nodes, consider the hexagon $\bar{Q}$ circumscribed around $Q$ with sides parallel to the sides of $P$. The vertices of $\bar{Q}$ are also nodes.

For $0 \leqslant m<n$, a hexagon $\bar{Q}$ with side length $n-m$ can be chosen in $3 m^{2}+3 m+1=$

![](https://cdn.mathpix.com/cropped/2024_06_04_3e0539f4777f4d9d859dg-2.jpg?height=334&width=391&top_left_y=1792&top_left_x=1255)
$(m+1)^{3}-m^{3}$ ways. For a given hexagon $\bar{Q}$, the hexagon $Q$ can be chosen in $n-m$ ways. It follows that the total number of possible hexagons $Q$ is

$$
\begin{aligned}
\sum_{m=0}^{n-1}(n-m)\left((m+1)^{3}-m^{3}\right) & =\sum_{m=0}^{n-1}(n-m)(m+1)^{3}-\sum_{m=0}^{n-1}(n-m) m^{3} \\
& =\sum_{m=1}^{n}(n-m+1) m^{3}-\sum_{m=0}^{n-1}(n-m) m^{3}=\sum_{m=1}^{n} m^{3}=\frac{n^{2}(n+1)^{2}}{4}
\end{aligned}
$$