Heegner Numbers

e^(π√163) = 262537412640768743.99999999999925… — that's twelve nines. Not a coincidence. Not approximation. A consequence of why 163 is the largest Heegner number, a deep theorem connecting prime distribution, elliptic curves, and modular forms — Ramanujan saw it; Stark and Heegner proved it.

prime polynomial n² + n + 41 up to 40
why a transcendental number is almost an integer
A Heegner number is a positive integer d such that ℤ[(1+√−d)/2] is a unique factorization domain — i.e., the imaginary quadratic field ℚ(√−d) has class number 1. There are exactly nine: d ∈ {1, 2, 3, 7, 11, 19, 43, 67, 163} (Heegner 1952 / Stark 1967, Baker 1966).

The j-invariant is a modular function on the upper half-plane:
j(τ) = 1/q + 744 + 196884 q + 21493760 q² + …
where q = e^(2πiτ). For τ = (1+i√d)/2 with d a Heegner number, j(τ) is an algebraic integer. For class number 1 (the Heegner d), j(τ) is in fact a rational integer.

For d = 163: j((1+i√163)/2) = −640320³. Plugging in:
q = e^(2πi · (1+i√163)/2) = −e^(−π√163)
So −1/e^(π√163) + 744 + small corrections = −640320³
giving e^(π√163) = 640320³ + 744 − ε where ε is exponentially small. The closest integer is 262537412640768744; the actual value is roughly 7.5 × 10⁻¹³ short.

The connection to primes (Rabinowitz 1913): the polynomial n² + n + p is prime for every n = 0, 1, …, p − 2 exactly when 4p − 1 is a Heegner number. For 4p − 1 = 163, p = 41: n² + n + 41 is prime for n = 0, …, 39 — Euler's famous "lucky number 41" prime polynomial. This is not coincidence: it's because class number 1 means rare splitting of small primes in the ring of integers.

Why d = 163 is largest: Gauss conjectured the 9 Heegner numbers list was complete; Heegner gave a (largely-correct) proof in 1952 that was rejected for decades. Independently confirmed by Stark and Baker in the 1960s using transcendence theory — bounds on linear forms in logarithms of algebraic numbers. This proof and the resolution of the class number problem connect number theory, complex analysis, and the geometry of the j-line.

Ramanujan noticed the near-integer behavior of e^(π√163) without proof, in 1914. The full mechanism took 50 more years to understand. The Heegner numbers are the last whispers of a vanished arithmetic regime where everything factors uniquely.