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.

This page as a plain text file.
%I A356471 #16 Sep 03 2022 08:07:03
%S A356471 19,41,47,53,157,199,491,557,563,571,647,1063,1091,1097,1109,1163,
%T A356471 1171,1217,1259,1279,1361,1367,1487,1601,1621,1753,1901,1951,2053,
%U A356471 2161,2383,2441,2549,2777,2851,2879,2887,2953,2957,3041,3061,3067,3163,3191,3491,3499,3719,3881,4003,4007,4013,4093
%N 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.
%H A356471 Robert Israel, <a href="/A356471/b356471.txt">Table of n, a(n) for n = 1..10000</a>
%e A356471 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.
%p A356471 R:= NULL: count:= 0:
%p A356471 P:= Vector(5,ithprime):
%p A356471 while count < 100 do
%p A356471   x:= P[1]*P[2]+P[2]*P[3]+P[3]*P[4]+P[4]*P[5]+P[5]*P[1];
%p A356471   if isprime(x) then R:= R, P[1]; count:= count+1 fi;
%p A356471   P[1..4]:= P[2..5];
%p A356471   P[5]:= nextprime(P[5]);
%p A356471 od:
%p A356471 R;
%t A356471 Select[Partition[Prime[Range[600]], 5, 1], PrimeQ[Total[# * RotateLeft[#]]] &][[;; , 1]] (* _Amiram Eldar_, Aug 08 2022 *)
%o A356471 (Python)
%o A356471 from itertools import islice
%o A356471 from sympy import isprime, nextprime
%o A356471 def agen():
%o A356471     p, q, r, s, t = 2, 3, 5, 7, 11
%o A356471     while True:
%o A356471         if isprime(p*q + q*r + r*s + s*t + t*p): yield p
%o A356471         p, q, r, s, t = q, r, s, t, nextprime(t)
%o A356471 print(list(islice(agen(), 52))) # _Michael S. Branicky_, Aug 08 2022
%Y A356471 Cf. A356475, A356477.
%K A356471 nonn
%O A356471 1,1
%A A356471 _J. M. Bergot_ and _Robert Israel_, Aug 08 2022