This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A381061 #18 Feb 15 2025 09:47:03 %S A381061 9733,970217,3218471,5241937,5691893,8445251,8788079,11268497, %T A381061 11881901,16697419,19604623,22057961,22926473,26027723,26939197, %U A381061 38187463,38938153,39901963,45190247,52489691,54887597,58296113,61909753,62686369,68142289,69567359,69799033,72085687,72973723,79517741,82464511 %N A381061 First of six consecutive primes such that sum of any five terms is prime. %H A381061 Michael S. Branicky, <a href="/A381061/b381061.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..500 from _Robert Israel_) %e A381061 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 %e A381061 970217 + 970219 + 970231 + 970237 + 970247 = 4851151 %e A381061 970217 + 970219 + 970231 + 970237 + 970259 = 4851163 %e A381061 970217 + 970219 + 970231 + 970247 + 970259 = 4851173 %e A381061 970217 + 970219 + 970237 + 970247 + 970259 = 4851179 %e A381061 970217 + 970231 + 970237 + 970247 + 970259 = 4851191 %e A381061 970219 + 970231 + 970237 + 970247 + 970259 = 4851193 %e A381061 which are all prime. %p A381061 P:= [2,3,5,7,11,13]: S:= convert(P,`+`); %p A381061 R:= NULL: count:= 0: %p A381061 while count < 40 do %p A381061 p:= nextprime(P[6]); %p A381061 S:= S + p - P[1]; %p A381061 P:= [op(P[2..6]),p]; %p A381061 if andmap(t -> isprime(S-t), P) then %p A381061 R:= R,P[1]; count:= count+1; %p A381061 fi %p A381061 od: %p A381061 R; %o A381061 (Python) %o A381061 from sympy import isprime, nextprime %o A381061 from itertools import combinations, islice %o A381061 def agen(): # generator of terms %o A381061 P = [2, 3, 5, 7, 11, 13] %o A381061 while True: %o A381061 if all(isprime(sum(c)) for c in combinations(P, 5)): %o A381061 yield P[0] %o A381061 P = P[1:] + [nextprime(P[-1])] %o A381061 print(list(islice(agen(), 7))) # _Michael S. Branicky_, Feb 12 2025 %Y A381061 Cf. A298763, A381062. %K A381061 nonn %O A381061 1,1 %A A381061 _Zak Seidov_ and _Robert Israel_, Feb 12 2025