OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
N:= 100: # to get a(1) - a(N)
p:= 2: q:= 3: r:= 5: s:= 7:
count:= 0:
while count < N do
p:= q; q:= r; r:= s; s:= nextprime(s);
n:= p*q+q*r+r*s;
if isprime(n) then count:= count+1; A[count]:= n fi
od:
seq(A[i], i=1..N); # Robert Israel, May 29 2017
MATHEMATICA
Select[#[[1]]#[[2]]+#[[2]]#[[3]]+#[[3]]#[[4]]&/@Partition[Prime[Range[200]], 4, 1], PrimeQ] (* Harvey P. Dale, Jul 07 2024 *)
PROG
(PARI) {p=2; q=3; r=5; s=7; for(k=1, 1000, if(isprime(a=p*q+q*r+r*s),
print1(a", ")); p=q; q=r; r=s; s=nextprime(1+s))}
(Python)
from sympy import nextprime, isprime
A287653_list, pq, qr, rs, s = [], 6, 15, 35, 7
while s <= 10**6:
n = pq+qr+rs
if isprime(n):
A287653_list.append(n)
t = nextprime(s)
pq, qr, rs, s = qr, rs, s*t, t # Chai Wah Wu, May 29 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, May 29 2017
STATUS
approved