login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A037037
Number of primes between n and 3n.
1
2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 7, 6, 7, 7, 8, 9, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 13, 14, 14, 14, 14, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 17, 18, 18, 18, 19, 20, 19, 19, 20, 21, 21, 22, 21, 22, 23, 23, 24, 24, 24, 25, 24, 24, 25, 26, 27, 28, 27, 27, 27, 28, 27, 27, 26, 27, 28
OFFSET
1,1
FORMULA
a(n) = A000720(3n) - A000720(n-1). - Wesley Ivan Hurt, Jun 15 2013
EXAMPLE
For example a(5)=4 because between 5 and 15 there are 4 primes: 5, 7, 11 and 13.
MATHEMATICA
Array[Count[Range[#, 3 #], k_ /; PrimeQ@ k] &, 76] (* Michael De Vlieger, Mar 20 2017 *)
PROG
(PARI) a(n) = primepi(3*n) - primepi(n-1); \\ Michel Marcus, Sep 28 2013
CROSSREFS
Cf. A014085.
Sequence in context: A293137 A087823 A230418 * A156262 A218447 A305845
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved