Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Jan 10 2021 22:10:24
%S 3,17,41,47,67,107,193,197,199,211,229,239,313,331,367,461,467,503,
%T 523,571,919,929,991,1021,1039,1093,1109,1163,1193,1237,1277,1327,
%U 1361,1381,1621,1627,1783,1901,2029,2099,2143,2381,2389,2423,2473,2663,2677,2801,2917,2939,2953,2957,2963,3019
%N Primes p such that p*q+r*s+t*u is prime, where p,q,r,s,t,u are consecutive primes.
%H Robert Israel, <a href="/A340463/b340463.txt">Table of n, a(n) for n = 1..10000</a>
%e a(3)=41 is a term because 41*43+47*53+59*61=7853 is prime, where 41,43,47,53,59,61 are consecutive primes.
%p map(ithprime, select(i -> isprime(ithprime(i)*ithprime(i+1)+ithprime(i+2)*ithprime(i+3)+ithprime(i+4)*ithprime(i+5)), [$1..1000]));
%o (Python)
%o from sympy import nextprime, isprime
%o def aupto(nn):
%o alst, consec6 = [], [2, 3, 5, 7, 11, 13]
%o p, q, r, s, t, u = consec6; prod = p*q+r*s+t*u
%o while p <= nn:
%o if isprime(prod): alst.append(p)
%o consec6 = consec6[1:] + [nextprime(consec6[-1])]
%o p, q, r, s, t, u = consec6; prod = p*q+r*s+t*u
%o return alst
%o print(aupto(3019)) # _Michael S. Branicky_, Jan 08 2021
%Y Cf. A340464.
%K nonn
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Jan 08 2021