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 A124665 #43 Jan 07 2023 02:00:04 %S A124665 20,32,62,84,114,126,134,135,146,150,164,168,176,185,192,196,204,210, %T A124665 218,232,236,240,248,256,258,282,294,298,305,314,315,324,326,328,342, %U A124665 348,350,356,366,368,374,375,378,395,406,408,410,414,416,418 %N A124665 Numbers that cannot be either prefixed or followed by one digit to form a prime. %C A124665 Prefixing by 0 gives the number itself, implying that a(n) is not prime. %C A124665 Disjoint union of A124666 and (intersection of A065502 and A032352). - _Reinhard Zumkeller_, Oct 22 2011; edited by _Michel Marcus_, Aug 02 2022 %C A124665 All integers of the form 100*(21*n)^3 belong to the sequence, so it is infinite. - _Mauro Fiorentini_, Jan 05 2023 %H A124665 Michael S. Branicky, <a href="/A124665/b124665.txt">Table of n, a(n) for n = 1..10000</a> %e A124665 If you prefix 20 with any digit you will get an even number. Also 201, 203, 207 and 209 are all composite. %t A124665 okQ[n_]:=If[EvenQ[n]||Divisible[n,5],Union[PrimeQ[10 n+{1,3,7,9}]] == {False},!PrimeQ[n]&&Union[PrimeQ[10 n+{1,3,7,9}]]=={False} && Union[ PrimeQ[Table[FromDigits[Join[{i},IntegerDigits[n]]],{i,9}]]] == {False}]; Select[Range[500],okQ] (* _Harvey P. Dale_, Jul 15 2011 *) %o A124665 (PARI) is(n)=my(N=10*n,D=10^#Str(n)); forstep(k=n, n+9*D, D, if(isprime(k), return(0)));!(isprime(N+1)||isprime(N+3)||isprime(N+7)||isprime(N+9)) \\ _Charles R Greathouse IV_, Jul 15 2011 %o A124665 (Python) %o A124665 from sympy import isprime %o A124665 def ok(n): %o A124665 s = str(n) %o A124665 if any(isprime(int(s+c)) for c in "1379"): return False %o A124665 return not any(isprime(int(c+s)) for c in "0123456789") %o A124665 print([k for k in range(419) if ok(k)]) # _Michael S. Branicky_, Aug 01 2022 %Y A124665 Cf. A010051, A032737, A125268. %Y A124665 Cf. A032352, A065502. %Y A124665 Cf. A124666. %K A124665 base,nonn %O A124665 1,1 %A A124665 _Tanya Khovanova_, Dec 23 2006 %E A124665 Deleted incorrect Haskell program. - _N. J. A. Sloane_, Aug 02 2022