login
A175064
a(1) = 1; for n >= 2, a(n) = number of ways h to write the n-th perfect power A001597(n) as m^k with m >= 2 and k >= 1.
10
1, 2, 2, 2, 3, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2
OFFSET
1,2
COMMENTS
Perfect powers with first occurrence of h >= 2: 4, 16, 64, 65536, 4096, ... [The perfect power corresponding to h is A175065(h) = 2^A005179(h). - Jianing Song, Oct 27 2024]
FORMULA
a(n) = A000005(A253641(A001597(n))) = A253642(n)+1. - M. F. Hasler, Jan 25 2015
EXAMPLE
For n = 11: A001597(11) = 64; there are 4 ways to write 64 as m^k: 64^1 = 8^2 = 4^3 = 2^6.
PROG
(Python)
from math import gcd
from sympy import mobius, integer_nthroot, divisor_count, factorint
def A175064(n):
if n == 1: return 1
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 divisor_count(gcd(*factorint(kmax).values())) # Chai Wah Wu, Aug 13 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Jan 23 2010
EXTENSIONS
Extended by T. D. Noe, Apr 21 2011
Definition clarified by Jonathan Sondow, Nov 30 2012
STATUS
approved