login
The sum of the first n composite numbers minus 1 is a prime.
1

%I #4 Jul 20 2016 08:26:52

%S 1,3,11,15,22,39,51,57,66,67,71,79,98,105,108,109,115,118,119,125,135,

%T 150,151,152,156,160,169,200,201,205,211,223,228,241,271,281,282,291,

%U 312,315,322,331,341,350,372,382,385,395,401,420,433,461,482,498,544

%N The sum of the first n composite numbers minus 1 is a prime.

%t Composite[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k - PrimePi[ k ] - 1 != n, k++ ]; k); Select[ Range[ 1000 ], PrimeQ[ Sum[ Composite[ k ], {k, 1, #} ] - 1 ] & ]

%t Position[Accumulate[Select[Range[700],CompositeQ]]-1,_?PrimeQ]//Flatten (* _Harvey P. Dale_, Jul 20 2016 *)

%K nonn

%O 1,2

%A _Robert G. Wilson v_, Apr 20 2001