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 A124666 #17 Aug 02 2022 09:21:10 %S A124666 891,921,1029,1037,1653,1763,1857,2427,2513,2519,2607,3111,3193,3213, %T A124666 3501,3519,3707,3953,4227,4459,4599,4689,4803,4863,5019,5043,5047, %U A124666 5397,5459,5489,5499,6019,6023,6429,6483,6609,6621,7113 %N A124666 Numbers ending in 1, 3, 7 or 9 such that either prepending or following them by one digit doesn't produce a prime. %C A124666 If the number doesn't end in 1, 3, 7 or 9, then the prepending requirement is automatically satisfied. Hence it becomes nonrestrictive and not very interesting. %H A124666 Harvey P. Dale, <a href="/A124666/b124666.txt">Table of n, a(n) for n = 1..4000</a> %e A124666 The definition means that 891, 1891, 2891, 3891, 4891, 5891, 6891, 7891, 8891, 9891, 8911, 8913, 8917 and 8919 are all composite numbers. %t A124666 dppQ[n_]:=AllTrue[Join[{n},Table[m*10^IntegerLength[n]+n,{m,9}],Table[ n*10+k,{k,{1,3,7,9}}]],CompositeQ]; Select[Range[8000],MemberQ[ {1,3,7,9},Mod[ #,10]]&&dppQ[#]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 19 2018 *) %o A124666 (Python) %o A124666 from sympy import isprime %o A124666 def ok(n): %o A124666 s = str(n) %o A124666 if s[-1] not in "1379": return False %o A124666 if any(isprime(int(s+c)) for c in "1379"): return False %o A124666 return not any(isprime(int(c+s)) for c in "0123456789") %o A124666 print([k for k in range(7114) if ok(k)]) # _Michael S. Branicky_, Aug 02 2022 %Y A124666 Cf. A124665. %K A124666 base,nonn %O A124666 1,1 %A A124666 _Tanya Khovanova_, Dec 23 2006