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.

Showing 1-2 of 2 results.

A101909 Number of primes between 2n and 4n.

Original entry on oeis.org

1, 2, 2, 2, 4, 4, 3, 5, 4, 4, 6, 6, 6, 7, 7, 7, 8, 9, 9, 10, 10, 9, 10, 9, 10, 12, 12, 13, 14, 13, 12, 13, 14, 13, 15, 14, 13, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 19, 19, 21, 20, 19, 20, 19, 18, 19, 19, 20, 21, 22, 23, 23, 24, 23, 24, 24, 24, 26, 25, 25, 27, 27, 27, 28, 27, 26
Offset: 1

Views

Author

Cino Hilliard, Jan 28 2005

Keywords

Crossrefs

Programs

  • Maple
    A101909 := proc(n::integer)
        numtheory[pi](4*n)-numtheory[pi](2*n) ;
    end proc:
    seq(A101909(n),n=1..100) ; # R. J. Mathar, Oct 02 2019
  • Mathematica
    f[n_] := PrimePi[4n] - PrimePi[2n]; Table[ f[n], {n, 76}] (* Robert G. Wilson v, Feb 10 2005 *)
  • PARI
    bet2n4n(n) = { local(c,x,y); forstep(x=2,n,2, c=0; forprime(y=x+1,x+x-1, c++; ); print1(c",") ) }
    
  • PARI
    s=0;vector(100,n,s+=isprime(4*n-1)+isprime(4*n-3)-isprime(2*n-1)) \\ Charles R Greathouse IV, Mar 12 2012

Formula

a(n) = A099802(2*n)-A099802(n). - R. J. Mathar, Oct 02 2019

A101985 Numbers that occur exactly once in A289493 (= number of primes between 2n and 3n).

Original entry on oeis.org

11, 42, 93, 110, 113, 156, 186, 196, 197, 220, 252, 292, 298, 362, 403, 429, 493, 503, 609, 644, 659, 727, 735, 778, 790, 886, 888, 920, 932, 952, 953, 1008, 1023, 1024, 1079, 1093, 1094, 1100, 1109, 1136, 1165, 1208, 1212, 1213, 1226, 1238, 1250, 1311
Offset: 1

Views

Author

Cino Hilliard, Jan 29 2005

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := PrimePi[3n] - PrimePi[2n]; t = Split[ Sort[ Table[ f[n], {n, 14000}] ]]; Flatten[ Select[t, Length[ # ] == 1 &]] (* Robert G. Wilson v, Feb 10 2005 *)
  • PARI
    bet2n3n(n)={ my(b=vecsort( vector(n,x, my(c=0); forprime(y=2*x+1,3*x-1, c++); c))); for(x=1,n-2, if(b[x+1]>b[x] && b[x+1]A289493 and/or primepi(3n)-primepi(2n) would be faster. Edited and corrected by M. F. Hasler, Sep 29 2019
    
  • PARI
    \\ Size of vector dependent on how pessimistic one is on smoothness of primepi
    primecount(a, b)=primepi(b)-primepi(a);
    v=vector(14000);
    for(k=1, oo, j=primecount(2*k, 3*k); if(j>#v, break, v[j]++));
    for(k=1, 1311, if(v[k]==1, print1(k, ", "))) \\ Hugo Pfoertner, Sep 29 2019

Extensions

More terms from Robert G. Wilson v, Feb 10 2005
Name edited by M. F. Hasler, Sep 29 2019
Showing 1-2 of 2 results.