[go: up one dir, main page]

login
A060697
The sum of the first a(n) composite numbers plus 1 is a prime.
2
1, 2, 3, 8, 10, 16, 21, 29, 34, 45, 49, 52, 84, 104, 114, 123, 130, 161, 165, 170, 181, 185, 192, 202, 216, 227, 228, 240, 245, 246, 265, 266, 271, 281, 287, 295, 301, 325, 331, 355, 390, 395, 400, 406, 410, 416, 429, 498, 502, 517, 522, 527, 529, 538, 539
OFFSET
1,2
LINKS
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