mathxlab.experiments.spiral_suite

Prime-visualization spiral suite (E124–E126).

Quickstart

from mathxlab.experiments.spiral_suite import run_e124, run_e125, ParamsE124
Public API

Name

Kind

Summary

ParamsE124

class

Parameters for E124 (Klauber triangle).

ParamsE125

class

Parameters for E125 (Sacks spiral).

ParamsE126

class

Parameters for E126 (hexagonal number spiral).

run_e124

function

E124: Klauber triangle: primes in a square-to-square triangle.

run_e125

function

E125: Sacks spiral: primes on r=sqrt(n), θ=2π sqrt(n).

run_e126

function

E126: Hexagonal number spiral: primes on a hex grid spiral.

Reference

Classes

class mathxlab.experiments.spiral_suite.ParamsE124(rows=301)[source]

Bases: object

Parameters 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.

class mathxlab.experiments.spiral_suite.ParamsE125(n_max=250000)[source]

Bases: object

Parameters for E125 (Sacks spiral).

n_max

Largest integer to place on the spiral (inclusive). Integers 1..n_max are mapped to polar coordinates r=sqrt(n), theta=2π sqrt(n).

class mathxlab.experiments.spiral_suite.ParamsE126(rings=150)[source]

Bases: object

Parameters for E126 (hexagonal number spiral).

rings

Number of hexagonal rings around the center. The spiral contains 1 + 3*rings*(rings+1) integers.

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).