cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A083005 a(1)=1, a(n)=2a(n-1)+1 if a(n-1) is prime, a(n)=a(n-1)+1 otherwise.

Original entry on oeis.org

1, 2, 5, 11, 23, 47, 95, 96, 97, 195, 196, 197, 395, 396, 397, 795, 796, 797, 1595, 1596, 1597, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 6407, 6408, 6409, 6410, 6411, 6412, 6413, 6414, 6415, 6416, 6417, 6418, 6419, 6420, 6421, 12843, 12844
Offset: 1

Views

Author

Benoit Cloitre, May 31 2003

Keywords

Comments

Primes in this sequence are A055496.- Robert Israel, May 23 2017

Crossrefs

Cf. A055496.

Programs

  • Maple
    P[0]:= 0:
    for n from 2 to 20 do P[n]:= nextprime(2*P[n-1]) od:
    seq($2*P[i]+1..P[i+1],i=0..19); # Robert Israel, May 23 2017
  • Mathematica
    NestList[If[PrimeQ[#],2#+1,#+1]&,1,50] (* Harvey P. Dale, Jul 02 2021 *)

Formula

Conjecture : limit n ->oo log(a(n))/sqrt(n)=c= 1.3....

Extensions

Offset corrected by Robert Israel, May 23 2017