Ulam Spiral (Square)

Quadratic-polynomial alignment of marked positions on a 2D lattice
symmetryencoding-invariantdim 25 metrics

What It Measures

Whether marked positions on a 2D integer-spiral lattice prefer quadratic-polynomial diagonals — the geometric signature Ulam (1963) first observed for primes.

Threshold-marks the signal at the median (mark_density = 0.5), then lays sample indices on a square spiral integer lattice centered at the origin. Asks whether the marks cluster on diagonal lines, fit incremental quadratic curves better than linear ones, or concentrate angular/radial energy in directions a uniform mask would not. Six metrics probe complementary projections of the marked grid: a pairwise direction comparison, an algebraic curve fit, an arm-density coefficient-of-variation, a coarse FFT wedge ratio, a per-shell density spectrum, and a per-angle Radon spectrum. uint8-and-rank-invariant — only the mark mask matters, not the raw values.

Metrics

diagonal_alignment

Normalized excess of diagonal vs. cardinal mark adjacencies: (#diag − #card) / (#diag + #card + 1). 0 is isotropic, > 0 diagonal-leaning, < 0 cardinal-leaning. Logistic Edge-of-Chaos, Period-2, and Period-4 saturate near +1.0 (every other index gets marked → perfect diagonal stripe), followed by Prime Indicator (+0.998) and von Mangoldt Function (+0.997). Rainfall (−0.49), ECG Fusion (−0.29), and LIGO Hanford (−0.28) sit at the cardinal end. The is-prime indicator reproduces Ulam 1963.

polynomial_concentration

Incremental quadratic R² (R²_quad − R²_linear) on the densest single diagonal of the marked grid. Up to 1.0 for a clean quadratic ridge; near 0 for line-linear or noise. Lotka-Volterra (0.18), Wave Height Buoy (0.17), ETH/BTC Ratio (0.15), GOES X-Ray Flux (0.11), and Ambient Microseism (0.10) score highest — their marked indices on the dominant diagonal fit a quadratic better than a line. Devil's Staircase (0.001), Primes, Partition Function, and Minkowski ?(x) (~0.002) sit at the floor.

arm_density_variance

Coefficient-of-variation² of per-arm mark density along the square spiral's expanding legs. Devil's Staircase (4.35) dominates because its long flat plateaus produce mark-dense and mark-empty arms in alternation; Minkowski ?(x), Partition Function, and Primes all sit at 2.4 (monotone-trending sources concentrate marks on later arms). Constants and Period-2 score near 0 (uniform per-arm density).

radial_periodicity

Spectral concentration (max bin / total non-DC power) of the per-shell mark-density sequence, where shell s = positions at Chebyshev distance s from the origin. Ambient Microseism (0.89), Quantum Walk (0.75), Wave Height Buoy (0.68), Hilbert Walk (0.65), and Minkowski ?(x) (0.64) top the list — they re-visit similar value ranges at scales that match the shell length, producing a dominant FFT bin in the shell-density curve. Surfaced by the 2026-05-11 embedding-discovery pilot as visual structure the original four Ulam metrics missed.

radon_anisotropy

Variance of per-angle spectral concentration over four Radon-like projections {0°, 45°, 90°, 135°} of the marked grid, with each projection normalized by its own line length. High when one orientation has a dominant periodic bin (oriented stripes — Chirikov-like diagonals); near zero for rotationally-symmetric patterns. Van der Pol (0.045), Chua's Circuit (0.040), Duffing (0.037), LIGO Hanford (0.037), and Square Wave (0.036) score highest. Period-2, Period-4, Noisy Period-2, DNA SARS-CoV-2, and Collatz Parity sit at ~0.0003. Surfaced by 2026-05-11 residual-PCA mining as PC2 of vision-feature space after the existing five metrics were regressed out — picks up oriented periodicity that a coarse wedge-pooling FFT measure misses.

Atlas Rankings

arm_density_variance
SourceDomainValue
Devil's Staircaseexotic4.3451
BTC Close Pricefinancial1.7896
Rainfall (ORD Hourly)climate1.5509
···
Constant 0x00noise0.0000
Fibonacci Wordexotic0.0074
Logistic r=3.2 (Period-2)chaos0.0096
diagonal_alignment
SourceDomainValue
Logistic Edge-of-Chaoschaos0.9999
Logistic r=3.5 (Period-4)chaos0.9999
Logistic r=3.2 (Period-2)chaos0.9999
···
Rainfall (ORD Hourly)climate-0.4945
ECG Fusionmedical-0.2889
LIGO Hanfordastro-0.2791
polynomial_concentration
SourceDomainValue
Lotka-Volterrabio0.1837
GOES X-Ray Fluxastro0.1767
ETH/BTC Ratiofinancial0.1518
···
Devil's Staircaseexotic0.0008
Quantum Walkquantum0.0094
Tohoku Aftershock Intervalsgeophysics0.0208
radial_periodicity
SourceDomainValue
Ambient Microseismgeophysics0.8887
Quantum Walkquantum0.7498
GOES X-Ray Fluxastro0.6850
···
Constant 0x00noise0.0000
Logistic r=3.5 (Period-4)chaos0.0313
Logistic r=3.2 (Period-2)chaos0.0313
radon_anisotropy
SourceDomainValue
Van der Pol Oscillatorexotic0.0454
Chua's Circuitexotic0.0402
Duffing Oscillatorchaos0.0374
···
Collatz Paritynumber_theory0.0002
DNA SARS-CoV-2bio0.0003
Noisy Period-2chaos0.0003

When It Lights Up

Ulam Spiral (Square) is the framework's only geometry that detects quadratic-polynomial alignment of integer-indexed events on a 2D lattice. The is-prime indicator scores diagonal_alignment +0.998 — the canonical Ulam phenomenon. polynomial_concentration extends the question from "do marks line up?" to "do they fit a parabola?". The three projection metrics (arm_density_variance, radial_periodicity, radon_anisotropy) capture different orientations of regularity that the line/diagonal metrics miss: radial banding from quasi-periodic-amplitude signals (Ambient Microseism, Wave Height), oriented stripes from continuous-time chaos (Van der Pol, Chua), and arm-scale concentration from monotone trends. A sister metric fft_anisotropy (diagonal-vs-cardinal 2D FFT wedge ratio) is class-only — kept in compute_metrics for direct callers but dropped from the atlas because r = +0.90 with Spectral Analysis:high_freq_ratio makes it a near-duplicate spectral-roughness measure; the geometrically distinct signals (diagonal_alignment for prime diagonals, radon/radial for arm structure) carry the real Ulam-lattice information. The Sacks-parametrization variant of the same geometry is excluded from the atlas — see Ulam Spiral (Sacks) below.

Open in Atlas
← LorentzianUlam Spiral (Sacks) →