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.

A075699 Number of primes in the interval (n,4n].

Original entry on oeis.org

2, 3, 3, 4, 5, 6, 5, 7, 7, 8, 9, 10, 9, 10, 11, 12, 12, 13, 13, 14, 15, 15, 15, 15, 16, 18, 19, 20, 20, 20, 19, 20, 21, 21, 23, 23, 22, 24, 24, 25, 25, 26, 25, 26, 27, 28, 27, 28, 29, 31, 31, 31, 31, 31, 31, 32, 33, 34, 34, 35, 35, 35, 36, 36, 37, 38, 37, 39, 39, 40, 41, 41, 40
Offset: 1

Views

Author

Zak Seidov, Oct 02 2002

Keywords

Comments

Difference a(n+1) - a(n) = -1, 0, 1, 2, ... .

Examples

			a(4) = 4 because between 4 and 16 there are 4 primes: 5, 7, 11, 13.
a(7) = 5 because between 7 and 28 there are 5 primes: 11, 13, 17, 19, 23.
		

Crossrefs

Programs

  • Maple
    A075699 := proc(n)
        numtheory[pi](4*n)-numtheory[pi](n) ;
    end proc: # R. J. Mathar, Nov 03 2017
  • Mathematica
    s=4; a[n_] := PrimePi[s*n]-PrimePi[n]
  • PARI
    a(n) = primepi(4*n) - primepi(n); \\ Michel Marcus, Oct 02 2013

Formula

a(n) = A000720(4n) - A000720(n). - Michel Marcus, Oct 02 2013