mathxlab.experiments.spiral_suite¶
Prime-visualization spiral suite (E124–E126).
Quickstart¶
from mathxlab.experiments.spiral_suite import run_e124, run_e125, ParamsE124
Name |
Kind |
Summary |
|---|---|---|
|
class |
Parameters for E124 (Klauber triangle). |
|
class |
Parameters for E125 (Sacks spiral). |
|
class |
Parameters for E126 (hexagonal number spiral). |
|
function |
E124: Klauber triangle: primes in a square-to-square triangle. |
|
function |
E125: Sacks spiral: primes on r=sqrt(n), θ=2π sqrt(n). |
|
function |
E126: Hexagonal number spiral: primes on a hex grid spiral. |
Reference¶
Classes¶
- class mathxlab.experiments.spiral_suite.ParamsE124(rows=301)[source]¶
Bases:
objectParameters for E124 (Klauber triangle).
- rows¶
Number of rows in the triangle. Row m contains integers from (m-1)^2 + 1 to m^2 (inclusive), so total integers are rows^2.
Functions¶
- mathxlab.experiments.spiral_suite.run_e124(*, out_dir, seed, figures_dir, report_path, params_path, rows=301)[source]¶
E124: Klauber triangle: primes in a square-to-square triangle.
In the Klauber triangle, row m contains the integers:
(m-1)^2 + 1, (m-1)^2 + 2, …, m^2
i.e. between consecutive squares. Highlighting primes reveals striking vertical streaks for certain quadratic prime-rich sequences.
- Parameters:
out_dir – Experiment output directory.
seed – Deterministic seed for reproducibility (not used here).
figures_dir – Directory for figure artifacts.
report_path – Path to the Markdown report.
params_path – Path to params.json.
rows – Number of rows (must be positive).
- mathxlab.experiments.spiral_suite.run_e125(*, out_dir, seed, figures_dir, report_path, params_path, n_max=250000)[source]¶
E125: Sacks spiral: primes on r=sqrt(n), θ=2π sqrt(n).
- Parameters:
out_dir – Experiment output directory.
seed – Deterministic seed for reproducibility (not used here).
figures_dir – Directory for figure artifacts.
report_path – Path to the Markdown report.
params_path – Path to params.json.
n_max – Largest integer to plot (inclusive).
- mathxlab.experiments.spiral_suite.run_e126(*, out_dir, seed, figures_dir, report_path, params_path, rings=150)[source]¶
E126: Hexagonal number spiral: primes on a hex grid spiral.
- Parameters:
out_dir – Experiment output directory.
seed – Deterministic seed for reproducibility (not used here).
figures_dir – Directory for figure artifacts.
report_path – Path to the Markdown report.
params_path – Path to params.json.
rings – Number of rings around the origin (>=0).