Primearium Lab · Spirals, Quadratics & Class Number One

The Lucky Spiral

Wind the integers into a spiral and glowing beams of primes leap out of the dark. At their heart sits Euler's famous n² + n + 41 — powered by the largest of the nine Heegner numbers.

First 48 steps along f(n)

Proven

The 9 Heegner Numbers: Why 41 can never be beaten

There are exactly nine positive integers d for which the imaginary quadratic field ℚ(√−d) has unique prime factorization (class number 1): 1, 2, 3, 7, 11, 19, 43, 67, 163. Click the six Euler lucky numbers below (c = (d + 1)/4) to ignite their prime streams on the spiral.

Why diagonal beams blaze in a spiral

Proven

Why straight lines are quadratic polynomials

Each full loop around an Ulam or Sacks spiral grows in circumference by a linear step, so walking straight outward jumps by a quadratic formula an² + bn + c. Every diagonal highway you see is simply a quadratic polynomial unusually rich in primes.

Proven

The hidden magic of 163

By Rabinowitsch's Theorem (1913), n² + n + c outputs primes for every n from 0 to c − 2 if and only if 4c − 1 is a Heegner number. Because 163 is proven to be the largest Heegner number (Heegner 1952; Baker & Stark 1966–67), c = 41 is the ultimate champion forever.

Open Conjecture

Still unproven: do any of them go on forever?

No polynomial can produce only primes (at n = 40, Euler's formula hits 41² = 1,681). Yet even more shockingly, mathematics still has no proof that even a single quadratic — whether n² + 1 or n² + n + 41 — produces infinitely many primes!

For mathematicians: Rabinowitsch's theorem, Bateman–Horn & N = 10,000 census

Proven Rabinowitsch's Theorem (1913) & Stark–Heegner Theorem (1952–1967)

For c ≥ 2, n² + n + c is prime for all integers 0 ≤ n ≤ c − 2 if and only if the ring of integers of ℚ(√(1 − 4c)) has class number h = 1. By the Heegner–Baker–Stark theorem, the complete list of negative fundamental discriminants with h = 1 is −3, −4, −7, −8, −11, −19, −43, −67, −163, giving the six exact Euler lucky constants c ∈ {2, 3, 5, 11, 17, 41}.

f(n) = n² + n + c,    Δ = 1 − 4c ∈ {−7, −11, −19, −43, −67, −163}

Open Conjecture Hardy–Littlewood Conjecture F & Bateman–Horn Conjecture (1962)

For an irreducible quadratic f(n) = an² + bn + c with no fixed prime divisor, the number of primes for 0 ≤ n < N is conjectured to grow asymptotically as C_BH(f) ∫₂ᴺ dt / ln f(t), where ω(p) counts roots of f(x) ≡ 0 (mod p). When (Δ/p) = −1 for many small primes (as for Δ = −163, where f(n) has no roots mod p for all p < 41!), C_BH(f) becomes huge (~6.644).

π_f(N) ~ C_BH(f) ∫₂ᴺ dt / ln f(t),    C_BH(f) = ∏_p (1 − ω(p)/p) / (1 − 1/p)

Observed & Verified Observed vs Bateman–Horn prediction for 0 ≤ n < 10,000 (live Web Worker)

Computing exact counts to N = 10,000 and 50,000-prime Bateman–Horn products in Web Worker…

Polynomial f(n) Δ Streak Primes (n < 10⁴) BH prediction C_BH Obs / Pred

Sources & verification

  • G. Rabinowitsch (1913), "Eindeutigkeit der Zerlegung in Primzahlfaktoren in quadratischen Zahlkörpern", J. reine angew. Math. 142, 153–164.
  • H. M. Stark (1967), "A complete determination of the complex quadratic fields of class-number one", Michigan Math. J. 14(1), 1–27.
  • P. T. Bateman & R. A. Horn (1962), "A heuristic asymptotic formula concerning the distribution of prime numbers", Math. Comp. 16, 363–367.
  • OEIS A003173 · OEIS A014556 · OEIS A005846
  • Independent verification program (available on request)