OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Rafael Jakimczuk and Matilde Lalín, The Number of Prime Factors on Average in Certain Integer Sequences, Journal of Integer Sequences, Vol. 25 (2022), Article 22.2.3.
Eric Weisstein's World of Mathematics, Perfect Powers.
Eric Weisstein's World of Mathematics, Prime Factor.
FORMULA
MATHEMATICA
PrimeOmega[Select[Range[10^4], # == 1 || GCD @@ FactorInteger[#][[;; , 2]] > 1 &]] (* Amiram Eldar, Feb 18 2023 *)
PROG
(Haskell)
a076399 n = a001222 (a025478 n) * a025479 n
-- Reinhard Zumkeller, Mar 28 2014
(PARI) is(n) = n==1 || ispower(n);
apply(bigomega, select(is, [1..5000])) \\ Amiram Eldar, Feb 18 2023
(Python)
from sympy import mobius, integer_nthroot, primeomega
def A076399(n):
def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
return int(primeomega(kmax)) # Chai Wah Wu, Aug 14 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 09 2002
STATUS
approved