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”).

A089616
Number of primes between n^2 and (n+1/6)^2.
1
0, 0, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0, 1, 2, 2, 1, 1, 0, 1, 1, 1, 2, 0, 1, 1, 2, 1, 1, 0, 1, 2, 2, 3, 1, 2, 4, 2, 3, 2, 4, 1, 1, 1, 1, 3, 2, 2, 2, 2, 1, 2, 4, 1, 2, 2, 1, 4, 2, 2, 3, 3, 4, 1, 2, 4, 3, 2, 3, 1, 3, 2, 2, 3, 3, 3, 4, 2, 3, 3, 1, 5, 2, 3, 3, 5, 2, 5, 3, 4, 4, 5, 1, 3, 6, 4, 4, 7, 5, 5, 2, 2, 3, 4, 3, 4
OFFSET
1,10
LINKS
MAPLE
seq(numtheory:-pi(floor((n+1/6)^2))-numtheory:-pi(n^2), n=1..200); # Robert Israel, Jan 02 2018
MATHEMATICA
Table[PrimePi[(n+1/6)^2]-PrimePi[n^2], {n, 110}] (* Harvey P. Dale, Sep 17 2013 *)
PROG
(PARI) pbetweensq2(n) = { for(x=1, n, c=0; for(y=floor(x)^2, (x+1/6)^2, if(isprime(y), c++) ); print1(c", ") ) }
(PARI) a(n) = primepi((n+1/6)^2) - primepi(n^2); \\ Michel Marcus, Jan 03 2018
CROSSREFS
Sequence in context: A334913 A112020 A069160 * A089615 A301593 A089731
KEYWORD
easy,nonn,look
AUTHOR
Cino Hilliard, Dec 31 2003
STATUS
approved