E054: Squarefree density via Möbius

Preview figure for E054

Tags: number-theory, quantitative-exploration, visualization, arithmetic-functions, mobius, summatory See: Valid Tags.

Highlights

  • Use \(\mu(n)^2\) as an indicator for squarefree integers.

  • Plot the running density and compare to \(6/\pi^2\).

Goal

Show how an arithmetic function encodes a classic density result.

Background (quick refresher)

Research question

How quickly does the empirical density of squarefree numbers approach \(6/\pi^2\)?

Method

  • Compute \(\mu(n)\) up to \(N\) and accumulate \(\sum_{n\le x}\mu(n)^2\).

  • Plot the ratio \(\frac{1}{x}\sum_{n\le x}\mu(n)^2\) with a reference line at \(6/\pi^2\).

How to run

  • make run EXP=e054

  • uv run python -m mathxlab.experiments.e054

Outputs

This experiment follows the standard output contract:

  • out/e054/figures/ — generated figures (PNG)

  • out/e054/report.md — short narrative report

  • out/e054/manifest.json — snapshot metadata for the gallery

Published run snapshot

If this experiment is included in the docs gallery, include the published snapshot (report + params).

  • n_max: 300000

  • observed squarefree proportion: 0.607927

  • theoretical density 6/pi^2: 0.607927

Figure:

  • fig_01_squarefree_density.png

params.json (snapshot)
{
  "n_max": 300000
}

References

See Apostol [1976], Tenenbaum [2015].