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 A007597 M4800 #32 Apr 03 2023 10:36:09 %S A007597 11,101,181,619,16091,18181,19861,61819,116911,119611,160091,169691, %T A007597 191161,196961,686989,688889,1008001,1068901,1160911,1180811,1190611, %U A007597 1191611,1681891,1690691,1880881,1881881,1898681,1908061,1960961,1990661,6081809,6100019,6108019 %N A007597 Strobogrammatic primes. %C A007597 Primes which are invariant under a 180-degree rotation. %D A007597 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %D A007597 C. W. Trigg, "Strobogrammatic Primes and Prime Rotative Twins", J. Rec. Math., 15 (1983), 281-282. %H A007597 Michael S. Branicky, <a href="/A007597/b007597.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..304 from K. D. Bajpai) %H A007597 C. K. Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/page.php/strobogrammatic.html">Strobogrammatic</a> %H A007597 Ernest G. Hibbs, <a href="https://www.proquest.com/openview/4012f0286b785cd732c78eb0fc6fce80">Component Interactions of the Prime Numbers</a>, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33. %H A007597 Wikipedia, <a href="http://en.wikipedia.org/wiki/Strobogrammatic_prime">Strobogrammatic prime</a> %t A007597 lst = {}; fQ[n_] := Block[{allset = {0, 1, 6, 8, 9}, id = IntegerDigits@n}, Union@ Join[id, allset] == allset && Reverse[id /. {6 -> 9, 9 -> 6}] == id]; Do[ If[ PrimeQ@n && fQ@n, AppendTo[lst, n]], {n, 2000000}]; lst (* _Robert G. Wilson v_, Feb 27 2007 *) %o A007597 (Python) %o A007597 from sympy import isprime %o A007597 from itertools import count, islice, product %o A007597 def ud(s): return s[::-1].translate({ord('6'):ord('9'), ord('9'):ord('6')}) %o A007597 def agen(): %o A007597 for d in count(2): %o A007597 for start in "1689": %o A007597 for rest in product("01689", repeat=d//2-1): %o A007597 left = start + "".join(rest) %o A007597 right = ud(left) %o A007597 for mid in [[""], ["0", "1", "8"]][d%2]: %o A007597 t = int(left + mid + right) %o A007597 if isprime(t): %o A007597 yield t %o A007597 print(list(islice(agen(), 33))) # _Michael S. Branicky_, Mar 29 2022 %Y A007597 Cf. A000787. %K A007597 base,nonn %O A007597 1,1 %A A007597 _N. J. A. Sloane_, _Robert G. Wilson v_ %E A007597 More terms from _David W. Wilson_ %E A007597 a(31)-a(33) from _K. D. Bajpai_, Jun 23 2017