login
A167610
Primes that are the sum of three consecutive nonprimes.
1
5, 11, 23, 31, 41, 59, 67, 71, 109, 113, 131, 139, 157, 199, 211, 239, 251, 269, 293, 311, 337, 379, 383, 409, 419, 487, 491, 499, 503, 521, 571, 599, 631, 701, 751, 769, 773, 787, 829, 877, 881, 919, 941, 953, 991, 1009, 1013, 1039, 1049, 1061, 1103, 1117
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
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
Sequence in context: A161896 A317909 A304372 * A295149 A143127 A235386
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected (47 replaced by 59, 71 inserted, 619 removed) by R. J. Mathar, May 30 2010
STATUS
approved