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-6 of 6 results.

A082619 Duplicate of A046399.

Original entry on oeis.org

1, 2, 6, 66, 858, 6006, 222222, 22444422, 244868442, 6434774346
Offset: 0

Views

Author

Keywords

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

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

A309565 Least base-10 palindrome whose factorization includes an arbitrary number m of prime factors, with n <= m of them, all counted with multiplicity, being base-10 palindromes.

Original entry on oeis.org

1, 2, 4, 8, 88, 252, 2772, 29792, 2112, 4224, 8448, 489984, 48384, 2977792, 8634368, 405504, 40955904, 405909504, 23080108032, 25135153152, 677707776, 2557800087552, 21128282112, 633498894336, 23255666655232, 8691508051968, 29142024192, 65892155129856, 4815463645184
Offset: 0

Views

Author

Hugo Pfoertner, Aug 08 2019

Keywords

Comments

Similar to A046385, which excludes prime factors that are not base-10 palindromes, i.e. m = n.

Examples

			a(7) = 29792 because it is the smallest number that has a factorization 2^5 * 7^2 * 19 including 7 palindromic prime factors: 2, 2, 2, 2, 2, 7, 7.
A046385(7) = 82728 = 2^3 * 3^3 * 383 is the smallest number with 7 palindromic prime factors and no non-palindromic prime factors.
a(20) = A046385(20) = 677707776 = 2^16 * 3^3 * 383.
		

Crossrefs

Programs

  • PARI
    is_A002113(n)={Vecrev(n=digits(n))==n};
    haspalf(P)={my(x=factor(P),nf=#x[,2],m=0);for(j=1,nf,if(is_A002113(x[j,1]),m+=x[j,2]));m};
    for(d=1,16,for(k=1,oo,if(is_A002113(k),if(haspalf(k)==d,print1(k,", ");break)))) \\ Hugo Pfoertner, Aug 08 2019 using is_A002113 by M. F. Hasler

Extensions

More terms from Giovanni Resta, Aug 08 2019

A372488 The smallest nonpalindromic number that shares n or more distinct prime factors with the prime factors of its reverse.

Original entry on oeis.org

10, 12, 24, 264, 8580, 24024, 2168166, 67897830, 2448684420
Offset: 0

Views

Author

Scott R. Shannon, May 02 2024

Keywords

Comments

When a number is reversed any leading 0's are dropped; the resulting number may be palindromic.

Examples

			a(3) = 264 as 264 = 2^3 * 3 * 11 and 264 in reverse is 462 = 2 * 3 * 7 * 11, which share three prime factors 2, 3, and 11.
		

Crossrefs

A348050 Palindromes setting a new record of their number of prime divisors A001222.

Original entry on oeis.org

1, 2, 4, 8, 88, 252, 2112, 4224, 8448, 44544, 48384, 405504, 4091904, 405909504, 677707776, 4285005824, 21128282112, 29142024192, 4815463645184, 445488555884544, 27874867776847872, 40539458585493504, 63556806860865536, 840261068860162048, 4870324782874230784
Offset: 1

Views

Author

Hugo Pfoertner, Oct 25 2021

Keywords

Crossrefs

Programs

  • Mathematica
    m=0;lst=Union@Flatten[Table[{FromDigits@Join[s=IntegerDigits@n,Reverse@s],FromDigits@Join[w=IntegerDigits@n,Rest@Reverse@w]},{n,10^5}]];Do[t=PrimeOmega@lst[[n]];If[t>m,Print@lst[[n]];m=t],{n,Length@lst}] (* Giorgos Kalogeropoulos, Oct 25 2021 *)
  • Python
    from sympy import factorint
    from itertools import product
    def palsthru(maxdigits):
        midrange = [[""], [str(i) for i in range(10)]]
        for digits in range(1, maxdigits+1):
            for p in product("0123456789", repeat=digits//2):
                left = "".join(p)
                if len(left) and left[0] == '0': continue
                for middle in midrange[digits%2]:
                    yield int(left+middle+left[::-1])
    def afind(maxdigits):
        record = -1
        for p in palsthru(maxdigits):
            f = factorint(p, multiple=True)
            if p > 0 and len(f) > record:
                record = len(f)
                print(p, end=", ")
    afind(10) # Michael S. Branicky, Oct 25 2021

Extensions

a(1) = 1 from David A. Corneth, Oct 25 2021
a(16)-a(19) from Giorgos Kalogeropoulos, Oct 25 2021
a(20) from Michael S. Branicky, Oct 25 2021
a(21)-a(25) from Chai Wah Wu, Oct 28 2021
Showing 1-6 of 6 results.