cp's OEIS Frontend

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.

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).

This page as a plain text file.
%I A237912 #32 May 22 2025 10:21:36
%S A237912 13,15,117,126,1386,2576,21708,25515,21168,46848,295245,2937856,
%T A237912 6351048,21989376,217340928,2154281472,2196652032,21120051456,
%U A237912 21122906112,40915058688,274148425728,2150086519296,2707602702336,6167442456576,21907217055744,29798871072768,420127895977984
%N 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).
%C A237912 Palindromes are not included in this sequence since the reverse of a palindrome is the same number. See A076886 and A237913.
%e A237912 13 and 31 are both prime so a(1) = 13.
%e A237912 15 and 51 have two prime factors (3*5 and 3*17 respectively), so a(2) = 15.
%o A237912 (Python)
%o A237912 import sympy
%o A237912 from sympy import factorint
%o A237912 def rev(x):
%o A237912   rev = ''
%o A237912   for i in str(x):
%o A237912     rev = i + rev
%o A237912   return int(rev)
%o A237912 def RevFact(x):
%o A237912   n = 1
%o A237912   while n < 10**8:
%o A237912     if rev(n) != n:
%o A237912       if n % 10 != 0:
%o A237912         if sum(list(factorint(n).values())) == x:
%o A237912           if sum(list(factorint(rev(n)).values())) == x:
%o A237912             return n
%o A237912           else:
%o A237912             n += 1
%o A237912         else:
%o A237912           n += 1
%o A237912       else:
%o A237912         n += 1
%o A237912     else:
%o A237912       n += 1
%o A237912 x = 1
%o A237912 while x < 100:
%o A237912   print(RevFact(x))
%o A237912   x += 1
%Y A237912 Cf. A004086, A076886, A237913.
%K A237912 nonn,base
%O A237912 1,1
%A A237912 _Derek Orr_, Feb 15 2014
%E A237912 a(15)-a(21) from _Giovanni Resta_, Feb 23 2014
%E A237912 a(22)-a(27) from _Max Alekseyev_, Feb 07 2024