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

A182648 a(n) is the largest n-digit number with exactly 4 divisors.

Original entry on oeis.org

8, 95, 998, 9998, 99998, 999997, 9999998, 99999997, 999999991, 9999999997, 99999999997, 999999999997, 9999999999989, 99999999999997, 999999999999998, 9999999999999994, 99999999999999989, 999999999999999993, 9999999999999999991, 99999999999999999983
Offset: 1

Views

Author

Jaroslav Krizek, Nov 27 2010

Keywords

Comments

a(n) is the largest n-digit number of the form p^3 or p^1*q^1, (p, q = distinct primes).
Large overlap with A098450 which considers p^2 and p*q with n digits. - R. J. Mathar, Apr 23 2024

Crossrefs

Subsequence of A030513.

Programs

  • Mathematica
    Table[k=10^n-1; While[DivisorSigma[0,k] != 4, k--]; k, {n,10}]
    lnd4[n_]:=Module[{k=10^n-1},While[DivisorSigma[0,k]!=4,k--];k]; Array[lnd4,20] (* Harvey P. Dale, Aug 20 2024 *)
  • Python
    from sympy import divisors
    def a(n):
        k = 10**n - 1
        divs = -1
        while divs != 4:
          k -= 1
          divs = 0
          for d in divisors(k, generator=True):
            divs += 1
            if divs > 4: break
        return k
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Jun 10 2021

Formula

A000005(a(n)) = 4.

Extensions

a(19) and beyond from Michael S. Branicky, Jun 10 2021
Showing 1-1 of 1 results.