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.

A091800 Largest n-digit number with maximal number of distinct prime divisors.

Original entry on oeis.org

6, 90, 990, 9870, 99330, 930930, 9699690, 99981420, 999068070, 9592993410, 99978788910, 999890501610, 9814524629910, 99999887777790, 999192361827660, 9999999768941490, 99992911041433410, 997799870344687410, 9999847102571786460, 99987077573596883670, 999999011467253427630, 9999928946485603635510
Offset: 1

Views

Author

Amarnath Murthy, Feb 21 2004

Keywords

Examples

			a(4) = 9870 as the largest number of distinct prime factors any 4-digit number can have and any number 9871 <= k <= 9999 has fewer than 5 prime factors. - _David A. Corneth_, Aug 19 2025
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k=0, p=1, r=1, t=10^n}, While[r < t, p = NextPrime[p]; r *= p; k++]; k--; m = t-1; While[PrimeNu[m] != k, m--]; m]; Array[a, 8] (* Amiram Eldar, Mar 03 2020 *)
  • Python
    from sympy import nextprime, factorint
    def A091800(n: int) -> int:
        k, p, r, t = 0, 1, 1, 10**n
        while r < t:
           p = nextprime(p)
           r *= p
           k += 1
        m = t - 1
        while len(factorint(m)) != k - 1: m -= 1
        return m # John Reimer Morales, Aug 18 2025
    
  • Python
    # see linked program

Extensions

Edited, corrected and extended by Ray Chandler, Feb 23 2004
a(10)-a(12) from Amiram Eldar, Mar 03 2020
a(13) from Giovanni Resta, Mar 04 2020
a(14) onwards from John Reimer Morales and David A. Corneth, Aug 19 2025