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

A046399 Smallest squarefree palindrome with exactly n distinct prime factors.

Original entry on oeis.org

1, 2, 6, 66, 858, 6006, 222222, 22444422, 244868442, 6434774346, 438024420834, 50146955964105, 2415957997595142, 495677121121776594, 22181673755737618122, 5521159517777159511255, 477552751050050157255774
Offset: 0

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

Initial terms of sequences A046392-A046398.

Examples

			a(4) = 858 = 2*3*11*13.
		

References

  • J.-P. Delahaye, Merveilleux nombres premiers ("Amazing primes"), p. 315, Pour la Science, Paris 2000.

Crossrefs

Programs

  • Mathematica
    r[n_] := FromDigits[Reverse[IntegerDigits[n]]]; Do[k = 1; While[r[k] != k || !SquareFreeQ[k] || Length[Select[Divisors[k], PrimeQ]] != n, k++ ]; Print[k], {n, 0, 30}] (* Ryan Propper, Sep 16 2005 *)

Extensions

Edited by N. J. A. Sloane, Dec 06 2008 at the suggestion of R. J. Mathar
a(10)-a(13) from Donovan Johnson, Oct 03 2011
a(14)-a(15) from David A. Corneth, Oct 03 2020
a(15) corrected by Daniel Suteu, Feb 05 2023
a(16) from Michael S. Branicky, Feb 08 2023

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

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

Original entry on oeis.org

13, 15, 117, 126, 1386, 2576, 21708, 25515, 21168, 46848, 295245, 2937856, 6351048, 21989376, 217340928, 2154281472, 2196652032, 21120051456, 21122906112, 40915058688, 274148425728, 2150086519296, 2707602702336, 6167442456576, 21907217055744, 29798871072768, 420127895977984
Offset: 1

Views

Author

Derek Orr, Feb 15 2014

Keywords

Comments

Palindromes are not included in this sequence since the reverse of a palindrome is the same number. See A076886 and A237913.

Examples

			13 and 31 are both prime so a(1) = 13.
15 and 51 have two prime factors (3*5 and 3*17 respectively), so a(2) = 15.
		

Crossrefs

Programs

  • 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 = 1
      while n < 10**8:
        if rev(n) != n:
          if n % 10 != 0:
            if sum(list(factorint(n).values())) == x:
              if sum(list(factorint(rev(n)).values())) == x:
                return n
              else:
                n += 1
            else:
              n += 1
          else:
            n += 1
        else:
          n += 1
    x = 1
    while x < 100:
      print(RevFact(x))
      x += 1

Extensions

a(15)-a(21) from Giovanni Resta, Feb 23 2014
a(22)-a(27) from Max Alekseyev, Feb 07 2024

A237913 Smallest number m > 1 (not ending in a 0) such that m and the digit reversal of m have n prime factors (counted with multiplicity). Palindromes are included.

Original entry on oeis.org

2, 4, 8, 88, 252, 2576, 21708, 2112, 4224, 8448, 44544, 48384, 2977792, 21989376, 405504, 4091904, 441606144, 405909504, 886898688, 677707776, 4285005824, 276486684672, 21128282112, 633498894336, 2701312131072, 6739855589376, 29142024192, 65892155129856, 4815463645184, 445488555884544
Offset: 1

Views

Author

Derek Orr, Feb 15 2014

Keywords

Examples

			252 is the smallest number such that 252 and its reverse (also 252) have 5 prime factors (2*2*3*3*7). So, a(5) = 252.
2576 is the smallest number such that 2576 and its reverse (6752) have 6 prime factors (2*2*2*2*7*23 and 2*2*2*2*2*211, respectively). So a(6) = 2576.
		

Crossrefs

Programs

  • 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 n % 10 != 0:
          if sum(list(factorint(n).values())) == x:
            if sum(list(factorint(rev(n)).values())) == x:
              return n
            else:
              n += 1
          else:
            n += 1
        else:
          n += 1
    x = 1
    while x < 100:
      print(RevFact(x))
      x += 1

Formula

a(n) = min{A076886(n+1), A237912(n)}

Extensions

a(17)-a(21) from Giovanni Resta, Feb 23 2014
a(22)-a(30) from Max Alekseyev, Feb 08 2024
Showing 1-4 of 4 results.