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 A046351 #18 Apr 06 2021 12:14:35 %S A046351 4,6,8,9,22,33,44,55,66,77,88,99,121,202,242,252,262,303,343,363,393, %T A046351 404,484,505,525,606,616,626,686,707,808,909,939,1111,1331,1441,1661, %U A046351 1991,2112,2222,2662,2772,2882,3333,3443,3773,3883,3993,4224,4444,5445 %N A046351 Palindromic composite numbers with only palindromic prime factors. %H A046351 Michael S. Branicky, <a href="/A046351/b046351.txt">Table of n, a(n) for n = 1..10000</a> %F A046351 (A032350 INTERSECT A033620) MINUS {1}. - _R. J. Mathar_, Sep 09 2015 %t A046351 palQ[n_]:=Reverse[x=IntegerDigits[n]]==x; Select[Range[4,5500],!PrimeQ[#]&&And@@palQ/@Join[{#},First/@FactorInteger[#]]&](* _Jayanta Basu_, Jun 05 2013 *) %o A046351 (Python) %o A046351 from itertools import product %o A046351 from sympy import isprime, primefactors as pf %o A046351 def pal(n): s = str(n); return s == s[::-1] %o A046351 def palsthru(maxdigits): %o A046351 midrange = [[""], [str(i) for i in range(10)]] %o A046351 for digits in range(1, maxdigits+1): %o A046351 for p in product("0123456789", repeat=digits//2): %o A046351 left = "".join(p) %o A046351 if len(left) and left[0] == '0': continue %o A046351 for middle in midrange[digits%2]: yield int(left+middle+left[::-1]) %o A046351 def okpal(p): return p > 3 and not isprime(p) and all(pal(f) for f in pf(p)) %o A046351 print(list(filter(okpal, palsthru(4)))) # _Michael S. Branicky_, Apr 06 2021 %Y A046351 Cf. A002385, A032350, A033620, A046349, A046350. %K A046351 nonn,base %O A046351 1,1 %A A046351 _Patrick De Geest_, Jun 15 1998