163 and the class number one problem
Here is a number that looks like a misprint: $$e^{\pi\sqrt{163}} = 262537412640768743.99999999999925\ldots$$ It misses an integer by less than $10^{-12}$. Martin Gardner announced in his April 1975 column that Ramanujan had proved it to be an integer; it was a joke, but the name "Ramanujan's constant" stuck. The real explanation is better than the joke, and it runs through one of Gauss's questions about quadratic forms.
Gauss's list
A binary quadratic form $ax^2 + bxy + cy^2$ with discriminant $b^2 - 4ac = -D < 0$ is reduced if $|b| \le a \le c$. Gauss showed that every positive definite form is equivalent, under integer changes of variables of determinant $1$, to exactly one reduced form (with a convention on the boundary), so the number of classes, the class number $h(-D)$, is finite and easy to compute. For fundamental discriminants, $h(-D) = 1$ means that every form of discriminant $-D$ is equivalent to the principal one, and that the ring of integers of $\mathbb{Q}(\sqrt{-D})$ has unique factorisation.
In the Disquisitiones Arithmeticae (1801) Gauss listed the discriminants with class number one and conjectured that his list was complete. In modern terms, the fundamental discriminants $-D$ with $h(-D) = 1$ are $$D = 3,\ 4,\ 7,\ 8,\ 11,\ 19,\ 43,\ 67,\ 163.$$ A computer search confirms there are no others below $4000$. The largest, $163$, is the source of the near-integer.
| $D$ | $e^{\pi\sqrt D}$ |
|---|---|
| 19 | 885479.777680… |
| 43 | 884736743.999777… |
| 67 | 147197952743.999998… |
| 163 | 262537412640768743.999999999999… |
Why the near-integer
Take $\tau = \frac{1 + \sqrt{-163}}{2}$, the root in the upper half-plane of the reduced form $x^2 + xy + 41y^2$. The elliptic curve $\mathbb{C}/(\mathbb{Z} + \tau\mathbb{Z})$ has complex multiplication by the ring of integers of $\mathbb{Q}(\sqrt{-163})$, and the theory of complex multiplication says that $j(\tau)$ is an algebraic integer of degree $h(-163) = 1$. So $j(\tau)$ is an ordinary integer; in fact $j(\tau) = -640320^3$. On the other hand $$j(\tau) = \frac1q + 744 + 196884\,q + \cdots, \qquad q = e^{2\pi i\tau} = -e^{-\pi\sqrt{163}},$$ and $|q| \approx 4 \times 10^{-18}$. So $-e^{\pi\sqrt{163}} + 744 \approx -640320^3$, an integer, with error about $196884\,|q| \approx 7.5 \times 10^{-13}$. That is exactly the gap in the decimal expansion: $640320^3 + 744 = 262537412640768744$. The same argument with $43$ and $67$ explains the weaker near-misses in the table, and the modular surface lab draws $j$ and the CM points behind it.
Euler's prime-producing polynomial
The same $163$ is hiding in Euler's polynomial $n^2 + n + 41$, which is prime for $n = 0, 1, \dots, 39$: note $4(n^2 + n + 41) = (2n+1)^2 + 163$. Rabinowitsch proved in 1913 that $n^2 + n + A$ is prime for all $0 \le n \le A - 2$ exactly when $4A - 1$ is one of Gauss's discriminants. So $A = 41$ is the best possible, and no quadratic polynomial of this shape does better.
Full proof: n² + n + 41 is prime for 0 ≤ n ≤ 39
Proof. Let $f(n) = n^2 + n + 41$ and suppose a prime $p$ divides $f(n)$. Since $n(n+1)$ is even, $f(n)$ is odd and $p \ne 2$. From $4f(n) = (2n+1)^2 + 163$ we get $(2n+1)^2 \equiv -163 \pmod p$, so either $p = 163$ or $-163$ is a quadratic residue mod $p$. A direct check of Legendre symbols shows that $-163$ is a non-residue modulo every odd prime $p < 41$, namely $3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37$. Hence every prime factor of $f(n)$ is at least $41$. For $0 \le n \le 39$ we have $f(n) \le 39^2 + 39 + 41 = 1601 < 41^2$, so $f(n)$ cannot have two prime factors $\ge 41$, and it is prime. $\square$
The residue check is the class number one property in disguise: a prime $p < 41$ for which $-163$ were a square would give a reduced form $px^2 + bxy + cy^2$ of discriminant $-163$ other than $x^2 + xy + 41y^2$. And $f(40) = 41^2$ shows the bound is sharp.
Proving the list is complete
Siegel showed in 1936 that $h(-D)$ grows like $D^{1/2 + o(1)}$, so only finitely many $D$ have class number one, but his proof could not say how large an exception might be. Kurt Heegner, a schoolteacher, published a proof of completeness in 1952 using modular functions; it was dismissed as flawed. In 1966–67 Alan Baker (with linear forms in logarithms) and Harold Stark (with modular functions) gave independent proofs, and Stark then showed that Heegner had been right all along. The general problem, listing all $D$ with a given class number, was made effective by Goldfeld, Gross and Zagier in the 1980s, and Watkins (2004) completed the lists up to class number $100$. For example, exactly eighteen fundamental discriminants have class number two, the largest being $-427$.
Further reading
- D. A. Cox, Primes of the Form $x^2 + ny^2$, 2nd ed., Wiley, 2013.
- H. M. Stark, On the "gap" in a theorem of Heegner, Journal of Number Theory 1 (1969).
- D. Goldfeld, Gauss's class number problem for imaginary quadratic fields, Bulletin of the AMS 13 (1985).
- M. Watkins, Class numbers of imaginary quadratic fields, Mathematics of Computation 73 (2004).