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.
%I A356475 #17 Sep 06 2022 10:54:16 %S A356475 2,3,5,7,17,29,37,41,43,67,83,103,137,157,179,181,193,227,277,283,347, %T A356475 359,383,431,457,461,607,661,701,709,757,773,823,827,839,859,937,967, %U A356475 1013,1051,1061,1109,1129,1187,1201,1213,1249,1283,1307,1327,1373,1423,1439,1471,1481,1487,1543,1567 %N A356475 First of three consecutive primes p,q,r such that p*q + q*r + r*p is prime. %H A356475 Robert Israel, <a href="/A356475/b356475.txt">Table of n, a(n) for n = 1..10000</a> %e A356475 a(4) = 7 is a term because 7, 11, 13 are three consecutive primes with 7*11 + 11*13 + 13*7 = 311 which is prime. %p A356475 R:= NULL: count:= 0: %p A356475 P:= Vector(3,ithprime): %p A356475 while count < 100 do %p A356475 x:= P[1]*P[2]+P[2]*P[3]+P[3]*P[1]; %p A356475 if isprime(x) then R:= R, P[1]; count:= count+1 fi; %p A356475 P[1..2]:= P[2..3]; %p A356475 P[3]:= nextprime(P[3]); %p A356475 od: %p A356475 R; %t A356475 Select[Partition[Prime[Range[250]], 3, 1], PrimeQ[Total[# * RotateLeft[#]]] &][[;; , 1]] (* _Amiram Eldar_, Aug 08 2022 *) %o A356475 (Python) %o A356475 from itertools import islice %o A356475 from sympy import isprime, nextprime %o A356475 def agen(): %o A356475 p, q, r = 2, 3, 5 %o A356475 while True: %o A356475 if isprime(p*q + q*r + r*p): yield p %o A356475 p, q, r = q, r, nextprime(r) %o A356475 print(list(islice(agen(), 58))) # _Michael S. Branicky_, Aug 08 2022 %o A356475 (PARI) list(lim)=my(v=List(),p=2,q=3); forprime(r=5,nextprime(nextprime(lim\1+1)+1), if(isprime(p*q + q*r + r*p), listput(v,p)); p=q; q=r); Vec(v) \\ _Charles R Greathouse IV_, Sep 06 2022 %Y A356475 Cf. A189759, A356471, A356477. %K A356475 nonn %O A356475 1,1 %A A356475 _J. M. Bergot_ and _Robert Israel_, Aug 08 2022