Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #26 Nov 26 2024 15:59:22
%S 1,16,64,81,256,625,729,1024,1296,2401,4096,6561,10000,14641,15625,
%T 16384,20736,28561,38416,46656,50625,59049,65536,83521,104976,117649,
%U 130321,160000,194481,234256,262144,279841,331776,390625,456976,531441,614656,707281,810000,923521,1000000
%N Squares of perfect powers.
%H Amiram Eldar, <a href="/A340588/b340588.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A001597(n)^2.
%F a(n+1) = A062965(n) + 1. - _Hugo Pfoertner_, Sep 29 2020
%F Sum_{k>1} 1/(a(k) - 1) = 7/4 - Pi^2/6 = 7/4 - zeta(2).
%F Sum_{k>1} 1/a(k) = Sum_{k>=2} mu(k)*(1-zeta(2*k)).
%p q:= n-> is(igcd(seq(i[2], i=ifactors(n)[2]))<>2):
%p select(q, [i^2$i=1..1000])[]; # _Alois P. Heinz_, Nov 26 2024
%t Join[{1}, (Select[Range[2000], GCD @@ FactorInteger[#][[All, 2]] > 1 &])^2]
%o (Python)
%o from sympy import mobius, integer_nthroot
%o def A340588(n):
%o 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())))
%o kmin, kmax = 1,2
%o while f(kmax) >= kmax:
%o kmax <<= 1
%o while True:
%o kmid = kmax+kmin>>1
%o if f(kmid) < kmid:
%o kmax = kmid
%o else:
%o kmin = kmid
%o if kmax-kmin <= 1:
%o break
%o return kmax**2 # _Chai Wah Wu_, Aug 14 2024
%Y Cf. A000290, A001597, A062965, A072102, A117453, A131605.
%Y Cf. A153158 (complement within positive squares).
%K nonn
%O 1,2
%A _Terry D. Grant_, Sep 21 2020