OFFSET
1,1
COMMENTS
This was the original definition of A239870. However, the true definition of that sequence seems to be slightly different.
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..10000
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jan 12 2021
STATUS
approved