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.

A074990 Number of primes in the interval (n,3n].

Original entry on oeis.org

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

Views

Author

Zak Seidov, Oct 02 2002

Keywords

Comments

Differences a(n+1)-a(n) are 0, 1 or -1.

Examples

			a(4) = 3 because between 4 and 12 there are 3 primes: 5, 7, 11; a(7) = 4 because between 7 and 21 there are 4 primes: 11, 13, 17, 19.
		

Crossrefs

Programs

  • Maple
    A074990 := proc(n)
        numtheory[pi](3*n)-numtheory[pi](n) ;
    end proc: # R. J. Mathar, Nov 03 2017
  • Mathematica
    s=3; a[n_] := PrimePi[s*n]-PrimePi[n]

Formula

a(n) = A000720(3n) - A000720(n).
a(n) = Sum_{j=n+1..3*n} A010051(j).