A067259 - OEIS (original) (raw)
A067259
Cubefree numbers which are not squarefree.
36
4, 9, 12, 18, 20, 25, 28, 36, 44, 45, 49, 50, 52, 60, 63, 68, 75, 76, 84, 90, 92, 98, 99, 100, 116, 117, 121, 124, 126, 132, 140, 147, 148, 150, 153, 156, 164, 169, 171, 172, 175, 180, 188, 196, 198, 204, 207, 212, 220, 225, 228
COMMENTS
The asymptotic density of this sequence is 1/zeta(3) - 1/zeta(2) = A088453 - A059956 = 0.22398... - Amiram Eldar, Jul 09 2020
LINKS
Eric Weisstein's World of Mathematics, Cubefree
Eric Weisstein's World of Mathematics, Squarefree
MATHEMATICA
f[n_]:=Union[Last/@FactorInteger[n]][[ -1]]; lst={}; Do[If[f[n]==2, AppendTo[lst, n]], {n, 2, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 12 2010 *)
Select[Range[500], Not[SquareFreeQ[#]] && FreeQ[FactorInteger[#], {_, k_ /; k>2}]&] (* Vaclav Kotesovec, Jul 09 2020 *)
PROG
(Haskell)
a067259 n = a067259_list !! (n-1)
a067259_list = filter ((== 2) . a051903) [1..]
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot
def f(x): return n+x+sum(mobius(k)*(x//k**2-x//k**3) for k in range(1, integer_nthroot(x, 3)[0]+1))+sum(mobius(k)*(x//k**2) for k in range(integer_nthroot(x, 3)[0]+1, isqrt(x)+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
EXTENSIONS
Unrelated comment removed by Jason Yuen, Apr 04 2025