OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 19 is a term because 19*23+23*29+29*31 = 2003 is prime.
MAPLE
q:= 2: r:= 3: s:= 5:
count:= 0: R:= NULL:
while count < 100 do
p:= q; q:= r; r:= s; s:= nextprime(s);
if isprime(p*q+q*r+r*s) then count:= count+1; R:= R, p; fi
od:
R;
PROG
(Python)
from sympy import isprime, nextprime
def aupton(terms):
p, q, r, s, alst = 2, 3, 5, 7, []
while len(alst) < terms:
if isprime(p*q + q*r + r*s): alst.append(p)
p, q, r, s = q, r, s, nextprime(s)
return alst
print(aupton(55)) # Michael S. Branicky, Mar 17 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 06 2021
STATUS
approved