OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n)=prime(m)*prime(m+1)+prime(m+2)*prime(m+3)+prime(m+4)*prime(m+5) where A340463(n)=prime(m).
EXAMPLE
a(3)=41*43+47*53+59*61=7853, where 41,43,47,53,59,61 are consecutive primes and 7853 is prime.
MAPLE
select(isprime, map(i -> ithprime(i)*ithprime(i+1)+ithprime(i+2)*ithprime(i+3)+ithprime(i+4)*ithprime(i+5), [$1..1000]));
PROG
(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 prod <= nn:
if isprime(prod): alst.append(prod)
consec6 = consec6[1:] + [nextprime(consec6[-1])]
p, q, r, s, t, u = consec6; prod = p*q+r*s+t*u
return alst
print(aupto(10**8)) # Michael S. Branicky, Jan 08 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 08 2021
STATUS
approved