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.

A141242 a(n) is the number of divisors of the n-th positive integer with a prime number of divisors. In other words, a(n) is the number of divisors of A009087(n).

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 7, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Leroy Quet, Jun 16 2008

Keywords

Comments

A009087(n) is of the form p^(a(n)-1), where p is some prime.

Crossrefs

Programs

  • Mathematica
    DivisorSigma[0, #] &@ Select[Range@ 500, PrimeQ@ DivisorSigma[0, #] &] (* Michael De Vlieger, Aug 19 2017 *)
  • Python
    from sympy import primepi, integer_nthroot, primerange, factorint
    def A141242(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k-1)[0]) for k in primerange(x.bit_length()+1)))
        return list(factorint(bisection(f,n,n)).values())[0]+1 # Chai Wah Wu, Feb 22 2025

Formula

a(n) = A000005(A009087(n)).

Extensions

Extended by Ray Chandler, Jun 25 2009