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 A345529 #11 Jul 21 2021 09:33:00 %S A345529 3,5,7,17,47,71,107,223,401,823,827,857,883,2087,2089,2539,3253,4007, %T A345529 5051,5059,5503,5507,7541,8447,10247,12401,18041,25303,33529,33589, %U A345529 35533,40427,44171,45557,53503,53653,53899,54401,55001,55009,55333,55817,57077,71147,81017,82003,93553 %N A345529 Primes that yield a prime when any single digit is replaced by its 10's complement. %C A345529 Digital complement of a digit d is 10-d if d > 0, 0 otherwise. %C A345529 Primes in A345343. %e A345529 71147 is a term since 31147, 79147, 71947, 71167 and 71143 are all primes. %t A345529 q[n_] := PrimeQ[n] && Module[{d = IntegerDigits[n]}, And @@ PrimeQ[Table[ FromDigits[ReplacePart[d, i -> If[d[[i]] == 0, d[[i]], 10 - d[[i]]]]], {i, 1, Length[d]}]]]; Select[Range[10^5], q] (* _Amiram Eldar_, Jul 06 2021 *) %o A345529 (Python) %o A345529 from sympy import isprime, primerange %o A345529 def comp(d, i): return d[:i] + str((10-int(d[i]))%10) + d[i+1:] %o A345529 def ok(p): %o A345529 d = str(p) %o A345529 return all(isprime(int(comp(d, i))) for i in range(len(d))) %o A345529 print(list(filter(ok, primerange(1, 95000)))) # _Michael S. Branicky_, Jun 20 2021 %Y A345529 Cf. A345343, A055120, A089740, A318785. %K A345529 nonn,base,easy %O A345529 1,1 %A A345529 _Lamine Ngom_, Jun 20 2021