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 A082755 #18 Mar 11 2022 12:57:51 %S A082755 2,3,5,223,727,3253,3727,5233,5323,7573,7723,7753,22273,23327,25523, %T A082755 27733,32233,32323,32533,35323,35533,37253,37273,52223,52727,53323, %U A082755 53327,53773,55333,72223,72727,75223,75527,75553,222527,222533,222553,223273,223753,225223 %N A082755 Smaller of a pair of consecutive primes having only prime digits. %H A082755 Chai Wah Wu, <a href="/A082755/b082755.txt">Table of n, a(n) for n = 1..10000</a> (Terms for n = 1..1000 from Harvey P. Dale) %e A082755 223 is a term as the next prime 227 also has only prime digits. %t A082755 NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 0; q = 1; pd = {1}; Do[p = q; pd = qd; q = NextPrim[p]; qd = Union[ Join[{2, 3, 5, 7}, IntegerDigits[q]]]; If[pd == qd == {2, 3, 5, 7}, Print[p]], {n, 1, 20000}] %t A082755 Prime[#]&/@SequencePosition[Table[If[AllTrue[IntegerDigits[n],PrimeQ],1,0],{n,Prime[Range[20000]]}],{1,1}][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 31 2017 *) %o A082755 (Python) %o A082755 from sympy import nextprime, isprime %o A082755 from itertools import count, islice, product %o A082755 def onlypd(n): return set(str(n)) <= set("2357") %o A082755 def agen(): %o A082755 yield from [2, 3, 5] %o A082755 for digits in count(2): %o A082755 for p in product("2357", repeat=digits-1): %o A082755 for end in "37": %o A082755 t = int("".join(p) + end) %o A082755 if isprime(t) and onlypd(nextprime(t)): %o A082755 yield t %o A082755 print(list(islice(agen(), 40))) # _Michael S. Branicky_, Mar 11 2022 %Y A082755 Cf. A019546, A082756. %K A082755 base,nonn %O A082755 1,1 %A A082755 _Amarnath Murthy_, Apr 18 2003 %E A082755 Edited and extended by _Robert G. Wilson v_, Apr 22 2003