B1. On a sheet of paper, there is a grid of 101 by 101 white squares. A snake is formed by coloring squares gray as shown in the accompanying figure. The snake starts at the top left and continues until it can no longer proceed. Only a part of the grid is depicted. How many squares are grayed out in total in the complete 101 by 101 grid?
B1. On a sheet of paper, there is a grid of 101 by 101 white squares. A snake is formed by coloring squares gray as shown in the accompanying figure. The snake starts at the top left and continues until it can no longer proceed. Only a part of the grid is depicted. How many squares are gray in total in the complete 101 by 101 grid? 5201

Solution We can think of the figure of $101^{2}$ squares as being built up as follows. First, one square at the top left, then two L-shaped pieces, one of three squares (with one gray square) and one of five

![](https://cdn.mathpix.com/cropped/2024_04_17_cb8708f0b7aaf218de84g-2.jpg?height=285&width=277&top_left_y=473&top_left_x=1683)
squares (all five gray) around it. Then again two L-shaped pieces, one of seven squares (one of which is gray) and one of nine squares (all nine gray), and so on. The last two L-shaped pieces consist of the first one with 199 squares (one of which is gray) and the second one with 201 squares (all gray). In total, we look at 50 pairs of L-shaped pieces. The number of gray squares we count is $1+(1+5)+(1+9)+(1+13)+\ldots+(1+201)=1+(6+10+14+\ldots+202)=1+\frac{1}{2} \cdot 50 \cdot(6+202)=5201$. Alternative solution For every two of these L-shaped pieces, there are 4 more gray squares than white squares. There are thus $50 \cdot 4=200$ more gray squares than white squares out of the $101^{2}-1=10200$ squares in the 100 L-shaped pieces in total, so that involves 5000 white and 5200 gray squares. With the top left square included, there are thus a total of 5201 gray squares.