%I #2 Mar 30 2012 17:30:31
%S 5,17,37,43,47,53,73,101,127,149,283,439,601,881,967,991,1087,1117,
%T 1129,1201,1259,1277,1303,1319,1453,1481,1559,1571,1607,1721,1973,
%U 2293,2341,2351,2381,2411,2591,2677,2729,2741,2957,2971,3049,3167,3457,3491
%N Primes p such that the sum of the first p composite numbers is itself prime.
%t f[ n_Integer ] := Block[ {k = n + PrimePi[ n ] + 1}, While[ k - PrimePi[ k ] - 1 != n, k++ ]; k ]; s = 0; Do[ s = s + f[ n ]; If[ PrimeQ[ n ] && PrimeQ[ s ], Print[ n ] ], {n, 1, 5000} ]
%K nonn
%O 1,1
%A _Robert G. Wilson v_, Mar 22 2001
|