A sequence of positive integers is defined by $a_1=a\geq 2$ and $$a_{n+1}=a_n+f(a_n)$$ for $n\geq 1$, where $f(k)$ is the largest proper divisor of $k$. For which positive integer $d$ is it true that no matter the value of $a$, there will be some term $a_n$ divisible by $d$?
For example, for $d=2$ this is true, because if $a_1$ is odd then $f(a_1)$ is also odd, and so $a_2=a_1+f(a_1)$ is even. For $d=3$, this is less clear. It might be possible that $a_i\equiv f(a_i)\equiv 1\pmod 3$ for $i$ odd and $a_i\equiv f(a_i)\equiv 2\pmod 3$ for $i$ even.