Consider a sequence $\{a_n\}$ of integers, satisfying $a_1=1, a_2=2$ and $a_{n+1}$ is the largest prime divisor of $a_1+a_2+\ldots+a_n$. Find $a_{100}$.
Source: Cono Sur 2023 P4
Tags: number theory
Consider a sequence $\{a_n\}$ of integers, satisfying $a_1=1, a_2=2$ and $a_{n+1}$ is the largest prime divisor of $a_1+a_2+\ldots+a_n$. Find $a_{100}$.