OFFSET
1,1
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
Number 525 = 3*5^2*7 has 3 prime factors 3, 5, and 7. Thus, it is in the sequence.
MATHEMATICA
Select[Range[2, 12000], OddQ[#] && PalindromeQ[#] && OddQ[Length[Transpose[FactorInteger[#]][[2]]]] &]
PROG
(Python)
from sympy import isprime, factorint
from itertools import count, islice, product
def cond(n): return n&1 and (isprime(n) or len(factorint(n))&1)
def oddpals(): # generator of odd palindromes
yield from [1, 3, 5, 7, 9]
for d in count(2):
for first in "13579":
for p in product("0123456789", repeat=(d-2)//2):
left = "".join(p); right = left[::-1]
for mid in [[""], "0123456789"][d%2]:
yield int(first + left + mid + right + first)
def agen(): yield from filter(cond, oddpals())
print(list(islice(agen(), 58))) # Michael S. Branicky, Aug 25 2022
(PARI) ispal(n) = my(d1=digits(n)); d1 == Vecrev(d1)
forstep(k=3, 10^6, 2, if(ispal(k)&&omega(k)%2==1, print1(k, ", "))) \\ Alexandru Petrescu, Sep 10 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Tanya Khovanova, Aug 25 2022
STATUS
approved