## Task A-4.2.

The initial term of the sequence $\left(a_{n}\right)$ is $a_{0}=2022$. For each $n \in \mathbb{N}$, the number $a_{n}$ is equal to the sum of the number $a_{n-1}$ and its largest divisor smaller than itself. Determine $a_{2022}$.
## Solution.

Notice that the prime factorization of the number $a_{0}$ is $a_{0}=2022=2 \cdot 3 \cdot 337$.

We will prove by induction that for every $k \in \mathbb{N}_{0}$ it holds that

$$
a_{3 k}=3^{k} \cdot a_{0}
$$

The base case for $k=0$ is trivially satisfied.

Assume now that for some $k \in \mathbb{N}_{0}$ it holds that $a_{3 k}=3^{k} \cdot a_{0}$.

The greatest divisor of an even number $2 m$ that is less than it is $m$. The number $a_{3 k}$ is an even number, so its greatest divisor less than itself is $3^{k} \cdot 1011$. It follows that

$$
a_{3 k+1}=3^{k} \cdot 2022+3^{k} \cdot 1011=3^{k} \cdot 3033
$$

The greatest divisor of an odd number of the form $3 m$ that is less than that number is $m$, so the greatest divisor of the number $a_{3 k+1}$ that is less than it is also $3^{k} \cdot 1011$. Therefore,

$$
a_{3 k+2}=3^{k} \cdot 3033+3^{k} \cdot 1011=3^{k} \cdot 4044
$$

Finally, the greatest divisor of the even number $a_{3 k+2}$ is $3^{k} \cdot 2022$, so

$$
a_{3 k+3}=3^{k} \cdot 4044+3^{k} \cdot 2022=3^{k} \cdot 6066=3^{k+1} \cdot 2022=3^{k+1} \cdot a_{0}
$$

The induction step is proven, and thus the induction claim is proven.

Therefore, $a_{2022}=a_{3 \cdot 674}=3^{674} \cdot a_{0}=3^{674} \cdot 2022$.