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”).

A117453
Perfect powers in more than one way.
12
1, 16, 64, 81, 256, 512, 625, 729, 1024, 1296, 2401, 4096, 6561, 10000, 14641, 15625, 16384, 19683, 20736, 28561, 32768, 38416, 46656, 50625, 59049, 65536, 83521, 104976, 117649, 130321, 160000, 194481, 234256, 262144, 279841, 331776, 390625
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
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
Sequence in context: A233330 A370787 A322449 * A374291 A340588 A352475
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Mar 16 2006
EXTENSIONS
More terms from Robert G. Wilson v, Apr 12 2006
STATUS
approved

  NODES
COMMUNITY 1
INTERN 1