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.

A084126 Prime factor <= other prime factor of n-th semiprime.

Original entry on oeis.org

2, 2, 3, 2, 2, 3, 3, 2, 5, 2, 3, 2, 5, 2, 3, 2, 7, 3, 5, 3, 2, 2, 5, 3, 2, 7, 2, 5, 2, 3, 7, 3, 2, 5, 2, 3, 5, 2, 7, 11, 2, 3, 3, 7, 2, 3, 2, 11, 5, 2, 5, 2, 3, 7, 2, 13, 3, 2, 3, 5, 11, 2, 3, 2, 7, 5, 2, 11, 3, 2, 5, 7, 2, 3, 13, 2, 5, 3, 13, 3, 11, 2, 7, 2, 5, 3, 2, 2, 7, 17, 3, 5, 2, 13, 7, 2, 3, 5, 3, 2
Offset: 1

Views

Author

Reinhard Zumkeller, May 15 2003

Keywords

Comments

Lesser of the prime factors of A001358(n). - Jianing Song, Aug 05 2022

Crossrefs

Cf. A001358 (the semiprimes), A084127 (greater of the prime factors of the semiprimes).

Programs

  • Haskell
    a084126 = a020639 . a001358  -- Reinhard Zumkeller, Nov 25 2012
    
  • Mathematica
    FactorInteger[#][[1,1]]&/@Select[Range[500],PrimeOmega[#]==2&] (* Harvey P. Dale, Jun 25 2018 *)
  • Python
    from sympy import primepi, primerange, primefactors
    def A084126(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+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//p) for p in primerange(s+1)))
        return min(primefactors(bisection(f,n,n))) # Chai Wah Wu, Apr 03 2025

Formula

a(n) = A020639(A001358(n)).
a(n) = A001358(n)/A006530(A001358(n)). [corrected by Michel Marcus, Jul 18 2020]
a(n) = A001358(n)/A084127(n).