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 A046338 #35 Jul 28 2025 05:40:49 %S A046338 1,4,6,9,22,33,55,77,88,111,121,141,161,202,232,262,303,323,393,414, %T A046338 424,444,454,484,505,515,525,535,545,565,585,626,636,666,676,686,707, %U A046338 717,737,767,808,818,838,858,868,878,898,939,949,959,979,989,999,1111,1441 %N A046338 Palindromes > 0 with an even number of prime factors (counted with multiplicity). %H A046338 Harvey P. Dale, <a href="/A046338/b046338.txt">Table of n, a(n) for n = 1..17500</a> (terms 1..10000 from John Cerkan) %t A046338 Select[Range[1500],PalindromeQ[#]&&EvenQ[PrimeOmega[#]]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jan 01 2020 *) %o A046338 (Python) %o A046338 from sympy import factorint %o A046338 from itertools import product %o A046338 def ispal(n): s = str(n); return s == s[::-1] %o A046338 def pals(d, base=10): # all d-digit palindromes %o A046338 digits = "".join(str(i) for i in range(base)) %o A046338 for p in product(digits, repeat=d//2): %o A046338 if d > 1 and p[0] == "0": continue %o A046338 left = "".join(p); right = left[::-1] %o A046338 for mid in [[""], digits][d%2]: yield int(left + mid + right) %o A046338 def ok(pal): return sum(factorint(pal).values())%2 == 0 %o A046338 print(list(filter(ok, (p for d in range(1, 5) for p in pals(d) if ok(p))))) # _Michael S. Branicky_, Aug 14 2022 %Y A046338 Cf. A028260, A046337. %K A046338 nonn,base %O A046338 1,2 %A A046338 _Patrick De Geest_, Jun 15 1998 %E A046338 Corrected by _Harvey P. Dale_, Jan 01 2020