login
A387944
Number of squarefree composites <= n.
1
0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 10, 11, 11, 11, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 18, 19, 19, 19, 19, 20, 20, 20, 21, 22, 22, 22, 23, 24, 24, 24, 24, 25
OFFSET
1,10
COMMENTS
The partial sum of A354819 (characteristic function of A120944), counting the number of squarefree composites <= n.
The natural density of squarefree integers A005117 (including 1 and the primes) is 6/Pi^2 (see Hardy and Wright, Theorem 333). Because the primes form a set of density 0 (dens(A000040) = 0), the set of squarefree composites A120944 also has natural density 6/Pi^2 (approx. 60.79%).
Because the set of composite numbers A002808 are the disjoint union of squarefree composites A120944, proper prime powers A246547, and the mixed (neither squarefree nor prime-power) composites A126706, and since A120944 has natural density 6/Pi^2 (approx. 60.79%) while A246547 also have natural density 0 (dens(A246547) = 0), then A126706 has natural density 1 - 6/Pi^2 (approx. 39.21%).
REFERENCES
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford University Press (1975) Theorem 333, pages 269-270.
FORMULA
From Michael De Vlieger, Dec 03 2025: (Start)
a(n) = -1 + Sum_{i = 1..sqrt(n)} mu(i) * floor(n/i^2) - pi(n), where mu = A008683 and pi = A000720.
a(n) = A013928(n) - A000720(n) - 1. (End)
MATHEMATICA
Table[-1 + Sum[MoebiusMu[i]*Floor[n/i^2], {i, Floor@ Sqrt[n]}] - PrimePi[n], {n, 120}] (* Michael De Vlieger, Dec 03 2025 *)
PROG
(Python)
from math import isqrt
from sympy import mobius, primepi
def A387944(n): return sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1))-primepi(n)-1 # Chai Wah Wu, Dec 10 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles Kusniec, Dec 01 2025
STATUS
approved