OFFSET
1,1
FORMULA
a(n) = Pi(n+prime(n)) - n + 1 = A000720(n+A000040(n)) - n + 1. [corrected by Michel Marcus, Aug 28 2019]
MATHEMATICA
t[x_] := Table[w, {w, Prime[x], x+Prime[x]}] Table[Count[PrimeQ[t[n]], True], {n, 1, 128}] (* or *) Table[PrimePi[n+Prime[n]]-n+1, {n, 1, 25}];
PROG
(PARI) a(n) = primepi(n+prime(n)) - n + 1; \\ Michel Marcus, Aug 28 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 27 2003
STATUS
approved