A340463 Primes p such that p*q+r*s+t*u is prime, where p,q,r,s,t,u are consecutive primes.
3, 17, 41, 47, 67, 107, 193, 197, 199, 211, 229, 239, 313, 331, 367, 461, 467, 503, 523, 571, 919, 929, 991, 1021, 1039, 1093, 1109, 1163, 1193, 1237, 1277, 1327, 1361, 1381, 1621, 1627, 1783, 1901, 2029, 2099, 2143, 2381, 2389, 2423, 2473, 2663, 2677, 2801, 2917, 2939, 2953, 2957, 2963, 3019
Offset: 1
Keywords
Examples
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.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A340464.
Programs
-
Maple
map(ithprime, select(i -> isprime(ithprime(i)*ithprime(i+1)+ithprime(i+2)*ithprime(i+3)+ithprime(i+4)*ithprime(i+5)), [$1..1000]));
-
Mathematica
Select[Partition[Prime[Range[500]],6,1],PrimeQ[#[[1]]#[[2]]+#[[3]]#[[4]]+#[[5]]#[[6]]]&][[;;,1]] (* Harvey P. Dale, Jan 10 2025 *)
-
Python
from sympy import nextprime, isprime def aupto(nn): alst, consec6 = [], [2, 3, 5, 7, 11, 13] p, q, r, s, t, u = consec6; prod = p*q+r*s+t*u while p <= nn: if isprime(prod): alst.append(p) consec6 = consec6[1:] + [nextprime(consec6[-1])] p, q, r, s, t, u = consec6; prod = p*q+r*s+t*u return alst print(aupto(3019)) # Michael S. Branicky, Jan 08 2021