login
A340588
Squares of perfect powers.
3
1, 16, 64, 81, 256, 625, 729, 1024, 1296, 2401, 4096, 6561, 10000, 14641, 15625, 16384, 20736, 28561, 38416, 46656, 50625, 59049, 65536, 83521, 104976, 117649, 130321, 160000, 194481, 234256, 262144, 279841, 331776, 390625, 456976, 531441, 614656, 707281, 810000, 923521, 1000000
OFFSET
1,2
LINKS
FORMULA
a(n) = A001597(n)^2.
a(n+1) = A062965(n) + 1. - Hugo Pfoertner, Sep 29 2020
Sum_{k>1} 1/(a(k) - 1) = 7/4 - Pi^2/6 = 7/4 - zeta(2).
Sum_{k>1} 1/a(k) = Sum_{k>=2} mu(k)*(1-zeta(2*k)).
MATHEMATICA
Join[{1}, (Select[Range[2000], GCD @@ FactorInteger[#][[All, 2]] > 1 &])^2]
PROG
(Python)
from sympy import mobius, integer_nthroot
def A340588(n):
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 kmax**2 # Chai Wah Wu, Aug 14 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Terry D. Grant, Sep 21 2020
STATUS
approved