A093007 First nonprime number reached when iterating n under x->2*x+1.
1, 95, 15, 4, 95, 6, 15, 8, 9, 10, 95, 12, 27, 14, 15, 16, 35, 18, 39, 20, 21, 22, 95, 24, 25, 26, 27, 28, 119, 30, 63, 32, 33, 34, 35, 36, 75, 38, 39, 40, 335, 42, 87, 44, 45, 46, 95, 48, 49, 50, 51, 52, 215, 54, 55, 56, 57, 58, 119, 60, 123, 62, 63, 64, 65, 66, 135
Offset: 1
Keywords
Examples
n = 41 = A000040(13) -> 2*41+1 = 83 = A000040(23) -> 2*83+1 = 167 = A000040(39) -> 2*167+1 = 335 = 67*5, therefore a(41) = 335, A063377(41) = 3.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[NestWhile[2#+1&,n,PrimeQ],{n,70}] (* Harvey P. Dale, Sep 25 2012 *)
Extensions
Definition corrected by Harvey P. Dale, Sep 25 2012