login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A110359
a(n) = n+1 if n+1 is a prime else a(n) = 2n+1 if 2n+1 is a prime else a(n) = 2*(2n+1) +1 =g(n) if this number is prime else the next candidate is 2*g(n) + 1 etc.
0
2, 3, 7, 5, 11, 7, 31, 17, 19, 11, 23, 13, 223, 29, 31, 17, 71, 19, 79, 41, 43, 23, 47, 199, 103, 53, 223, 29, 59, 31, 127, 131, 67, 139, 71, 37, 151, 311, 79, 41, 83, 43, 738197503, 89, 367, 47, 191, 97, 199, 101, 103, 53, 107, 109, 223, 113, 463, 59, 239, 61, 991, 251
OFFSET
1,1
COMMENTS
Subsidiary sequence: number of steps to reach a prime.
a(73) takes more than 2000 iterations, if it exists. - Joshua Zucker, May 08 2006
EXAMPLE
a(13) = 223, 13+1 = 14 is composite, 13*2 +1 = 27 is composite, 27*2 +1 = 55, 55*2 +1 =111 and finally 111*2 +1 = 223 is a prime.
CROSSREFS
Sequence in context: A034694 A050921 A087386 * A092977 A057218 A087387
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Jul 23 2005
EXTENSIONS
More terms from Joshua Zucker, May 08 2006
STATUS
approved