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

A340585
Noncube perfect powers.
2
4, 9, 16, 25, 32, 36, 49, 81, 100, 121, 128, 144, 169, 196, 225, 243, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2048, 2116, 2187, 2209, 2304, 2401, 2500
OFFSET
1,1
COMMENTS
This was the original definition of A239870. However, the true definition of that sequence seems to be slightly different.
LINKS
FORMULA
Sum_{n>=1} 1/a(n) = 1 - zeta(3) + Sum_{k>=2} mu(k)*(1-zeta(k)) = 1 - A002117 + A072102 = 0.6724074652... - Amiram Eldar, Jan 12 2021
MAPLE
filter:= proc(n) local g;
g:= igcd(op(ifactors(n)[2][.., 2]));
g > 1 and (g mod 3 <> 0)
end proc:
select(filter, [$1..10000]); # Robert Israel, Jan 12 2021
MATHEMATICA
Select[Range[2, 2500], (g = GCD @@ FactorInteger[#][[;; , 2]]) > 1 && !Divisible[g, 3] &] (* Amiram Eldar, Jan 12 2021 *)
PROG
(PARI) for(n=2, 2500, if( ispower(n) % 3, print1(n, ", ")))
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot
def A340585(n):
def f(x): return int(n+x-isqrt(x)+sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(5, 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 # Chai Wah Wu, Aug 14 2024
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jan 12 2021
STATUS
approved