login
A037038
Number of primes between n and 4n+1.
1
3, 4, 5, 5, 6, 6, 7, 7, 8, 9, 10, 10, 11, 10, 12, 12, 13, 14, 14, 14, 15, 16, 16, 16, 17, 18, 20, 21, 21, 20, 20, 20, 21, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 26, 28, 28, 28, 29, 30, 31, 31, 31, 32, 31, 31, 32, 34, 35, 35, 36, 36, 35, 36, 37, 37, 38, 39, 39, 40, 41, 42, 41
OFFSET
1,1
FORMULA
a(n) = A000720(4*n+1) - A000720(n-1). - Michel Marcus, Sep 28 2013
EXAMPLE
a(5)=6 because between 5 and 21 there are 6 primes: 5, 7, 11, 13, 17 and 19.
MAPLE
with(numtheory); A037038:=n->pi(4*n + 1) - pi(n - 1); seq(A037038(n), 1..100); # Wesley Ivan Hurt, Feb 14 2014
MATHEMATICA
Table[PrimePi[4 n + 1] - PrimePi[n - 1], {n, 1, 100}] (* Wesley Ivan Hurt, Feb 14 2014 *)
PROG
(PARI) a(n) = primepi(4*n+1) - primepi(n-1); \\ Michel Marcus, Sep 28 2013
CROSSREFS
Cf. A014085.
Sequence in context: A307136 A339362 A240676 * A348133 A278375 A106501
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved