Problem

Source: 2024 Israel National Olympiad (Gillis) P5

Tags: number theory, smallest prime divisor, Integer sequence, national olympiad



For positive integral $k>1$, we let $p(k)$ be its smallest prime divisor. Given an integer $a_1>2$, we define an infinite sequence $a_n$ by $a_{n+1}=a_n^n-1$ for each $n\geq 1$. For which values of $a_1$ is the sequence $p(a_n)$ bounded?