%I #25 Jan 24 2024 21:27:55
%S 5,11,23,31,41,59,67,71,109,113,131,139,157,199,211,239,251,269,293,
%T 311,337,379,383,409,419,487,491,499,503,521,571,599,631,701,751,769,
%U 773,787,829,877,881,919,941,953,991,1009,1013,1039,1049,1061,1103,1117
%N Primes that are the sum of three consecutive nonprimes.
%C Apart from 5 and 11, primes of the form 6*k - 1 where 2*k - 1 is prime while 2*k + 1 is composite, and primes of the form 6*k + 1 where 2*k + 1 is prime while 2*k - 1 is composite. - _Robert Israel_, Jan 23 2024
%H Robert Israel, <a href="/A167610/b167610.txt">Table of n, a(n) for n = 1..10000</a>
%e a(1)=0(1st nonprime)+1(2nd nonprime)+4(3rd nonprime)=5(prime);
%e a(2)=1(2nd nonprime)+4(3rd nonprime)+6(4th nonprime)=11(prime);
%e a(3)=6(4th nonprime)+8(5th nonprime)+9(6th nonprime)=23(prime).
%p NP:= remove(isprime,[$0..1000]):
%p select(isprime, NP[1..-3] + NP[2..-2] + NP[3..-1]); # _Robert Israel_, Jan 23 2024
%t fn[m_]:=ResourceFunction["Composite"][m]+ResourceFunction["Composite"][m+1]+ResourceFunction["Composite"][m+2];Join[{5, 11},Select[Table[fn[m],{m,300}],PrimeQ]] (* _James C. McMahon_, Jan 23 2024 *)
%o (Python)
%o from sympy import isprime
%o A167610, complist = [], [0, 1, 4]
%o while len(A167610) < 52:
%o if isprime(totest:= sum(complist)): A167610.append(totest)
%o complist.append(complist[-1]+1)
%o complist = complist[1:]
%o if isprime(complist[-1]): complist[-1] += 1
%o print(A167610) # _Karl-Heinz Hofmann_, Jan 24 2024
%Y Cf. A000040, A141468.
%K nonn
%O 1,1
%A _Juri-Stepan Gerasimov_, Nov 07 2009
%E Corrected (47 replaced by 59, 71 inserted, 619 removed) by _R. J. Mathar_, May 30 2010