OFFSET
1,1
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
LINKS
Zak Seidov, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Semiprime
FORMULA
MATHEMATICA
FactorInteger[#][[-1, 1]]& /@ Select[Range[1000], PrimeOmega[#] == 2&] (* Jean-François Alcover, Nov 17 2021 *)
PROG
(Haskell)
a084127 = a006530 . a001358 -- Reinhard Zumkeller, Nov 25 2012
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 15 2003
EXTENSIONS
Corrected by T. D. Noe, Nov 15 2006
STATUS
approved