Problem 4. (20 points) A finite increasing sequence $a_{1}, a_{2}, \ldots, a_{n}$ ( $n \geq 3$ ) of natural numbers is given, and for all $k \leq n-2$, the equality $a_{k+2}=3 a_{k+1}-2 a_{k}-1$ holds. The sequence must contain a term $a_{k}=2021$. Determine the maximum number of three-digit numbers, divisible by 25, that this sequence can contain.
# Solution.

The final sequence can contain all three-digit numbers, as it can consist of a given number of natural numbers starting from the chosen number $a_{i}$.

We will prove that for any term of the arithmetic progression $1,2,3, \ldots$ defined by the formula for the $n$-th term $a_{n}=n$, the equality $a_{k+2}=3 a_{k+1}-2 a_{k}-1$ holds.

Indeed, for any value of $k$, the equalities

$a_{k}=k, a_{k+1}=k+1, a_{k+2}=k+2$ are valid, from which it follows that
$3 a_{k+1}-2 a_{k}-1=3(k+1)-2 k-1=k+2=a_{k+2}$, i.e., the equality $a_{k+2}=3 a_{k+1}-2 a_{k}-1$ holds, which is what we needed to prove.

For example, the sequence containing 2021: 3,4,5,6,..., 2018, 2019,2020,2021.

Thus, the sequence can contain all three-digit numbers from 100 to 999. Among them, the numbers divisible by $25: 100,125,150,175,200,225,250,275, \ldots, 900,925$, 950,975 - 4 in each of the nine hundreds, i.e., 36 numbers.

Answer. 36.