OFFSET
1,2
COMMENTS
Corresponding values of ways for a(n) in A175066(n) for n >= 2. - Jaroslav Krizek, Jan 23 2010
Perfect powers expressible as m^k with k composite. - Charlie Neder, Mar 02 2019
LINKS
Donovan Johnson, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Perfect Power
EXAMPLE
16 = 2^4 = 4^2.
MATHEMATICA
s = Split@ Sort@ Flatten@ Table[ n^i, {n, 2, Sqrt@456975}, {i, 2, Log[n, 456975]}]; Union@ Flatten@ Select[s, Length@ # > 1 &] (* Robert G. Wilson v, Apr 12 2006 *)
PROG
(Python)
from sympy import mobius, integer_nthroot, primerange
def A117453(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return int(n+sum(mobius(k)*(integer_nthroot(x, k)[0]-1+sum(integer_nthroot(x, p*k)[0]-1 for p in primerange((x//k).bit_length()))) for k in range(1, x.bit_length())))
return bisection(f, n, n) # Chai Wah Wu, Nov 24 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Mar 16 2006
EXTENSIONS
More terms from Robert G. Wilson v, Apr 12 2006
STATUS
approved