# E011: Heuristic rarity of Mersenne primes ```{figure} ../_static/experiments/e011_hero.png :width: 80% :alt: Preview figure for E011 ``` **Tags:** `number-theory`, `quantitative-exploration`, `visualization` See: {doc}`../tags`. ## Highlights - Compare observed Mersenne-prime counts to a simple heuristic expectation curve. - Visualize cumulative “found vs. expected” as exponent bounds increase. - Keep the discussion explicitly empirical (evidence, not proof). ## Goal Mersenne primes are extremely rare. This experiment compares: - the observed count of Mersenne primes among prime exponents $p \le P$ - a lightweight heuristic curve that grows slowly with $P$ The aim is intuition-building and trend visualization, not a rigorous model. ## Background (quick refresher) - {doc}`../background/mersenne-primes` ## Research question For increasing prime exponent bounds $P$: - how does the cumulative count of “passes” from your scan grow? - how does it compare to a simple expectation curve of the form: $$ E(P) \approx \sum_{p \le P,\ p\ \mathrm{prime}} \frac{1}{p\ln 2} $$ ## Why this qualifies as a mathematical experiment - **Finite procedure:** run a finite scan and compute a finite expected sum. - **Observable(s):** cumulative count of passes vs. cumulative expected value. - **Parameter space:** vary $P$ (and optionally cap runtime per test). - **Outcome:** plots that show agreement/divergence and suggest questions for deeper study. - **Failure modes:** small ranges are noisy; the experiment should clearly label bounds. ## Experiment design ### Computation - From E008 (or a fixed list), get the set of exponents tested and which passed. - For each bound $P$, compute: - $\mathrm{Found}(P)$ = number of passing exponents $p \le P$ - $E(P)$ = cumulative heuristic sum - Plot both curves against $P$. ### Outputs - plot: $P$ vs. Found(P) and E(P) - table: selected checkpoints (P, Found, E) ## How to run ```bash make run EXP=e011 ``` or: ```bash uv run python -m mathxlab.experiments.e011 ``` ## Notes / pitfalls - The heuristic curve is a **comparison tool**, not a theorem. - Results depend heavily on which exponents were actually tested; record the tested set in the report. - A single large Mersenne prime can dominate impressions—keep axes and annotations clear. ## Extensions - Compare multiple heuristics (still empirical) and see which best matches the observed range. - Extend the scan bound and see whether the deviation grows or stabilizes. ## Published run snapshot If this experiment is included in the docs gallery, include the published snapshot (report + params). ```{include} ../reports/e011.md :start-after: "" :end-before: "" ``` ::: {dropdown} params.json (snapshot) :open: ```{literalinclude} ../params/e011.json :language: json ``` ::: ## References See {doc}`../references`. {cite:p}`Caldwell2021MersennePrimesPrimePages,MersenneResearchInc2025KnownMersennePrimesList` ## Related experiments - {doc}`e007` (Mersenne growth (bits and digits)) - {doc}`e009` (Small-factor scan for Mersenne numbers) - {doc}`e010` (Even perfect numbers from Mersenne primes) - {doc}`e027` (Record prime gaps vs. log^2 heuristic) - {doc}`e029` (Twin primes: observed vs. heuristic)