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 A354589 #20 Jun 02 2025 15:25:31 %S A354589 11,23,47,53,67,83,89,101,109,149,167,191,193,197,199,211,251,257,263, %T A354589 383,443,449,461,487,557,563,587,593,599,613,647,659,739,757,761,821, %U A354589 859,983,991,1061,1063,1069,1117,1217,1223,1283,1301,1303,1367,1433,1439,1447,1481,1553,1567,1571,1579 %N A354589 Primes p starting a sequence of 4 consecutive primes whose final digits are 1,3,7,9 (in any order). %H A354589 Robert Israel, <a href="/A354589/b354589.txt">Table of n, a(n) for n = 1..10000</a> %e A354589 a(3) = 47 is in the sequence because the 4 consecutive primes starting with 47 are 47, 53, 59, 61, and their final digits 7,3,9,1 are a permutation of 1,3,7,9. %p A354589 P:= select(isprime, [seq(i,i=3..2000,2)]): %p A354589 P1:= P mod 10: %p A354589 P[select(i -> convert(P1[i..i+3],set) = {1,3,7,9}, [$1..nops(P)-3])]; %t A354589 Select[Partition[Prime[Range[300]], 4, 1], Sort[Mod[#, 10]] == {1, 3, 7, 9} &][[;; , 1]] (* _Amiram Eldar_, Aug 19 2022 *) %o A354589 (Python) %o A354589 from sympy import nextprime %o A354589 from itertools import islice %o A354589 def agen(): # generator of terms %o A354589 p = [2, 3, 5, 7] %o A354589 while True: %o A354589 if set(map(lambda x: x%10, p)) == {1, 3, 7, 9}: yield p[0] %o A354589 p = p[1:] + [nextprime(p[-1])] %o A354589 print(list(islice(agen(), 60))) # _Michael S. Branicky_, Aug 18 2022 %Y A354589 Cf. A007652, A007811, A354590. %K A354589 nonn,base %O A354589 1,1 %A A354589 _J. M. Bergot_ and _Robert Israel_, Aug 18 2022