1. On the board, the numbers $1, 2, \ldots, 2009$ are written. Several of them are erased and instead, the remainder of the sum of the erased numbers when divided by 13 is written on the board. After a certain number of repetitions of this procedure, only three numbers remain on the board, two of which are 99 and 999. Determine the third number that remains on the board.
Solution. Let the third number be $x$. It is clear that at each step, the remainder of the sum of the numbers on the board when divided by 13 does not change.

Since

$$
1+2+3+\ldots+2009=\frac{2009 \cdot 2010}{2}=1005 \cdot 2009
$$

i.e., it has a remainder of 2 when divided by 13, we conclude that $99+999+x$ must have a remainder of 2 when divided by 13. Since $99+999=1098$, i.e., it gives a remainder of 6 when divided by 13, and 99 and 999 are not remainders, it follows that $0 \leq x < 13$ and we get that $x=9$.