login
The OEIS is supported by the many generous donors 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; text; internal format)
OFFSET
1,2
LINKS
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] (* Harvey P. Dale, Dec 29 2010 *)
CROSSREFS
Sequence in context: A256189 A098548 A076963 * A366913 A329573 A291163
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 12 2003
EXTENSIONS
Corrected and extended by Harvey P. Dale, Dec 29 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:39 EDT 2024. Contains 371782 sequences. (Running on oeis4.)