Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 Sep 14 2024 12:30:54
%S 8,27,32,72,108,125,128,200,216,243,288,343,392,432,500,512,648,675,
%T 800,864,968,972,1000,1125,1152,1323,1331,1352,1372,1568,1728,1800,
%U 1944,2000,2048,2187,2197,2312,2592,2700,2744,2888,3087,3125,3200,3267,3375
%N Numbers whose factors are primes raised to powers >= 2 and are not perfect squares.
%C Powerful numbers (A001694) that are not perfect squares. - _T. D. Noe_, May 03 2006
%H Amiram Eldar, <a href="/A102834/b102834.txt">Table of n, a(n) for n = 1..10000</a>
%F Sum_{n>=1} 1/a(n)^s = zeta(2*s)*(zeta(3*s)/zeta(6*s) - 1), s > 1/2. - _Amiram Eldar_, Apr 06 2023
%t Powerful[n_Integer] := (n==1) || Min[Transpose[FactorInteger[n]][[2]]]>1; Select[Range[10000], Powerful[ # ] && !IntegerQ[Sqrt[ # ]]&] - _T. D. Noe_, May 03 2006
%o (PARI) omnipnotsq(n,m)= local(a,x,j,fl=0); for(x=1,n, a=factor(x); for(j=1,omega(x), if(a[j,2]>= m,fl=1,fl=0;break); ); if(fl&issquare(x)==0,print1(x",")) )
%o (PARI) is(n)=ispowerful(n) && !issquare(n) \\ _Charles R Greathouse IV_, Oct 19 2015
%o (Python)
%o from math import isqrt
%o from sympy import integer_nthroot, mobius
%o def A102834(n):
%o def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
%o def bisection(f,kmin=0,kmax=1):
%o while f(kmax) > kmax: kmax <<= 1
%o while kmax-kmin > 1:
%o kmid = kmax+kmin>>1
%o if f(kmid) <= kmid:
%o kmax = kmid
%o else:
%o kmin = kmid
%o return kmax
%o def f(x):
%o j = isqrt(x)
%o c, l = n+x+j, 0
%o while j>1:
%o k2 = integer_nthroot(x//j**2,3)[0]+1
%o w = squarefreepi(k2-1)
%o c -= j*(w-l)
%o l, j = w, isqrt(x//k2**3)
%o c -= squarefreepi(integer_nthroot(x,3)[0])-l
%o return c
%o return bisection(f,n,n) # _Chai Wah Wu_, Sep 13 2024
%Y Cf. A000290, A001694.
%K easy,nonn
%O 1,1
%A _Cino Hilliard_, Feb 27 2005