login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A072776
Exponents of powers of squarefree numbers.
5
1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
1,4
COMMENTS
A072774(n) = A072775(n)^a(n);
A072774(n) is squarefree iff a(n)=1.
LINKS
PROG
(Haskell)
a072776 n = a072776_list !! (n-1) -- a072776_list defined in A072774.
-- Reinhard Zumkeller, Apr 06 2014
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot, perfect_power
def A072776(n):
def g(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))-1
def f(x): return n-2+x-sum(g(integer_nthroot(x, k)[0]) for k in range(1, 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 1 if not (p:=perfect_power(kmax)) else p[1] # Chai Wah Wu, Aug 19 2024
CROSSREFS
Cf. A052409.
Sequence in context: A373835 A373369 A319864 * A077481 A278113 A242012
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 10 2002
STATUS
approved