A072358 Number of cubefree numbers <= n which are not squarefree.
0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 10, 10, 10, 11, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Haskell
a072358 n = a072358_list !! (n-1) a072358_list = scanl1 (+) $ zipWith (*) a212793_list $ map (1 -) a008966_list -- Reinhard Zumkeller, May 27 2012
-
Mathematica
Accumulate @ Table[Boole[Max @ FactorInteger[n][[;; , 2]] == 2], {n, 1, 100}] (* Amiram Eldar, Feb 16 2021 *)
-
Python
from math import isqrt from sympy import mobius, integer_nthroot def A072358(n): return sum(mobius(k)*(n//k**3-n//k**2) for k in range(1, integer_nthroot(n,3)[0]+1))-sum(mobius(k)*(n//k**2) for k in range(integer_nthroot(n,3)[0]+1,isqrt(n)+1)) # Chai Wah Wu, Aug 12 2024
Formula
a(n) ~ c * n, where c = 1/zeta(3) - 1/zeta(2) = A088453 - A059956 = 0.22398... - Amiram Eldar, Feb 16 2021