Among the $n$ for which iterating $n\mapsto 2n+1$ eventually hits a prime, can the number of iterations required be arbitrarily large? Suppose we start with an arbitrary positive integer $n$ and iterate the map $n\mapsto 2n+1,$ calling a starting value good if the iterates eventually hit a prime number. Is it possible to prove, assuming good starting values, that the number of iterations required to hit a prime can be arbitrarily large?
Letting $a_n$ be the smallest integer $m \ge 1$ such that $(n+1)2^m-1$ is prime, or $0$ if no such prime exists, we have OEIS A050412, and my question is equivalent to asking whether it is possible to prove that this sequence is unbounded.
Note: Let $x_m$ be the $m$th iterate, $m=1,2,3,\ldots$. If $x_m=(n+1)2^m-1$ for some $m$, then $x_{m+1}=2x_m+1=(n+1)2^{m+1}-1$. We have $x_1=2n+1=(n+1)2^1-1,$ so by induction we have $x_m=(n+1)2^m-1$ for all $m$.
 A: The question is tantamount to asking whether, for infinitely many $m$, there exist primes $p\equiv -1\pmod{2^m}$ for which $(p+1)/2^i-1$ is composite for every $1\leq i\leq m$.
Fix distinct primes $q_1,\dots,q_m$ which do not divide $2^k-1$ for any $1\leq k\leq m$, and consider the system of congruences defined by $p\equiv -1\pmod{2^m}$ as well as
$$p\equiv 2^i-1\pmod{q_i}$$
for each $1\leq i\leq m$. Since $q_i\nmid 2^i-1$, none of these congruences are compatible with $q_i\mid p$, so, by the Chinese remainder theorem, they are equivalent to
$$p\equiv A\pmod{2^mq_1q_2\cdots q_m}$$
for some integer $A$ which is not a multiple of any $q_i$, nor of $2$. By Dirichlet's theorem on arithmetic progressions, there exist infinitely many primes satisfying this congruence. But then
$$\frac{p+1}{2^i}-1\equiv 0\pmod{q_i}$$
for each $i$, and so, if $p$ is sufficiently large, none of these numbers may be prime. Thus, for each $m$, there are infinitely many primes satisfying the desired conditions, and so infinitely many integers $n=(p+1)/2^m-1$ for which
$$\{n,2n+1,4n+3,\dots,(n+1)2^{m-1}-1\}$$
are all composite, but $(n+1)2^m-1$ is prime.
