OFFSET
1,1
FORMULA
EXAMPLE
n=4: in range {p(4)=11 and c(4)=10} 1 prime was found, a(4)=1; n=25: in range {p(25)=97 and c(25)=38} 13 primes, {41,43,..,97} were found, so a(25)=13.
MATHEMATICA
c[x_] := FixedPoint[x+PrimePi[ # ]+1&, x] Table[PrimePi[c[w]]-w+1, {w, 1, 4}] Table[w-PrimePi[c[w]], {w, 5, 128}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 31 2002
STATUS
approved