A072776 Exponents of powers of squarefree numbers.
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
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A052409.
Programs
-
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
Comments