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

A065328
a(n) is the number of primes less than or equal to prime(n) - n.
2
0, 0, 1, 2, 3, 4, 4, 5, 6, 8, 8, 9, 9, 10, 11, 12, 13, 14, 15, 15, 15, 16, 17, 18, 20, 21, 21, 22, 22, 23, 24, 25, 27, 27, 30, 30, 30, 30, 31, 32, 33, 34, 34, 35, 36, 36, 38, 40, 40, 41, 42, 42, 42, 45, 46, 46, 47, 47, 47, 47, 47, 50, 53, 53, 53, 54, 56, 57, 59, 59, 60, 61, 62
OFFSET
1,4
LINKS
FORMULA
a(n) = A000720(A000040(n) - A000027(n)).
MATHEMATICA
Table[PrimePi[Prime[n]-n], {n, 80}] (* Harvey P. Dale, Oct 02 2013 *)
PROG
(PARI) { for (n=1, 1000, write("b065328.txt", n, " ", primepi(prime(n) - n)) ) } \\ Harry J. Smith, Oct 16 2009
CROSSREFS
Sequence in context: A017865 A317143 A351520 * A049877 A029063 A015737
KEYWORD
easy,nonn
AUTHOR
Labos Elemer, Oct 29 2001
STATUS
approved