The sequence $\mathrm{Az}\left(a_{i}\right)$ is defined as follows: $a_{1}=0, a_{2}=2, a_{3}=3, a_{n}=\max _{1<d<n}\left\{a_{d} \cdot a_{n-d}\right\}(n=4,5,6, \ldots)$. Determine the value of $a_{1998}$.
Based on the definition, let's calculate a few more values:

$a_{4}=\max \{2 \cdot 2\}=4, a_{5}=\max \{2 \cdot 3,3 \cdot 2\}=6, a_{6}=\max \{2 \cdot 4,3 \cdot 3,4 \cdot 2\}=9, a_{7}=\max \{2 \cdot 6,3 \cdot 4,4 \cdot 3,6 \cdot 2\}=12, a_{8}=\max \{$

... and so on. These results suggest that for $n>1$, $a_{n+3}=3 \cdot a_{n}$ holds. 

We prove this by complete induction on $n$. For $n \in\{2,3,4,5\}$, the statement is true according to the above calculations. Now assume that the given relationship is true for all $k \leq n$.

According to the definition of the sequence, $a_{n+3}$ is the maximum of the numbers in the set

$$
A_{n+3}=\left\{a_{2} \cdot a_{n+1}, a_{3} \cdot a_{n}, \ldots, a_{n-2} \cdot a_{5}, a_{n-1} \cdot a_{4}, a_{n} \cdot a_{3}, a_{n+1} \cdot a_{2}\right\}
$$

The first $n-3$ products in $A_{n+3}$ have second factors with indices $n+1, n, \ldots, 5$. Each of these indices satisfies the condition $4 \leq i \leq n+1$. Therefore, the products in $A_{n+3}$ are exactly three times the products in $A_{n}$, i.e., $a_{n+3}=3 \cdot a_{n}$ is indeed true.

Since $1998=3 \cdot 665+3$, we have $a_{1998}=3^{665} \cdot 3=3^{666} \approx 579102 \cdot 10^{312}$.

Based on the solution by M. Mátyás Boros (Budapest, Veres Péter Gymnasium, 9th grade)

Note. This sequence is not a "made-up" formula. For those who have heard something about group theory, we can say that the recursion for $a_{n}$ tells us how to determine the size of the largest commutative subgroup in the group of all permutations of an $n$-element set; provided that we already know this for sets with fewer elements.[^0]

[^0]:    ${ }^{0} \mathrm{The} a_{8}$ calculation was necessary because 8 is the largest index for which the products include a number not divisible by 3; which would necessitate a case distinction in the complete induction proof.