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.

A239696 Smallest number m such that m and reverse(m) each have exactly n distinct prime factors.

Original entry on oeis.org

2, 6, 66, 858, 6006, 204204, 10444434, 208888680, 6172882716, 231645546132, 49795711759794, 2400532020354468, 477566276048801940, 24333607174192936620
Offset: 1

Views

Author

Derek Orr, Mar 24 2014

Keywords

Comments

a(15) > 10^21. - Max Alekseyev, Feb 16 2024

Examples

			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.
		

Crossrefs

Programs

  • PARI
    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)));
    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
  • 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 len(list(factorint(n).values())) == x:
          if len(list(factorint(Rev(n)).values())) == x:
            return n
          else:
            n += 1
        else:
          n += 1
    x = 1
    while x < 50:
      print(RevFact(x))
      x += 1
    

Extensions

a(8)-a(9) from Giovanni Resta, Mar 28 2014
a(10)-a(12) from Daniel Suteu, Feb 07 2023
a(13) from Michael S. Branicky, Feb 14 2023
a(14) from Max Alekseyev, Feb 15 2024