login
A237912
Smallest number m (not ending in a 0) such that m and its digit reversal A004086(m) both have n prime factors (counted with multiplicity).
2
13, 15, 117, 126, 1386, 2576, 21708, 25515, 21168, 46848, 295245, 2937856, 6351048, 21989376, 217340928, 2154281472, 2196652032, 21120051456, 21122906112, 40915058688, 274148425728, 2150086519296, 2707602702336, 6167442456576, 21907217055744, 29798871072768, 420127895977984
OFFSET
1,1
COMMENTS
Palindromes are not included in this sequence since the reverse of a palindrome is the same number. See A076886 and A237913.
EXAMPLE
13 and 31 are both prime so a(1) = 13.
15 and 51 have two prime factors (3*5 and 3*17 respectively), so a(2) = 15.
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 = 1
..while n < 10**8:
....if rev(n) != n:
......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
....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(15)-a(21) from Giovanni Resta, Feb 23 2014
a(22)-a(27) from Max Alekseyev, Feb 07 2024
STATUS
approved