OFFSET
1,2
PROG
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot
def A072778(n):
def f(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))
return 2-(m:=n.bit_length())+sum(f(integer_nthroot(n, k)[0]) for k in range(1, m)) # Chai Wah Wu, Aug 19 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 10 2002
STATUS
approved