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 A356750 #24 Sep 14 2022 08:25:41 %S A356750 3,5,7,9,11,101,121,131,151,181,191,313,343,353,373,383,525,555,585, %T A356750 595,727,757,777,787,797,919,929,969,1001,1221,1331,1551,1771,1881, %U A356750 3333,3553,3663,5225,5335,5445,5555,5665,5885,5995,7007,7227,7337,7557,7667,7777,7887,9339,9669,9779,9889,9999,10201,10301 %N A356750 Palindromic odd numbers with an odd number of distinct prime factors. %C A356750 Numbers in this sequence can be divided by nontrivial prime powers. %C A356750 This sequence contains palindromic primes: A002385. %C A356750 This sequence contains palindromic odd composite numbers that are products of an odd number of distinct primes: A075808. %H A356750 Michael S. Branicky, <a href="/A356750/b356750.txt">Table of n, a(n) for n = 1..10000</a> %e A356750 Number 525 = 3*5^2*7 has 3 prime factors 3, 5, and 7. Thus, it is in the sequence. %t A356750 Select[Range[2,12000], OddQ[#] && PalindromeQ[#] && OddQ[Length[Transpose[FactorInteger[#]][[2]]]] &] %o A356750 (Python) %o A356750 from sympy import isprime, factorint %o A356750 from itertools import count, islice, product %o A356750 def cond(n): return n&1 and (isprime(n) or len(factorint(n))&1) %o A356750 def oddpals(): # generator of odd palindromes %o A356750 yield from [1, 3, 5, 7, 9] %o A356750 for d in count(2): %o A356750 for first in "13579": %o A356750 for p in product("0123456789", repeat=(d-2)//2): %o A356750 left = "".join(p); right = left[::-1] %o A356750 for mid in [[""], "0123456789"][d%2]: %o A356750 yield int(first + left + mid + right + first) %o A356750 def agen(): yield from filter(cond, oddpals()) %o A356750 print(list(islice(agen(), 58))) # _Michael S. Branicky_, Aug 25 2022 %o A356750 (PARI) ispal(n) = my(d1=digits(n)); d1 == Vecrev(d1) %o A356750 forstep(k=3,10^6,2,if(ispal(k)&&omega(k)%2==1,print1(k,", "))) \\ _Alexandru Petrescu_, Sep 10 2022 %K A356750 nonn,base %O A356750 1,1 %A A356750 _Tanya Khovanova_, Aug 25 2022