Consider a sequence of positive integers $a_1,a_2,a_3,...$ such that $a_1>1$ and $$a_{n+1}=\frac{a_n}{p}+p,$$where $p$ is the greatest prime factor of $a_n$. Prove that for any choice of $a_1$, the sequence $a_1,a_2,a_3,...$ has an infinite terms that are equal between them.
Problem
Source: 2024 Mathematics Regional Olympiad of Mexico West P5
Tags: number theory, recurrence relation