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 #11 Apr 15 2021 23:41:49
%S 5,7,11,13,19,29,37,67,71,101,103,107,193,223,229,281,293,337,359,367,
%T 541,569,613,631,647,677,709,751,809,823,829,857,881,887,919,947,971,
%U 1009,1019,1049,1237,1249,1279,1373,1439,1471,1543,1571,1627,1637,1693,1733,1783,1907,1993,2017,2161
%N Primes p such that p+q*(r+s) is prime, where p,q,r,s are consecutive primes.
%C Includes p if p, q = p+2, r = p+6, s = p+8 are consecutive primes and 2*p^2+19*p+28 is prime. The generalized Dickson's conjecture implies there are infinitely many such p.
%H Robert Israel, <a href="/A343448/b343448.txt">Table of n, a(n) for n = 1..10000</a>
%e a(3) = 11 is a term because 11,13,17 and 19 are consecutive primes and 11+13*(17+19) = 479 is prime.
%p A:= NULL: q:= 2: r:= 3: s:= 5: count:= 0:
%p while count < 100 do
%p p:= q; q:= r; r:= s; s:= nextprime(s);
%p v:= p+q*(r+s);
%p if isprime(v) then A:= A,p; count:= count+1 fi
%p od:
%p A;
%o (Python)
%o from sympy import isprime, nextprime
%o def aupto(limit):
%o p, q, r, s, alst = 2, 3, 5, 7, []
%o while p <= limit:
%o if isprime(p + q*(r+s)): alst.append(p)
%o p, q, r, s = q, r, s, nextprime(s)
%o return alst
%o print(aupto(2161)) # _Michael S. Branicky_, Apr 15 2021
%Y Cf. A343449.
%K nonn
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Apr 15 2021