login
A025001
a(1) = 5; a(n+1) = a(n)-th nonprime, where nonprimes begin at 0.
0
5, 8, 12, 18, 26, 36, 50, 68, 91, 120, 155, 200, 253, 318, 394, 485, 591, 717, 866, 1040, 1242, 1474, 1744, 2052, 2408, 2816, 3277, 3805, 4403, 5080, 5846, 6711, 7684, 8776, 10004, 11376, 12912, 14622, 16535, 18665, 21030, 23660, 26575, 29802, 33375, 37326
OFFSET
1,1
MATHEMATICA
nn=38000; nps=Complement[Range[nn], Prime[Range[PrimePi[nn]]]]; nxt[n_]:= nps[[n-1]]; NestList[nxt, 5, 45] (* Harvey P. Dale, Sep 14 2012 *)
CROSSREFS
Sequence in context: A069102 A001043 A118775 * A020749 A120135 A162704
KEYWORD
nonn
STATUS
approved