OFFSET
1,1
COMMENTS
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
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1)=0(1st nonprime)+1(2nd nonprime)+4(3rd nonprime)=5(prime);
a(2)=1(2nd nonprime)+4(3rd nonprime)+6(4th nonprime)=11(prime);
a(3)=6(4th nonprime)+8(5th nonprime)+9(6th nonprime)=23(prime).
MAPLE
NP:= remove(isprime, [$0..1000]):
select(isprime, NP[1..-3] + NP[2..-2] + NP[3..-1]); # Robert Israel, Jan 23 2024
MATHEMATICA
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 *)
PROG
(Python)
from sympy import isprime
A167610, complist = [], [0, 1, 4]
while len(A167610) < 52:
if isprime(totest:= sum(complist)): A167610.append(totest)
complist.append(complist[-1]+1)
complist = complist[1:]
if isprime(complist[-1]): complist[-1] += 1
print(A167610) # Karl-Heinz Hofmann, Jan 24 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Nov 07 2009
EXTENSIONS
Corrected (47 replaced by 59, 71 inserted, 619 removed) by R. J. Mathar, May 30 2010
STATUS
approved