OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..900
MATHEMATICA
g[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k - PrimePi[ k ] - 1, k++ ]; k); NestList[ g, 11, 45 ]
Module[{c=Select[Range[500000], CompositeQ]}, NestList[c[[#]]&, 11, 50]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 12 2019 *)
PROG
(PARI) lista(nn) = {print1(a = 11, ", "); nb = 0; forcomposite(c=1, nn, nb++; if (nb==a, print1(c, ", "); a = c); ); } \\ Michel Marcus, May 14 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jan 29 2001
STATUS
approved