A287653 Prime numbers of the form p*q + q*r + r*s with p,q,r,s consecutive primes.
127, 1427, 2003, 2713, 7639, 76519, 81703, 139663, 166643, 173777, 349589, 371027, 653357, 696083, 752033, 793699, 883549, 938617, 974713, 1150733, 1176983, 1207223, 1310779, 1675577, 1702577, 1880363, 2715169
Offset: 1
Keywords
Examples
a(1) = 127 = 3*5 + 5*7 + 7*11 = A000040(2)*A000040(3) + A000040(3)*A000040(4) + A000040(4)*A000040(5) = A006094(2) + A006094(3) + A006094(4).
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
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