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”).
%I #23 Sep 16 2024 15:05:51
%S 27,125,243,625,1000,1944,2187,3375,4000,4913,10000,15552,16807,17496,
%T 27648,34992,50625,83349,107811,139968,157216,194481,250000,279841,
%U 389017,390224,405000,614125,628864,810000,970299,1366875,1372000,1874048,2000000,2238728,2248091
%N The smaller of a pair of successive cubefull numbers without a powerful number between them.
%H Chai Wah Wu, <a href="/A371189/b371189.txt">Table of n, a(n) for n = 1..2123</a> (terms 1..500 from Amiram Eldar)
%H <a href="/index/Pow#powerful">Index entries for sequences related to powerful numbers</a>.
%e 27 = 3^3 is a term since it is cubefull, and the next powerful number, 32 = 2^5, is also cubefull.
%t cubQ[n_] := n == 1 || AllTrue[FactorInteger[n][[;; , 2]], # > 2 &];
%t seq[max_] := Module[{pows = Union[Flatten[Table[i^2*j^3, {j, 1, Surd[max, 3]}, {i, 1, Sqrt[max/j^3]}]]], ind = {}, d}, Do[If[cubQ[pows[[k]]], AppendTo[ind, k]], {k, 1, Length[pows]}]; d = Differences[ind]; pows[[ind[[Position[d, 1] // Flatten]]]]]; seq[10^6]
%o (PARI) iscubefull(n) = n == 1 || vecmin(factor(n)[, 2]) > 2;
%o lista(mx) = {my(s = List(), is1, is2); for(j = 1, sqrtnint(mx, 3), for(i = 1, sqrtint(mx\j^3), listput(s, i^2 * j^3))); s = Set(s); is1 = 1; for(i = 2, #s, is2 = iscubefull(s[i]); if(is1 && is2, print1(s[i-1], ", ")); is1 = is2);}
%o (Python)
%o from math import isqrt, gcd
%o from sympy import mobius, integer_nthroot, factorint
%o def A371189_gen(): # generator of terms
%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 c, l, j = x-squarefreepi(integer_nthroot(x,3)[0]), 0, isqrt(x)
%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 return c+l
%o def g(x):
%o c = x
%o for w in range(1,integer_nthroot(x,5)[0]+1):
%o if all(d<=1 for d in factorint(w).values()):
%o for y in range(1,integer_nthroot(z:=x//w**5,4)[0]+1):
%o if gcd(w,y)==1 and all(d<=1 for d in factorint(y).values()):
%o c -= integer_nthroot(z//y**4,3)[0]
%o return c
%o m, w = 1, 1
%o for n in count(2):
%o k = bisection(lambda x:g(x)+n,m,m)
%o if (a:=f(k))-w== k-1-m:
%o yield m
%o m, w = k, a # _Chai Wah Wu_, Sep 15 2024
%Y Cf. A001694, A036966.
%K nonn
%O 1,1
%A _Amiram Eldar_, Mar 14 2024