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.

A084127 Prime factor >= other prime factor of n-th semiprime.

Original entry on oeis.org

2, 3, 3, 5, 7, 5, 7, 11, 5, 13, 11, 17, 7, 19, 13, 23, 7, 17, 11, 19, 29, 31, 13, 23, 37, 11, 41, 17, 43, 29, 13, 31, 47, 19, 53, 37, 23, 59, 17, 11, 61, 41, 43, 19, 67, 47, 71, 13, 29, 73, 31, 79, 53, 23, 83, 13, 59, 89, 61, 37, 17, 97, 67, 101, 29, 41, 103, 19, 71, 107, 43, 31
Offset: 1

Views

Author

Reinhard Zumkeller, May 15 2003

Keywords

Comments

Largest nontrivial divisor of n-th semiprime. [Juri-Stepan Gerasimov, Apr 18 2010]
Greater of the prime factors of A001358(n). - Jianing Song, Aug 05 2022

Crossrefs

Cf. A001358 (the semiprimes), A084126 (lesser of the prime factors of the semiprimes).

Programs

  • Haskell
    a084127 = a006530 . a001358  -- Reinhard Zumkeller, Nov 25 2012
    
  • Mathematica
    FactorInteger[#][[-1, 1]]& /@ Select[Range[1000], PrimeOmega[#] == 2&] (* Jean-François Alcover, Nov 17 2021 *)
  • PARI
    lista(nn) = {for (n=2, nn, if (bigomega(n)==2, f = factor(n); print1(f[length(f~),1], ", ")););} \\ Michel Marcus, Jun 05 2013
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, primefactors
    def A084127(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: 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 max(primefactors(bisection(f,n,n))) # Chai Wah Wu, Oct 23 2024

Formula

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

Extensions

Corrected by T. D. Noe, Nov 15 2006