OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
FORMULA
GCD(A052409(a(n)), 6) = 1. - Reinhard Zumkeller, Mar 28 2014
Sum_{n>=1} 1/a(n) = 1 - zeta(2) - zeta(3) + zeta(6) + Sum_{k>=2} mu(k)*(1-zeta(k)) = 0.0448164603... - Amiram Eldar, Dec 21 2020
EXAMPLE
279936 is included since 279936 = 6^7 is a power and this is not a square or a cube.
59049 = 9^5 not included since this is a square 243^2 = 59049.
32768 = 8^5 not included since this is a cube 32^3 = 32768.
PROG
(PARI) for(i=1, 2^25, if(gcd(ispower(i), 6) == 1, print(i)))
(Haskell)
import Data.Map (singleton, findMin, deleteMin, insert)
a239728 n = a239728_list !! (n-1)
a239728_list = f 9 (3, 2) (singleton 4 (2, 2)) where
f zz (bz, be) m
| xx < zz && gcd 6 be > 1 =
f zz (bz, be+1) (insert (bx*xx) (bx, be+1) $ deleteMin m)
| xx < zz = xx :
f zz (bz, be+1) (insert (bx*xx) (bx, be+1) $ deleteMin m)
| xx > zz = f (zz+2*bz+1) (bz+1, 2) (insert (bz*zz) (bz, 3) m)
| otherwise = f (zz + 2 * bz + 1) (bz + 1, 2) m
where (xx, (bx, be)) = findMin m
-- Reinhard Zumkeller, Mar 28 2014
(Python)
from sympy import mobius, integer_nthroot
def A239728(n):
def f(x): return int(n+x-integer_nthroot(x, 5)[0]+sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(7, 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,easy,changed
AUTHOR
Jeppe Stig Nielsen, Mar 25 2014
STATUS
approved