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 A345904 #31 Sep 24 2021 11:53:46 %S A345904 1071,1149,1183,1401,1509,1611,1771,1773,1809,1891,1921,2071,2149, %T A345904 2183,2401,2509,2611,2771,2773,2809,2891,2921,3071,3149,3183,3401, %U A345904 3509,3611,3771,3773,3809,3891,3921,4071,4149,4183,4401,4509,4611,4771,4773,4809,4891,4921,5071 %N A345904 Numbers ending in 1, 3, 7 or 9 that yield no primes if their first digit is changed to another nonzero digit. %C A345904 If a number is in this sequence, then all the numbers with the first digit changed to another nonzero digit are also in this sequence. %C A345904 Numbers ending in 0, 2, 4, 5, 6, and 8 are not included by definition, because they are composite independently of the other digits. %H A345904 Harvey P. Dale, <a href="/A345904/b345904.txt">Table of n, a(n) for n = 1..1000</a> %e A345904 1071, 2071, 3071, 4071, 5071, 6071, 7071, 8071 and 9071 are all composite numbers. Thus, all of them are in this sequence. %p A345904 q:= n-> (l-> l[1] in [1, 3, 7, 9] and andmap(not isprime, [seq(parse %p A345904 (cat(j, seq(l[-i], i=2..nops(l)))), j=1..9)]))(convert(n, base, 10)): %p A345904 select(q, [$1..5080])[]; # _Alois P. Heinz_, Jun 29 2021 %t A345904 Select[Range[1, 6000, 2], Take[IntegerDigits[#], -1] != {5} && CompositeQ[Table[FromDigits[Prepend[Rest[IntegerDigits[#]], n]], {n, 9}]] == {True, True, True, True, True, True, True, True, True} &] %t A345904 Select[Range[1,5100,2],NumberDigit[#,0]!=5&&NoneTrue[FromDigits/@Table[ PadRight[ {d},IntegerLength[#],IntegerDigits[#]],{d,9}],PrimeQ]&] (* _Harvey P. Dale_, Sep 24 2021 *) %o A345904 (Python) %o A345904 from sympy import isprime %o A345904 def ok(n): %o A345904 if n < 10 or n%10 not in {1, 3, 7, 9}: return False %o A345904 s = str(n)[1:] %o A345904 return all(not isprime(int(d+s)) for d in "123456789") %o A345904 print(list(filter(ok, range(1, 6000, 2)))) # _Michael S. Branicky_, Jun 29 2021 %Y A345904 Subsequence of A045572. %K A345904 nonn,base %O A345904 1,1 %A A345904 _Tanya Khovanova_, Jun 29 2021