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.
%I A239696 #28 May 22 2025 10:21:37 %S A239696 2,6,66,858,6006,204204,10444434,208888680,6172882716,231645546132, %T A239696 49795711759794,2400532020354468,477566276048801940, %U A239696 24333607174192936620 %N A239696 Smallest number m such that m and reverse(m) each have exactly n distinct prime factors. %C A239696 a(15) > 10^21. - _Max Alekseyev_, Feb 16 2024 %e A239696 The first nontrivial example is a(6) = 204204. 204204 = 2^2*3*7*11*13*17 (6 distinct prime factors). 402402 = 2*3*7*11*13*67 (6 distinct prime factors). Since 204204 is the smallest number with this property, a(6) = 204204. %o A239696 (Python) %o A239696 import sympy %o A239696 from sympy import factorint %o A239696 def Rev(x): %o A239696 rev = '' %o A239696 for i in str(x): %o A239696 rev = i + rev %o A239696 return int(rev) %o A239696 def RevFact(x): %o A239696 n = 2 %o A239696 while n < 10**8: %o A239696 if len(list(factorint(n).values())) == x: %o A239696 if len(list(factorint(Rev(n)).values())) == x: %o A239696 return n %o A239696 else: %o A239696 n += 1 %o A239696 else: %o A239696 n += 1 %o A239696 x = 1 %o A239696 while x < 50: %o A239696 print(RevFact(x)) %o A239696 x += 1 %o A239696 (PARI) %o A239696 generate(A, B, n) = A=max(A, vecprod(primes(n))); (f(m, p, j) = my(list=List()); forprime(q=p, sqrtnint(B\m, j), my(v=m*q); while(v <= B, if(j==1, if(v>=A && omega(fromdigits(Vecrev(digits(v)))) == n, listput(list, v)), if(v*(q+1) <= B, list=concat(list, f(v, q+1, j-1)))); v *= q)); list); vecsort(Vec(f(1, 2, n))); %o A239696 a(n) = my(x=vecprod(primes(n)), y=2*x); while(1, my(v=generate(x, y, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ _Daniel Suteu_, Feb 07 2023 %Y A239696 Cf. A046399, A113548. %K A239696 nonn,base,more %O A239696 1,1 %A A239696 _Derek Orr_, Mar 24 2014 %E A239696 a(8)-a(9) from _Giovanni Resta_, Mar 28 2014 %E A239696 a(10)-a(12) from _Daniel Suteu_, Feb 07 2023 %E A239696 a(13) from _Michael S. Branicky_, Feb 14 2023 %E A239696 a(14) from _Max Alekseyev_, Feb 15 2024