Problem

Source: Kyiv City MO 2021 Round 1, Problem 10.5

Tags: number theory, Sequence



The sequence $(a_n)$ is such that $a_{n+1} = (a_n)^n + n + 1$ for all positive integers $n$, where $a_1$ is some positive integer. Let $k$ be the greatest power of $3$ by which $a_{101}$ is divisible. Find all possible values of $k$. Proposed by Kyrylo Holodnov