OFFSET
1,1
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
StackExchange, A prime number pattern, Jul 29 2012.
PROG
(PARI)
A215029(n) = if(n<=2, n, my(mp=precprime(n-1), d=n); while(mp>0, if(d>0, d -= mp, d += mp); mp = precprime(mp-1)); (d));
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 05 2012
STATUS
approved