B3. A large rectangle is divided into small rectangles that are twice as high as they are wide. The rectangle is 10 such small rectangles wide, as shown in the figure below. In this figure, you can recognize a number of squares of different sizes.

How many small rectangles tall must the figure be to ensure that there are exactly 345 squares to be found?

![](https://cdn.mathpix.com/cropped/2024_04_17_88f9acd303931df7c94dg-1.jpg?height=414&width=528&top_left_y=2283&top_left_x=1324)
B3. 15 We are looking at a figure that is $n \geqslant 5$ rectangles high, and we are going to count the squares. Because the small rectangles are 2 units high, only squares with even side lengths can occur. The smallest squares that can occur are $2 \times 2$ squares. We see that there are 9 such squares in each row. In total, there are thus $9 n$ such squares in the figure.

The next smallest squares that can occur are $4 \times 4$ squares. Such a square lies in two adjacent rows. These can be rows 1 and 2, rows 2 and 3, and so on, up to rows $n-1$ and $n$. That's $n-1$ possibilities for the rows. If we now look at how the squares can lie over four adjacent columns, we see that there are 7 possibilities. One way to see this is by looking at the leftmost column of such a set of four adjacent columns. The possibilities for the leftmost column are 1 through 7 (if you start from column 8, you end up outside the figure). In total, there are thus $7(n-1)$ squares with side length 4 in the figure.

In the same way, we can count the $6 \times 6$ squares; there are $5(n-2)$ in total. There are $3(n-3)$ squares with side length 8, and $1(n-4)$ squares with side length 10 in the figure. Larger squares cannot occur in the figure. In total, there are thus

$$
9 n+7(n-1)+5(n-2)+3(n-3)+(n-4)=25 n-30
$$

squares in the figure. If we now solve the equation $345=25 n-30$, we find the solution $n=\frac{375}{25}=15$.

At the beginning, we assumed that $n \geqslant 5$. We made this assumption because otherwise, there would be no $10 \times 10$ squares in the figure, and the formulas above might not hold. In the case that $n<5$, there are of course fewer squares in the figure than in the case $n \geqslant 5$. From this, it follows that $n=15$ must be the only solution.