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.

Showing 1-2 of 2 results.

A335645 Smallest palindrome with exactly n distinct prime factors.

Original entry on oeis.org

1, 2, 6, 66, 858, 6006, 222222, 20522502, 244868442, 6172882716, 231645546132, 49795711759794, 2415957997595142, 495677121121776594, 22181673755737618122, 5521159517777159511255, 477552751050050157255774, 200345274602020206472543002
Offset: 0

Views

Author

Michael S. Branicky, Oct 02 2020

Keywords

Comments

max{A002110(n), A076886(n), A239696(n)} <= a(n) <= A046399(n).
No more terms with less than 17 digits.
Next term: 10^16 <= a(13) <= 495677121121776594.

Examples

			a(3) = 66 because 66 is the smallest palindromic number with 3 distinct prime factors: 2*3*11.
		

Crossrefs

Subsequence of A002113.

Programs

  • PARI
    omega_palindromes(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); if(q == 5 && v%2 == 0, next); while(v <= B, if(j==1, if(v>=A && fromdigits(Vecrev(digits(v))) == v, 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) = if(n==0, return(1)); my(x=vecprod(primes(n)), y=2*x); while(1, my(v=omega_palindromes(x, y, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Feb 05 2023
  • Python
    from sympy import factorint
    def A335645(n):
      d = 1
      while True:
        half = (d+1)//2
        for left in range(10**(half-1), 10**half):
          strleft = str(left)
          if d%2 == 0:
            m = int(strleft + strleft[::-1])
          else:
            m = int(strleft + (strleft[:-1])[::-1])
          if len(factorint(m)) == n:
            return m
        d += 1
    print([A335645(n) for n in range(8)]) # Michael S. Branicky, Oct 02 2020
    

Extensions

a(13) from Michael S. Branicky and David A. Corneth, Oct 03 2020
a(14) from David A. Corneth, Oct 03 2020
a(15) from Daniel Suteu, Feb 05 2023
a(16) from Michael S. Branicky, Feb 06 2023
a(17) from Michael S. Branicky, Feb 23 2023

A113548 Least non-palindromic number k such that k and its digital reversal both have exactly n prime divisors.

Original entry on oeis.org

13, 12, 132, 1518, 15015, 204204, 10444434, 241879638, 20340535215, 242194868916, 136969856585562, 2400532020354468, 484576809394483806, 200939345091539746692
Offset: 1

Views

Author

Ryan Propper and Robert G. Wilson v, Sep 21 2005

Keywords

Comments

This sequence does not allow ending in 0, else a(8) = 208888680, a(11) = 64635504163230 and a(13) = 477566276048801940. - Michael S. Branicky, Feb 14 2023

Examples

			a(1)=13=13 since 31=31,
a(2)=12=2^2*3 since 21=3*7,
a(3)=132=2^2*3*11 since 231=3*7*11,
...
a(7)=10444434=2*3*7*11*13*37*47 since 43444401=3*7*11*13*17*23*37,
a(8)=241879638=2*3*7*11*13*17*23*103 since 836978142=2*3*7*11*13*23*73*83.
		

Crossrefs

Programs

  • Mathematica
    r[n_] := FromDigits[ Reverse[ IntegerDigits[ n]]]; f[n_] := Block[{k = r[n], len = Length[ FactorInteger[n]]}, If[k != n && len == Length[ FactorInteger[ r[n]]], len, 0]]; t = Table[0, {10}]; Do[ a = f[n]; If[a > 0 && t[[a]] == 0, t[[a]] = n; Print[{a, n}]], {n, 107}]; t
  • 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), if(q==5 && m%2==0, next); my(v=m*q); while(v <= B, if(j==1, my(r=fromdigits(Vecrev(digits(v)))); if(v>=A && r != v && omega(r) == 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 18 2023

Formula

a(n) >= A239696(n). - Daniel Suteu, Feb 18 2023

Extensions

Edited and extended by Giovanni Resta, Jan 16 2006
a(9)-a(10) from Giovanni Resta, Feb 23 2014
a(11)-a(13) from Michael S. Branicky, Feb 14 2023
a(14) from Daniel Suteu, Feb 18 2023
Showing 1-2 of 2 results.