OFFSET
1,1
COMMENTS
Equivalently, a(n) = smallest prime of form (n+1)*2^k-1 for k >= 1, or 0 if no such prime exists.
a(509202) = 0 (i.e. never reaches a prime) - Chris Nash (chris_nash(AT)hotmail.com). (Of course this is related to the entry 509203 of A076337.)
a(73) is a 771-digit prime reached after 2552 iterations - Warut Roonguthai. This was proved to be a prime by Paul Jobling (Paul.Jobling(AT)WhiteCross.com) using PrimeForm and by Ignacio Larrosa Cañestro using Titanix (http://www.znz.freesurf.fr/pages/titanix.html). [Oct 30 2000]
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..657. Note that A050412(658) = 800516, so a(658) has 240983 digits, which is too large for a b-file.
Ray Ballinger and Wilfrid Keller, The Riesel Problem: Definition and Status
Hans Riesel, Some large prime numbers. Translated from the Swedish original (Några stora primtal, Elementa 39 (1956), pp. 258-260) by Lars Blomberg.
N. J. A. Sloane, A Nasty Surprise in a Sequence and Other OEIS Stories, Experimental Mathematics Seminar, Rutgers University, Oct 10 2024, Youtube video; Slides [Mentions this sequence]
EXAMPLE
a(4)=19 because 4 -> 9 (composite) -> 19 (prime).
MATHEMATICA
Table[NestWhile[2#+1&, 2n+1, !PrimeQ[#]&], {n, 60}] (* Harvey P. Dale, May 08 2011 *) (* Will run for ever if a(n) = 0. - N. J. A. Sloane, Jul 29 2024 *)
PROG
(PARI) a(n)=while(!isprime(n=2*n+1), ); n \\ oo loop when a(n) = 0. - Charles R Greathouse IV, May 08 2011
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Christian G. Bower, Dec 19 1999
STATUS
approved