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 A076612 #25 Apr 09 2025 21:16:19 %S A076612 1,4,6,8,9,101,111,141,161,181,191,202,212,242,262,282,292,303,313, %T A076612 343,363,383,393,404,414,444,464,484,494,505,515,545,565,585,595,606, %U A076612 616,646,666,686,696,707,717,747,767,787,797,808,818,848,868,888,898,909 %N A076612 Palindromic numbers with nonprime middle digit. %C A076612 By definition, all terms have an odd number of digits. It is not surprising that the sequence of middle digits is 1, 4, 6, 8, 9, 0. - _Harvey P. Dale_, Jun 15 2024 %H A076612 Harvey P. Dale, <a href="/A076612/b076612.txt">Table of n, a(n) for n = 1..1000</a> %p A076612 ts_num_midpal := proc(n) local ad,adr,midigit; ad := convert(n,base,10): adr := ListTools[Reverse](ad): if nops(ad) mod 2 = 0 then return 1; fi; midigit := op( (nops(ad)+1)/2,ad ): if (isprime( midigit )='false' and adr=ad) then return 0; else return 1; fi end: ts_n_pal := proc(n) if ts_num_midpal(n) = 0 then return (i) fi end: anpal := [seq(ts_n_pal(i), i=1..50000)]: anpal; %t A076612 Select[Range[1000],PalindromeQ[#]&&OddQ[IntegerLength[#]]&&!PrimeQ[IntegerDigits[#][[(IntegerLength[#]+1)/2]]]&] (* _Harvey P. Dale_, Jun 15 2024 *) %o A076612 (Python) %o A076612 from itertools import chain, count, islice %o A076612 def A076612_gen(): # generator of terms %o A076612 return chain((1,4,6,8,9),chain.from_iterable((int((s:=str(d))+e+s[::-1]) for d in range(10**l,10**(l+1)) for e in '014689') for l in count(0))) %o A076612 A076612_list = list(islice(A076612_gen(),20)) # _Chai Wah Wu_, Jun 23 2022 %Y A076612 Cf. A002113, A056525, A076609. %K A076612 easy,nonn,base %O A076612 1,2 %A A076612 _Jani Melik_, Oct 21 2002