login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081871 a(1)=1, a(n)=2*a(n-1)+1 if that number is composite, a(n)=a(n-1)+1 otherwise. 0
1, 2, 3, 4, 9, 10, 21, 22, 45, 91, 183, 184, 369, 370, 741, 742, 1485, 1486, 2973, 5947, 11895, 23791, 47583, 95167, 190335, 380671, 761343, 1522687, 3045375, 3045376, 6090753, 12181507, 24363015, 48726031, 97452063, 194904127, 389808255, 779616511, 1559233023, 3118466047, 6236932095 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

FORMULA

a(n)=r(n)*2^b(n) where b(n) is an integer sequence and r(n) converges to 1.452148914690155834251....

MATHEMATICA

nxt[n_]:=Module[{tst=2n+1}, If[!PrimeQ[tst], tst, n+1]]; NestList[nxt, 1, 40]  [From Harvey P. Dale, Dec. 29, 2010]

CROSSREFS

Sequence in context: A127150 A098548 A076963 * A180743 A162662 A068334

Adjacent sequences:  A081868 A081869 A081870 * A081872 A081873 A081874

KEYWORD

nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), Apr 12 2003

EXTENSIONS

Corrected and extended by Harvey P. Dale, Dec. 29, 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 13:12 EST 2012. Contains 205909 sequences.