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 A347424 #27 Sep 05 2021 08:13:03 %S A347424 7810223,19579907,909001523,984960937,78406036607,90124536947, %T A347424 99020400307,190002706337,393086079907,500708906197,509000702017, %U A347424 600180367883,780430098443,3534900290107,5046024021013,6006006800743,6009000432797,9001924501223,12090900340283 %N A347424 Digitally delicate truncatable primes: every suffix is prime, changing any one decimal digit always produces a composite number, except the first to zero. %C A347424 These prime numbers are both: %C A347424 - digitally delicate primes (also called weakly prime numbers) A158124: changing any one decimal digit always produces a composite number, with restriction that first digit may not be changed to a 0 (that means no change of the number of significant digits from its original value). %C A347424 - left-truncatable primes A033664: every suffix is prime, means repeatedly deleting the most significant digit gives a prime at every step until a single-digit prime remains. %H A347424 Michael S. Branicky, <a href="/A347424/b347424.txt">Table of n, a(n) for n = 1..9175</a> (all terms with <= 29 digits) %o A347424 (Python) %o A347424 from sympy import isprime, primerange %o A347424 def is_digitally_delicate(p): %o A347424 s = str(p) %o A347424 for i in range(len(s)): %o A347424 for d in "0123456789": %o A347424 if d != s[i] and not (i == int(d) == 0): %o A347424 if isprime(int(s[:i] + d + s[i+1:])): return False %o A347424 return True %o A347424 def A033664gen(maxdigits): %o A347424 yield from [2, 3, 5, 7] %o A347424 primestrs, digits, d = ["2", "3", "5", "7"], "0123456789", 1 %o A347424 while len(primestrs) > 0 and d < maxdigits: %o A347424 cands = (d+p for p in primestrs for d in "0123456789") %o A347424 primestrs = [c for c in cands if c[0] == "0" or isprime(int(c))] %o A347424 yield from sorted(map(int, (p for p in primestrs if p[0] != "0"))) %o A347424 d += 1 %o A347424 def afind(maxdigits): %o A347424 for p in A033664gen(maxdigits): %o A347424 if is_digitally_delicate(p): print(p, end=", ") %o A347424 afind(12) # _Michael S. Branicky_, Sep 01 2021 %Y A347424 Cf. A158124, A033664. %K A347424 nonn,base %O A347424 1,1 %A A347424 _Marc Morgenegg_, Sep 01 2021 %E A347424 a(3)-a(4) from _Amiram Eldar_, Sep 01 2021 %E A347424 a(5)-a(19) from _Michael S. Branicky_, Sep 01 2021