OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1) = 4, the first composite. So the smallest a(2) could possibly be 5. 4+5=9, which is composite, so a(2) = 5. a(3) cannot be 6, because 5+6=11, which is prime. But 5+7=12 is composite, so a(3) = 7.
MATHEMATICA
nxt[n_]:=Module[{k=n+1}, While[PrimeQ[n+k], k++]; k]; NestList[nxt, 4, 70] (* Harvey P. Dale, Jul 18 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Neil Fernandez, Nov 09 2013
STATUS
approved