OFFSET
1,1
EXAMPLE
252 is the smallest number such that 252 and its reverse (also 252) have 5 prime factors (2*2*3*3*7). So, a(5) = 252.
2576 is the smallest number such that 2576 and its reverse (6752) have 6 prime factors (2*2*2*2*7*23 and 2*2*2*2*2*211, respectively). So a(6) = 2576.
PROG
(Python)
import sympy
from sympy import factorint
def rev(x):
rev = ''
for i in str(x):
rev = i + rev
return int(rev)
def RevFact(x):
n = 2
while n < 10**8:
if n % 10 != 0:
if sum(list(factorint(n).values())) == x:
if sum(list(factorint(rev(n)).values())) == x:
return n
else:
n += 1
else:
n += 1
else:
n += 1
x = 1
while x < 100:
print(RevFact(x))
x += 1
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, Feb 15 2014
EXTENSIONS
a(17)-a(21) from Giovanni Resta, Feb 23 2014
a(22)-a(30) from Max Alekseyev, Feb 08 2024
STATUS
approved
