Counting hexagons
Problem 577
An equilateral triangle with integer side length is divided into equilateral triangles with side length 1 as shown in the diagram below.
The vertices of these triangles constitute a triangular lattice with lattice points.
The vertices of these triangles constitute a triangular lattice with lattice points.
Let be the number of all regular hexagons that can be found by connecting 6 of these points.

For example, , and .
Find .