OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
sp[n_]:=Module[{np=NextPrime[n], pa1}, pa1=np-n-1; While[PrimeQ[pa1] || pa1==1, np=NextPrime[np]; pa1=np-n-1]; np]; Join[{2}, NestList[sp, 7, 50]] (* Harvey P. Dale, Jan 10 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 14 2010
EXTENSIONS
Extended by R. J. Mathar, Feb 21 2010
STATUS
approved