Let's define the following integer sequence. We start with $a_1=3$. Then we define
$$a_{n+1}=a_{n}+(a_{n}\,\text{mod}\,p_n)$$
where $p_n$ is the greatest prime (strictly) less than $a_n$, and $a_{n}\,\text{mod}\,p_n\in\{0,1,2,\ldots,p_n-1\}$. Note that $a_{n}\,\text{mod}\,p_n$ will never be $0$. The first $40$ terms are, if I didn't make any mistakes:
3,4,5,7,9,11,15,17,21,23,27,31,33,35,39,41,45,47,51,55,57,61,63,65,69,71,75,77,81,83,87,91,93,97,105,109,111,113,117,121,129
For example, $a_2=4$ because $2$ is the greatest prime strictly less than $a_1=3$ and $3\equiv 1\,\text{mod}\,2$, so that $a_2=3+1=4$.
Note that the difference between successive terms is either $2$ or $4$ except for the $34$-th and $40$-th terms, where we have $a_{34}-a_{33}=8=a_{40}-a_{39}$. Nevertheless, the difference happens to be always a power of $2$ for these $40$ first terms. In other words $a_{n}\,\text{mod}\,p_n$ is always a power of $2$ for these first $40$ terms.
Now, I wonder if
- $a_{n}\,\text{mod}\,p_n$ will always be a power of $2$?
- will there be infinitely many primes in this sequence?
I searched for this sequence at OEIS, but it seems that it doesn't exist yet.