# E050: Primorials and Euclid numbers: $p\#\pm 1$ are usually composite ```{figure} ../_static/experiments/e050_hero.png :width: 80% :alt: Preview figure for E050 ``` ```{figure} ../_static/experiments/e050_hero_2.png :width: 80% :alt: Preview figure for E050 ``` **Tags:** `number-theory`, `counterexample-search`, `quantitative-exploration`, `visualization`, `primorial` See: {doc}`../tags`. ## Highlights - Computes primorials $p_k\#=\prod_{i\le k} p_i$ and Euclid-style numbers $p_k\#\pm 1$. - Uses a probable-prime test to show “often composite” behavior early. - Finds small factor witnesses via bounded trial division for many early $k$. ## Goal Demonstrate that Euclid-style numbers are coprime to small primes but are not reliably prime, and produce explicit factor witnesses. ## Background (quick refresher) - {doc}`../background/primorials` - {doc}`../background/prime-numbers` ## Research question For small $k$, how often are $p_k\#\pm 1$ prime (or probable prime), and how easy is it to find a small factor when they are composite? ## Experiment design - Compute primorials for $k\le k_{max}$. - Test $p_k\#\pm 1$ with Miller–Rabin (probable prime). - If composite under MR, try to find a small trial-division factor as a concrete witness. - Plot $\log_{10}(p_k\#\pm 1)$ and smallest factor witnesses (log scale). ## Reproducibility - `params.json` records the run settings. - `report.md` summarizes the key findings. - `figures/*.png` contains the plots for the run. ## Interpreting the results - “Probable prime” is not a proof; it’s a fast filter for this exploratory experiment. - Factor witnesses come from bounded trial division: not finding a factor is expected for some $k$. - You should see early composite examples such as $p_6\#+1=30031$ (with a small factor) under default bounds. ## Published run snapshot If this experiment is included in the docs gallery, include the published snapshot (report + params). ```{include} ../reports/e050.md :start-after: "" :end-before: "" ``` ::: {dropdown} params.json (snapshot) :open: ```{literalinclude} ../params/e050.json :language: json ``` ::: ## References See {cite:t}`HardyWright2008AnIntroductionToTheTheoryOfNumbers`, {cite:t}`OEISFoundationInc2025A002110Primorial`, {cite:t}`PrimePagesGlossary2025Primorial`, {cite:t}`WikipediaContributors2025Primorial`. ## Related experiments - {doc}`e048` (Carmichael numbers: Korselt scan + Fermat counterexamples) - {doc}`e005` (Odd Perfect Numbers — Constraint Filter Pipeline) - {doc}`e012` (Fermat pseudoprimes and Carmichael numbers (counterexamples)) - {doc}`e013` (Prime-polynomial counterexamples (Euler's $n^2 + n + 41$)) - {doc}`e014` (Primorial ± 1 counterexamples)