A381061 First of six consecutive primes such that sum of any five terms is prime.
9733, 970217, 3218471, 5241937, 5691893, 8445251, 8788079, 11268497, 11881901, 16697419, 19604623, 22057961, 22926473, 26027723, 26939197, 38187463, 38938153, 39901963, 45190247, 52489691, 54887597, 58296113, 61909753, 62686369, 68142289, 69567359, 69799033, 72085687, 72973723, 79517741, 82464511
Offset: 1
Keywords
Examples
a(2) = 970217 is a term because 970217, 970219, 970231, 970237, 970247, 970259 are six consecutive primes such that the sums of five of the six are 970217 + 970219 + 970231 + 970237 + 970247 = 4851151 970217 + 970219 + 970231 + 970237 + 970259 = 4851163 970217 + 970219 + 970231 + 970247 + 970259 = 4851173 970217 + 970219 + 970237 + 970247 + 970259 = 4851179 970217 + 970231 + 970237 + 970247 + 970259 = 4851191 970219 + 970231 + 970237 + 970247 + 970259 = 4851193 which are all prime.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..500 from _Robert Israel_)
Programs
-
Maple
P:= [2,3,5,7,11,13]: S:= convert(P,`+`); R:= NULL: count:= 0: while count < 40 do p:= nextprime(P[6]); S:= S + p - P[1]; P:= [op(P[2..6]),p]; if andmap(t -> isprime(S-t), P) then R:= R,P[1]; count:= count+1; fi od: R;
-
Python
from sympy import isprime, nextprime from itertools import combinations, islice def agen(): # generator of terms P = [2, 3, 5, 7, 11, 13] while True: if all(isprime(sum(c)) for c in combinations(P, 5)): yield P[0] P = P[1:] + [nextprime(P[-1])] print(list(islice(agen(), 7))) # Michael S. Branicky, Feb 12 2025