OFFSET
1,1
COMMENTS
Numbers k such that every prime in the prime factorization of k is raised to the same power > 1; k is a term iff k/A007947(k)^m = 1 for some m > 1. - David James Sycamore, Jun 12 2024
LINKS
Stanislav Sykora and Reinhard Zumkeller, Table of n, a(n) for n = 1..20000 (first 10000 terms from Reinhard Zumkeller)
FORMULA
Sum_{n>=1} 1/a(n) = Sum_{n>=2} mu(n)^2/(n*(n-1)) = Sum_{n>=2} (zeta(n)/zeta(2*n) - 1) = 0.8486338679... (A368250). - Amiram Eldar, Jul 22 2020
EXAMPLE
The number 144 = 12^2 is not a member because 12 is not squarefree.
64 = 2^6 and 49 = 7^2 are members because, though not squarefree, they are powers of the squarefree numbers 2 and 7, respectively. Note that 64 is included even though it is also a square of a nonsquarefree number. - Stanislav Sykora, Jul 11 2014
MATHEMATICA
Select[Range[2000], Length[u = Union[FactorInteger[#][[All, 2]]]] == 1 && u[[1]] > 1 &] (* Jean-François Alcover, Mar 27 2013 *)
PROG
(Haskell)
import Data.Map (singleton, findMin, deleteMin, insert)
a072777 n = a072777_list !! (n-1)
a072777_list = f 9 (drop 2 a005117_list) (singleton 4 (2, 2)) where
f vv vs'@(v:ws@(w:_)) m
| xx < vv = xx : f vv vs' (insert (bx*xx) (bx, ex+1) $ deleteMin m)
| xx > vv = vv : f (w*w) ws (insert (v^3) (v, 3) m)
where (xx, (bx, ex)) = findMin m
-- Reinhard Zumkeller, Apr 06 2014
(PARI) BelongsToA(n) = {my(f, k, e); if(n == 1, return(0));
f = factor(n); e = f[1, 2]; if(e == 1, return(0));
for(k = 2, #f[, 2], if(f[k, 2] != e, return(0))); return(1); }
Ntest(nmax, test) = {my(k = 1, n = 0, v); v = vector(nmax); while(1, n++; if(test(n), v[k] = n; k++; if(k > nmax, break)); ); return(v); }
a = Ntest(20000, BelongsToA) \\ Note: not very efficient. - Stanislav Sykora, Jul 11 2014
(PARI) is(n)=ispower(n, , &n) && issquarefree(n) \\ Charles R Greathouse IV, Oct 16 2015
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot
def A072777(n):
def g(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))-1
def f(x): return n-1+x-sum(g(integer_nthroot(x, k)[0]) 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 # Chai Wah Wu, Aug 19 2024
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Reinhard Zumkeller, Jul 10 2002
STATUS
approved