OFFSET
1,2
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1000
MATHEMATICA
Composite[n_Integer] := Block[{k = n + 1 + PrimePi@ n}, While[k - 1 - PrimePi@ k != n, k++]; k]; lst = 1 + Accumulate@ Array[ Composite, 600]; Select[ Range@ 600, PrimeQ@ lst[[#]] &] (* Robert G. Wilson v, Nov 29 2014 *)
Position[Accumulate[Select[Range[900], CompositeQ]], _?(PrimeQ[ #+1]&)]// Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 04 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Apr 20 2001
STATUS
approved