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 A046408 #31 Sep 11 2022 09:31:47 %S A046408 6,22,33,55,77,202,262,303,393,505,626,707,939,1111,1441,1661,1991, %T A046408 3443,3883,7997,13231,15251,18281,19291,20602,22622,22822,24842,26662, %U A046408 28682,30903,31613,33933,35653,37673,38683,39993,60206,60406,60806,62026,64646,64846 %N A046408 Palindromes with exactly 2 distinct palindromic prime factors. %H A046408 Michael S. Branicky, <a href="/A046408/b046408.txt">Table of n, a(n) for n = 1..10000</a> %t A046408 Select[Range[65000],PalindromeQ[#]&&Total[Boole[PalindromeQ/@ FactorInteger[ #][[All,1]]]]==2&&PrimeOmega[#]==2&] (* _Harvey P. Dale_, Aug 07 2021 *) %o A046408 (Python) %o A046408 from sympy import factorint %o A046408 from itertools import product %o A046408 def ispal(n): s = str(n); return s == s[::-1] %o A046408 def pals(d, base=10): # all d-digit palindromes %o A046408 digits = "".join(str(i) for i in range(base)) %o A046408 for p in product(digits, repeat=d//2): %o A046408 if d > 1 and p[0] == "0": continue %o A046408 left = "".join(p); right = left[::-1] %o A046408 for mid in [[""], digits][d%2]: yield int(left + mid + right) %o A046408 def ok(pal): %o A046408 f = factorint(pal) %o A046408 return len(f) == 2 and sum(f.values()) == 2 and all(ispal(p) for p in f) %o A046408 print(list(filter(ok, (p for d in range(1, 6) for p in pals(d) if ok(p))))) # _Michael S. Branicky_, Jun 22 2021 %o A046408 (PARI) ispal(n) = my(d=digits(n)); d == Vecrev(d) \\ A002113 %o A046408 for(k=1, 1e5, if(ispal(k)&&bigomega(k)==2,a=divisors(k); if(#a==4&&ispal(a[2])&&ispal(a[3]), print1(k,", ")))) \\ _Alexandru Petrescu_, Aug 14 2022 %Y A046408 Cf. A046328, A046376. %K A046408 nonn,base %O A046408 1,1 %A A046408 _Patrick De Geest_, Jun 15 1998 %E A046408 a(41) and beyond from _Michael S. Branicky_, Jun 22 2021