Problem

Source: Switzerland - 2022 Swiss Final Round p5

Tags: number theory, recurrence relation, divisor



For an integer $a \ge 2$, denote by $\delta_(a) $ the second largest divisor of $a$. Let $(a_n)_{n\ge 1}$ be a sequence of integers such that $a_1 \ge 2$ and $$a_{n+1} = a_n + \delta_(a_n)$$for all $n \ge 1$. Prove that there exists a positive integer $k$ such that $a_k$ is divisible by $3^{2022}$.