OFFSET
1,1
FORMULA
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
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved