OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..17500 (* 10000 terms from John Cerkan *)
MATHEMATICA
Select[Range[1500], PalindromeQ[#]&&EvenQ[PrimeOmega[#]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 01 2020 *)
PROG
(Python)
from sympy import factorint
from itertools import product
def ispal(n): s = str(n); return s == s[::-1]
def pals(d, base=10): # all d-digit palindromes
digits = "".join(str(i) for i in range(base))
for p in product(digits, repeat=d//2):
if d > 1 and p[0] == "0": continue
left = "".join(p); right = left[::-1]
for mid in [[""], digits][d%2]: yield int(left + mid + right)
def ok(pal): return sum(factorint(pal).values())%2 == 0
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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jun 15 1998
EXTENSIONS
Corrected by Harvey P. Dale, Jan 01 2020
STATUS
approved