A series of figures is shown in the picture below, each one of them created by following a secret rule. If the leftmost figure is considered the first figure, how many squares will the 21st figure have?

[img]http://www.artofproblemsolving.com/Forum/download/file.php?id=49934[/img]

Note: only the little squares are to be counted (i.e., the $2 \times 2$ squares, $3 \times 3$ squares, $\dots$ should not be counted)


Extra (not part of the original problem): How many squares will the 21st figure have, if we consider all $1 \times 1$ squares, all $2 \times 2$ squares, all $3 \times 3$ squares, and so on?.
1. **Identify the pattern in the sequence of figures:**
   - The problem states that each figure is created by following a secret rule. By examining the figures, we can observe that the number of small squares increases in a specific manner.
   - Let's denote the number of small squares in the \( n \)-th figure as \( S(n) \).

2. **Determine the formula for the number of small squares:**
   - By coloring the square pattern in a checkerboard fashion and rotating it by \( 45^\circ \), we can see that one color shades an \( n \times n \) square and another color shades an \( (n-1) \times (n-1) \) square.
   - Therefore, the total number of small squares in the \( n \)-th figure is given by:
     \[
     S(n) = n^2 + (n-1)^2
     \]

3. **Calculate the number of small squares in the 21st figure:**
   - Substitute \( n = 21 \) into the formula:
     \[
     S(21) = 21^2 + 20^2
     \]
   - Calculate \( 21^2 \) and \( 20^2 \):
     \[
     21^2 = 441
     \]
     \[
     20^2 = 400
     \]
   - Add the results:
     \[
     S(21) = 441 + 400 = 841
     \]

4. **Conclusion:**
   - The number of small squares in the 21st figure is \( \boxed{841} \).