## 1. Squares

The image shows four figures composed of black and yellow squares. If we continue to draw figures in the same way, by how much will the number of all black and the number of all yellow squares differ in the first 29 figures in the sequence?
![](https://cdn.mathpix.com/cropped/2024_05_30_1fa462ef9f831ff2e2d1g-1.jpg?height=288&width=918&top_left_y=926&top_left_x=910)

Result: $\quad 841$
## Solution.

Let's examine how many black and yellow squares are in these figures:

| figure number | 1. | 2. | 3. | 4. |  | $n$ |  | 29. |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| number of black  squares | $1=1^{2}$ | $4=2^{2}$ | $9=3^{2}$ | $16=4^2$ | $\ldots$ | $n^{2}$ | $\ldots$ | $29^{2}$ |
| number of yellow  squares | $0=0^{2}$ | $1=1^{2}$ | $4=2^{2}$ | $9=3^{2}$ |  | $(n-1)^{2}$ |  | $28^{2}$ |

The total number of black squares in the first 29 figures is $1^{2}+2^{2}+3^{2}+\cdots+29^{2}$, and the total number of yellow squares is $1^{2}+2^{2}+3^{2}+\cdots+28^{2}$.

The difference between these two numbers is

$\left(1^{2}+2^{2}+3^{2}+\cdots+28^{2}+29^{2}\right)-\left(1^{2}+2^{2}+3^{2}+\cdots+28^{2}\right)=29^{2}=841$.