cp's OEIS Frontend

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.

A340463 Primes p such that p*q+r*s+t*u is prime, where p,q,r,s,t,u are consecutive primes.

This page as a plain text file.
%I A340463 #14 Jan 10 2025 18:31:35
%S A340463 3,17,41,47,67,107,193,197,199,211,229,239,313,331,367,461,467,503,
%T A340463 523,571,919,929,991,1021,1039,1093,1109,1163,1193,1237,1277,1327,
%U A340463 1361,1381,1621,1627,1783,1901,2029,2099,2143,2381,2389,2423,2473,2663,2677,2801,2917,2939,2953,2957,2963,3019
%N A340463 Primes p such that p*q+r*s+t*u is prime, where p,q,r,s,t,u are consecutive primes.
%H A340463 Robert Israel, <a href="/A340463/b340463.txt">Table of n, a(n) for n = 1..10000</a>
%e A340463 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 A340463 map(ithprime, select(i -> isprime(ithprime(i)*ithprime(i+1)+ithprime(i+2)*ithprime(i+3)+ithprime(i+4)*ithprime(i+5)), [$1..1000]));
%t A340463 Select[Partition[Prime[Range[500]],6,1],PrimeQ[#[[1]]#[[2]]+#[[3]]#[[4]]+#[[5]]#[[6]]]&][[;;,1]] (* _Harvey P. Dale_, Jan 10 2025 *)
%o A340463 (Python)
%o A340463 from sympy import nextprime, isprime
%o A340463 def aupto(nn):
%o A340463   alst, consec6 = [], [2, 3, 5, 7, 11, 13]
%o A340463   p, q, r, s, t, u = consec6; prod = p*q+r*s+t*u
%o A340463   while p <= nn:
%o A340463     if isprime(prod): alst.append(p)
%o A340463     consec6 = consec6[1:] + [nextprime(consec6[-1])]
%o A340463     p, q, r, s, t, u = consec6; prod = p*q+r*s+t*u
%o A340463   return alst
%o A340463 print(aupto(3019)) # _Michael S. Branicky_, Jan 08 2021
%Y A340463 Cf. A340464.
%K A340463 nonn
%O A340463 1,1
%A A340463 _J. M. Bergot_ and _Robert Israel_, Jan 08 2021