%I #15 Dec 19 2022 16:54:50
%S 1,2,3,8,10,16,21,29,34,45,49,52,84,104,114,123,130,161,165,170,181,
%T 185,192,202,216,227,228,240,245,246,265,266,271,281,287,295,301,325,
%U 331,355,390,395,400,406,410,416,429,498,502,517,522,527,529,538,539
%N The sum of the first a(n) composite numbers plus 1 is a prime.
%H Robert G. Wilson v, <a href="/A060697/b060697.txt">Table of n, a(n) for n = 1..1000</a>
%t 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 *)
%t Position[Accumulate[Select[Range[900],CompositeQ]],_?(PrimeQ[ #+1]&)]// Flatten (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jan 04 2020 *)
%Y Cf. A000040, A002808, A051349.
%K nonn
%O 1,2
%A _Robert G. Wilson v_, Apr 20 2001