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.

A356471 First of 5 consecutive primes p,q,r,s,t such that p*q+ q*r + r*s + s*t + t*p is prime.

Original entry on oeis.org

19, 41, 47, 53, 157, 199, 491, 557, 563, 571, 647, 1063, 1091, 1097, 1109, 1163, 1171, 1217, 1259, 1279, 1361, 1367, 1487, 1601, 1621, 1753, 1901, 1951, 2053, 2161, 2383, 2441, 2549, 2777, 2851, 2879, 2887, 2953, 2957, 3041, 3061, 3067, 3163, 3191, 3491, 3499, 3719, 3881, 4003, 4007, 4013, 4093
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 08 2022

Keywords

Examples

			a(3) = 47 is a term because 47, 53, 59, 61, 67 are 5 consecutive primes with 47*53 + 53*59 + 59*61 + 61*67 + 67*47 = 16453 prime.
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0:
    P:= Vector(5,ithprime):
    while count < 100 do
      x:= P[1]*P[2]+P[2]*P[3]+P[3]*P[4]+P[4]*P[5]+P[5]*P[1];
      if isprime(x) then R:= R, P[1]; count:= count+1 fi;
      P[1..4]:= P[2..5];
      P[5]:= nextprime(P[5]);
    od:
    R;
  • Mathematica
    Select[Partition[Prime[Range[600]], 5, 1], PrimeQ[Total[# * RotateLeft[#]]] &][[;; , 1]] (* Amiram Eldar, Aug 08 2022 *)
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen():
        p, q, r, s, t = 2, 3, 5, 7, 11
        while True:
            if isprime(p*q + q*r + r*s + s*t + t*p): yield p
            p, q, r, s, t = q, r, s, t, nextprime(t)
    print(list(islice(agen(), 52))) # Michael S. Branicky, Aug 08 2022