OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 37 is a term because 37,41,43,47 are consecutive primes and (37*43+41*47)/2 = 1759 is prime.
MAPLE
R:= NULL: count:= 0:
q:= 3: r:= 5: s:= 7:
while count < 100 do
p:= q; q:= r; r:= s; s:= nextprime(s);
if isprime((p*r+q*s)/2) then
count:= count+1; R:= R, p;
fi
od:
R;
PROG
(Python)
from sympy import isprime, nextprime
def aupton(terms):
alst, p, q, r, s = [], 2, 3, 5, 7
while len(alst) < terms:
if isprime((p*r + q*s)//2): alst.append(p)
p, q, r, s = q, r, s, nextprime(s)
return alst
print(aupton(54)) # Michael S. Branicky, Mar 14 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Mar 14 2021
STATUS
approved