We consider the intersection points of the boundary and selection lines of the chessboard as network points. Determine for each network point how many squares there are for which the selected point is a vertex, and the other three vertices are also network points.
Place the chessboard $ABCD=S$ composed of unit squares in the Cartesian coordinate system such that the vertices $A, B, C$ are at the origin, $(8; 0)$, and $(8; 8)$ respectively (Figure 1). Thus, the grid points are the integer-coordinate lattice points in the plane for which

$$
0 \leq x \leq 8, \quad \text{and} \quad 0 \leq y \leq 8
$$

The squares that meet this requirement are called grid squares.

![](https://cdn.mathpix.com/cropped/2024_05_02_7f21e27ee1fb66a4460bg-1.jpg?height=742&width=656&top_left_y=461&top_left_x=667)

Figure 2

It is sufficient to answer the question for the grid point that lies within the triangle $T$ or on its boundary, whose vertices are the origin, $(4; 0)$, and $K(4; 4)$. Indeed, by rotating $T$ three times by $90^{\circ}$ around $K$, and then reflecting the resulting four triangles over the diagonal $AC$, the images cover the square $S$ without gaps. Every grid point in $S$ corresponds to a grid point in $T$, or its rotated image, or its rotated and reflected image. The listed symmetries map every grid square to a grid square, so every grid point appears as a vertex in the same number of grid squares as the corresponding grid point in $T$.

Let $E(a, b)$ be a grid point in $T$, i.e.,

$$
0 \leq b \leq a \leq 4
$$

and let $EFGH$ be a grid square (vertices labeled counterclockwise), with the coordinates of $F$ being $(a+u, b+v)$, where $u=0$ and $v=0$ do not hold simultaneously.

$H$ is obtained by rotating $F$ $90^{\circ}$ counterclockwise around $E$. The points in the plane that can be mapped to a grid point in $S$ by the described method lie within the square $S_1$ or on its boundary, which is obtained by rotating $S$ $90^{\circ}$ clockwise around $E$. Therefore, $F$ can only be in the intersection of $S$ and $S_1$ or on its boundary.

$E$ is at distances $b, 8-a, 8-b, a$ from the consecutive sides of $S$, respectively. Therefore, the equation of the side $A_1B_1$ of the square $S_1$ is $x=a-b$ (parallel to $AD$), the side $B_1C_1$ is $y=b-(8-a)$, the side $C_1D_1$ is $x=a+8-b$, and the side $D_1A_1$ is $y=b+a$. The intersection of $S$ and $S_1$ is the rectangle $U$. Its base is a segment of $AB$, because the lower side $B_1C_1$ of $S_1$ is deeper or coincides with $AB$, since (2) implies $b-8+a \leq 0$. Similarly, its right side is a segment of $BC$ (the line $x=8$), its top side is $D_1A_1$, and its left side is $A_1B_1$. The number of grid points on a side is one more than the length of the side in units, so the number of grid points in $U$ that can be $F$ is

$$
(9-a+b)(a+b+1)-1=-a^{2}+b^{2}+8a+10b+8
$$

(we subtract 1 because $F \neq E$).

$G$ is obtained by rotating the ray $EF$ $45^{\circ}$ counterclockwise around $E$ and measuring the segment $EG=\sqrt{2} \cdot EF$. In this way, the grid points of $S$ can only come from points in the square $S_2$ obtained by a $1 : \sqrt{2}$ homothety centered at $E$ and a $45^{\circ}$ rotation. However, not every lattice point in $S_2$ maps to a grid point. Therefore, $EFGH$ is a grid square if and only if $F$ is a grid point in the intersection of $U$ and $S_2$ or on its boundary, and we solve the problem by subtracting from (3) the number of grid points not in $S_2$.

$S_2$ can also be obtained from $S_1$ by a $1 / \sqrt{2}$ homothety centered at $E$ and a $45^{\circ}$ counterclockwise rotation. It is easy to see that the center $K_2$ of $S_2$ bisects the segment $KK_1$, where $K_1$ is the center of $S_1$. The midpoint of $U$ also coincides with this, so the diagonals of $S_2$ coincide with the symmetry axes of $U$, and $S_2$ cuts out four congruent isosceles triangles from $U$. Therefore, it is sufficient to determine the number of grid points in the triangle cut off by the line $A_2B_2$ and on its boundary that do not belong to $S_2$.

The rotation that produces $S_2$ transforms the side of a unit square into half the diagonal of the square. Thus, $A_2B_2$ is at a distance of $b$ half-diagonals from $E$, bisecting the segment $EL$, where $L$ is the vertex of $U$ at the intersection of the lines $AB$ and $A_1B_1$. Therefore, the legs of the cut-off triangle have length $b$. Thus, there are $b$ grid points on the side of $AB$ that do not belong to $S_2$ (the intersection point already belongs to it), and moving upwards on the consecutive parallel grid lines, there are 1 fewer each time, so the total number of grid points in the four triangles is

$$
4[b+(b-1)+\ldots+2+1]=2b(b+1)
$$

Subtracting this from (3) gives the number of grid points that can be $F$, and thus the number of grid squares containing the vertex $E$ is

$$
-a^{2}-b^{2}+8a+8=8+a(8-a)+(8-b)
$$

From this, we get the numbers for all grid points in $T$ as shown in Figure 2.

![](https://cdn.mathpix.com/cropped/2024_05_02_7f21e27ee1fb66a4460bg-2.jpg?height=653&width=712&top_left_y=817&top_left_x=693)

Based on the work of András Huhn (Szeged, Ságvári E. gym. g. III.o. t.), with simplifications.

Note. Summing the number of grid squares over all grid points on the chessboard, we should get four times the total number of grid squares, which, according to the result of Exercise 846, is 540. It is easily verifiable that this is indeed the case. - The number of grid squares with a vertex at $K$ is 40, which we also obtained in Exercise 846.[^0]

[^0]:    ${ }^{1}$ K. M. L. 28 (1964) 74.