OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
After 96 the next term is 289 = 3*96+ 1 as 97 and 193 are both primes.
MATHEMATICA
scp[n_]:=Module[{k=1}, While[!CompositeQ[k n+1], k++]; k n+1]; NestList[scp, 4, 50] (* Harvey P. Dale, Jan 17 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, May 22 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), May 29 2001
STATUS
approved