cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A287653 Prime numbers of the form p*q + q*r + r*s with p,q,r,s consecutive primes.

This page as a plain text file.
%I A287653 #17 Jul 07 2024 11:22:24
%S A287653 127,1427,2003,2713,7639,76519,81703,139663,166643,173777,349589,
%T A287653 371027,653357,696083,752033,793699,883549,938617,974713,1150733,
%U A287653 1176983,1207223,1310779,1675577,1702577,1880363,2715169
%N A287653 Prime numbers of the form p*q + q*r + r*s with p,q,r,s consecutive primes.
%H A287653 Robert Israel, <a href="/A287653/b287653.txt">Table of n, a(n) for n = 1..10000</a>
%e A287653 a(1) = 127 = 3*5 + 5*7 + 7*11 =
%e A287653 A000040(2)*A000040(3) + A000040(3)*A000040(4) + A000040(4)*A000040(5) =
%e A287653 A006094(2) + A006094(3) + A006094(4).
%p A287653 N:= 100: # to get a(1) - a(N)
%p A287653 p:= 2: q:= 3: r:= 5: s:= 7:
%p A287653 count:= 0:
%p A287653 while count < N do
%p A287653   p:= q; q:= r; r:= s; s:= nextprime(s);
%p A287653   n:= p*q+q*r+r*s;
%p A287653   if isprime(n) then count:= count+1; A[count]:= n fi
%p A287653 od:
%p A287653 seq(A[i],i=1..N); # _Robert Israel_, May 29 2017
%t A287653 Select[#[[1]]#[[2]]+#[[2]]#[[3]]+#[[3]]#[[4]]&/@Partition[Prime[Range[200]],4,1],PrimeQ] (* _Harvey P. Dale_, Jul 07 2024 *)
%o A287653 (PARI) {p=2;q=3;r=5;s=7;for(k=1,1000,if(isprime(a=p*q+q*r+r*s),
%o A287653 print1(a","));p=q;q=r;r=s;s=nextprime(1+s))}
%o A287653 (Python)
%o A287653 from sympy import nextprime, isprime
%o A287653 A287653_list, pq, qr, rs, s = [], 6, 15, 35, 7
%o A287653 while s <= 10**6:
%o A287653     n = pq+qr+rs
%o A287653     if isprime(n):
%o A287653         A287653_list.append(n)
%o A287653     t = nextprime(s)
%o A287653     pq, qr, rs, s = qr, rs, s*t, t # _Chai Wah Wu_, May 29 2017
%Y A287653 Cf. A000040 (prime numbers), A006094 (products of 2 successive primes).
%K A287653 nonn
%O A287653 1,1
%A A287653 _Zak Seidov_, May 29 2017