
C3 The nonnegative integer $n$ and $(2 n+1) \times(2 n+1)$ chessboard with squares colored alternatively black and white are given. For every natural number $m$ with $1<m<2 n+1$, an $m \times m$ square of the given chessboard that has more than half of its area colored in black, is called a $B$-square. If the given chessboard is a $B$-square, find in terms of $n$ the total number of $B$-squares of this chessboard.


## Solution

Every square with even side length will have an equal number of black and white $1 \times 1$ squares, so it isn't a $B$-square. In a square with odd side length, there is one more $1 \times 1$ black square than white squares, if it has black corner squares. So, a square with odd side length is a $B$-square either if it is a $1 \times 1$ black square or it has black corners.

Let the given $(2 n+1) \times(2 n+1)$ chessboard be a $B$-square and denote by $b_{i}(i=$ $1,2, \ldots, n+1)$ the lines of the chessboard, which have $n+1$ black $1 \times 1$ squares, by $w_{i}(i=1,2, \ldots, n)$ the lines of the chessboard, which have $n$ black $1 \times 1$ squares and by $T_{m}(m=1,3,5, \ldots, 2 n-1,2 n+1)$ the total number of $B$-squares of dimension $m \times m$ of the given chessboard.

For $T_{1}$ we obtain $T_{1}=(n+1)(n+1)+n \cdot n=(n+1)^{2}+n^{2}$.

For computing $T_{3}$ we observe that there are $n 3 \times 3 B$-squares, which have the black corners on each pair of lines $\left(b_{i}, b_{i+1}\right)$ for $i=1,2, \ldots, n$ and there are $n-13 \times 3 B$-squares, which have the black corners on each pair of lines $\left(w_{i}, w_{i+1}\right)$ for $i=1,2, \ldots, n-1$. So, we have

$$
T_{3}=n \cdot n+(n-1)(n-1)=n^{2}+(n-1)^{2} \text {. }
$$

By using similar arguments for each pair of lines $\left(b_{i}, b_{i+2}\right)$ for $i=1,2, \ldots, n-1$ and for each pair of lines $\left(w_{i}, w_{i+2}\right)$ for $i=1,2, \ldots, n-2$ we compute

$$
T_{5}=(n-1)(n-1)+(n-2)(n-2)=(n-1)^{2}+(n-2)^{2}
$$

Step by step, we obtain

$$
\begin{gathered}
T_{7}=(n-2)(n-2)+(n-3)(n-3)=(n-2)^{2}+(n-3)^{2} \\
\ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \\
T_{2 n-1}=2 \cdot 2+1 \cdot 1=2^{2}+1^{2} \\
T_{2 n+1}=1 \cdot 1=1^{2}
\end{gathered}
$$

The total number of $B$-squares of the given chessboard equals to

$$
\begin{gathered}
T_{1}+T_{3}+T_{5}+\ldots+T_{2 n+1}=2\left(1^{2}+2^{2}+\ldots+n^{2}\right)+(n+1)^{2}= \\
\frac{n(n+1)(2 n+1)}{3}+(n+1)^{2}=\frac{(n+1)\left(2 n^{2}+4 n+3\right)}{3}
\end{gathered}
$$

The problem is solved.

### 2.3 Geometry
