OFFSET
1,2
COMMENTS
Or, a(1)=1; a(n)=a(n-1) + d: if a(n-1) is prime then d=2 otherwise d=1.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
MATHEMATICA
s={1}; p=0; Do[b=n+p; AppendTo[s, b]; If[PrimeQ[b], p++ ], {n, 2, 130}]; s
PROG
(PARI) lista(nn) = {print1(a=1, ", "); nbp = 0; for (n=2, nn, newn = nbp + n; print1(newn, ", "); nbp += isprime(newn); ); } \\ Michel Marcus, Jul 31 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Oct 23 2006
STATUS
approved