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.

Original entry on oeis.org

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

Views

Author

Zak Seidov, May 29 2017

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).
		

Crossrefs

Cf. A000040 (prime numbers), A006094 (products of 2 successive primes).

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