# Heegner number

In number theory, a Heegner number (as termed by Conway and Guy) is a square-free positive integer d such that the imaginary quadratic field ${\displaystyle \mathbb {Q} \left[{\sqrt {-d}}\right]}$ has class number 1. Equivalently, its ring of integers has unique factorization.[1]

The determination of such numbers is a special case of the class number problem, and they underlie several striking results in number theory.

According to the (Baker–)Stark–Heegner theorem there are precisely nine Heegner numbers:

1, 2, 3, 7, 11, 19, 43, 67, and 163. (sequence A003173 in the OEIS)

This result was conjectured by Gauss and proved up to minor flaws by Kurt Heegner in 1952. Alan Baker and Harold Stark independently proved the result in 1966, and Stark further indicated the gap in Heegner's proof was minor.[2]

## Euler's prime-generating polynomial

Euler's prime-generating polynomial

${\displaystyle n^{2}+n+41,}$

which gives (distinct) primes for n = 0, ..., 39, is related to the Heegner number 163 = 4 · 41 − 1.

Rabinowitz[3] proved that

${\displaystyle n^{2}+n+p}$

gives primes for ${\displaystyle n=0,\dots ,p-2}$  if and only if this quadratic's discriminant ${\displaystyle 1-4p}$  is the negative of a Heegner number.

(Note that ${\displaystyle p-1}$  yields ${\displaystyle p^{2}}$ , so ${\displaystyle p-2}$  is maximal.)

1, 2, and 3 are not of the required form, so the Heegner numbers that work are 7, 11, 19, 43, 67, 163, yielding prime generating functions of Euler's form for 2, 3, 5, 11, 17, 41; these latter numbers are called lucky numbers of Euler by F. Le Lionnais.[4]

## Almost integers and Ramanujan's constant

Ramanujan's constant is the transcendental number[5]${\displaystyle e^{\pi {\sqrt {163}}}}$ , which is an almost integer, in that it is very close to an integer:[6]

${\displaystyle e^{\pi {\sqrt {163}}}=262\,537\,412\,640\,768\,743.999\,999\,999\,999\,25\ldots \approx 640\,320^{3}+744.}$

This number was discovered in 1859 by the mathematician Charles Hermite.[7] In a 1975 April Fool article in Scientific American magazine,[8] "Mathematical Games" columnist Martin Gardner made the hoax claim that the number was in fact an integer, and that the Indian mathematical genius Srinivasa Ramanujan had predicted it—hence its name.

This coincidence is explained by complex multiplication and the q-expansion of the j-invariant.

### Detail

Briefly, ${\displaystyle \textstyle j\left({\frac {1+{\sqrt {-d}}}{2}}\right)}$  is an integer for d a Heegner number, and

${\displaystyle e^{\pi {\sqrt {d}}}\approx -j\left({\frac {1+{\sqrt {-d}}}{2}}\right)+744}$

via the q-expansion.

If ${\displaystyle \tau }$  is a quadratic irrational, then the j-invariant is an algebraic integer of degree ${\displaystyle \left|\mathrm {Cl} {\bigl (}\mathbf {Q} (\tau ){\bigr )}\right|}$ , the class number of ${\displaystyle \mathbf {Q} (\tau )}$  and the minimal (monic integral) polynomial it satisfies is called the 'Hilbert class polynomial'. Thus if the imaginary quadratic extension ${\displaystyle \mathbf {Q} (\tau )}$  has class number 1 (so d is a Heegner number), the j-invariant is an integer.

The q-expansion of j, with its Fourier series expansion written as a Laurent series in terms of ${\displaystyle q=e^{2\pi i\tau }}$ , begins as:

${\displaystyle j(\tau )={\frac {1}{q}}+744+196\,884q+\cdots .}$

The coefficients ${\displaystyle c_{n}}$  asymptotically grow as

${\displaystyle \ln(c_{n})\sim 4\pi {\sqrt {n}}+O{\bigl (}\ln(n){\bigr )},}$

and the low order coefficients grow more slowly than ${\displaystyle 200\,000^{n}}$ , so for ${\displaystyle \textstyle q\ll {\frac {1}{200\,000}}}$ , j is very well approximated by its first two terms. Setting ${\displaystyle \textstyle \tau ={\frac {1+{\sqrt {-163}}}{2}}}$  yields
${\displaystyle q=-e^{-\pi {\sqrt {163}}}\quad \therefore \quad {\frac {1}{q}}=-e^{\pi {\sqrt {163}}}.}$

Now
${\displaystyle j\left({\frac {1+{\sqrt {-163}}}{2}}\right)=\left(-640\,320\right)^{3},}$

so,
${\displaystyle \left(-640\,320\right)^{3}=-e^{\pi {\sqrt {163}}}+744+O\left(e^{-\pi {\sqrt {163}}}\right).}$

Or,
${\displaystyle e^{\pi {\sqrt {163}}}=640\,320^{3}+744+O\left(e^{-\pi {\sqrt {163}}}\right)}$

where the linear term of the error is,
${\displaystyle {\frac {-196\,884}{e^{\pi {\sqrt {163}}}}}\approx {\frac {-196\,884}{640\,320^{3}+744}}\approx -0.000\,000\,000\,000\,75}$

explaining why ${\displaystyle e^{\pi {\sqrt {163}}}}$  is within approximately the above of being an integer.

## Pi formulas

The Chudnovsky brothers found in 1987 that

${\displaystyle {\frac {1}{\pi }}={\frac {12}{640\,320^{\frac {3}{2}}}}\sum _{k=0}^{\infty }{\frac {(6k)!(163\cdot 3\,344\,418k+13\,591\,409)}{(3k)!(k!)^{3}(-640\,320)^{3k}}},}$

a proof of which uses the fact that
${\displaystyle j\left({\frac {1+{\sqrt {-163}}}{2}}\right)=-640\,320^{3}.}$

For similar formulas, see the Ramanujan–Sato series.

## Other Heegner numbers

For the four largest Heegner numbers, the approximations one obtains[9] are as follows.

{\displaystyle {\begin{aligned}e^{\pi {\sqrt {19}}}&\approx {\color {white}000\,0}96^{3}+744-0.22\\e^{\pi {\sqrt {43}}}&\approx {\color {white}000\,}960^{3}+744-0.000\,22\\e^{\pi {\sqrt {67}}}&\approx {\color {white}00}5\,280^{3}+744-0.000\,0013\\e^{\pi {\sqrt {163}}}&\approx 640\,320^{3}+744-0.000\,000\,000\,000\,75\end{aligned}}}

Alternatively,[10]

{\displaystyle {\begin{aligned}e^{\pi {\sqrt {19}}}&\approx 12^{3}\left(3^{2}-1\right)^{3}{\color {white}00}+744-0.22\\e^{\pi {\sqrt {43}}}&\approx 12^{3}\left(9^{2}-1\right)^{3}{\color {white}00}+744-0.000\,22\\e^{\pi {\sqrt {67}}}&\approx 12^{3}\left(21^{2}-1\right)^{3}{\color {white}0}+744-0.000\,0013\\e^{\pi {\sqrt {163}}}&\approx 12^{3}\left(231^{2}-1\right)^{3}+744-0.000\,000\,000\,000\,75\end{aligned}}}

where the reason for the squares is due to certain Eisenstein series. For Heegner numbers ${\displaystyle d<19}$ , one does not obtain an almost integer; even ${\displaystyle d=19}$  is not noteworthy.[11] The integer j-invariants are highly factorisable, which follows from the form
${\displaystyle 12^{3}\left(n^{2}-1\right)^{3}=\left(2^{2}\cdot 3\cdot (n-1)\cdot (n+1)\right)^{3},}$

and factor as,

{\displaystyle {\begin{aligned}j\left({\frac {1+{\sqrt {-19}}}{2}}\right)&={\color {white}000\,0}96^{3}=\left(2^{5}\cdot 3\right)^{3}\\j\left({\frac {1+{\sqrt {-43}}}{2}}\right)&={\color {white}000\,}960^{3}=\left(2^{6}\cdot 3\cdot 5\right)^{3}\\j\left({\frac {1+{\sqrt {-67}}}{2}}\right)&={\color {white}00}5\,280^{3}=\left(2^{5}\cdot 3\cdot 5\cdot 11\right)^{3}\\j\left({\frac {1+{\sqrt {-163}}}{2}}\right)&=640\,320^{3}=\left(2^{6}\cdot 3\cdot 5\cdot 23\cdot 29\right)^{3}.\end{aligned}}}

These transcendental numbers, in addition to being closely approximated by integers (which are simply algebraic numbers of degree 1), can be closely approximated by algebraic numbers of degree 3,[12]

{\displaystyle {\begin{aligned}e^{\pi {\sqrt {19}}}&\approx x^{24}-24.000\,31;&x^{3}-2x-2&=0\\e^{\pi {\sqrt {43}}}&\approx x^{24}-24.000\,000\,31;&x^{3}-2x^{2}-2&=0\\e^{\pi {\sqrt {67}}}&\approx x^{24}-24.000\,000\,0019;&x^{3}-2x^{2}-2x-2&=0\\e^{\pi {\sqrt {163}}}&\approx x^{24}-24.000\,000\,000\,000\,0011;&\quad x^{3}-6x^{2}+4x-2&=0\end{aligned}}}

The roots of the cubics can be exactly given by quotients of the Dedekind eta function η(τ), a modular function involving a 24th root, and which explains the 24 in the approximation. They can also be closely approximated by algebraic numbers of degree 4,[13]

{\displaystyle {\begin{aligned}e^{\pi {\sqrt {19}}}&\approx 3^{5}\left(3-{\sqrt {2\left(1-{\tfrac {96}{24}}+1{\sqrt {3\cdot 19}}\right)}}\right)^{-2}-12.000\,06\dots \\e^{\pi {\sqrt {43}}}&\approx 3^{5}\left(9-{\sqrt {2\left(1-{\tfrac {960}{24}}+7{\sqrt {3\cdot 43}}\right)}}\right)^{-2}-12.000\,000\,061\dots \\e^{\pi {\sqrt {67}}}&\approx 3^{5}\left(21-{\sqrt {2\left(1-{\tfrac {5\,280}{24}}+31{\sqrt {3\cdot 67}}\right)}}\right)^{-2}-12.000\,000\,000\,36\dots \\e^{\pi {\sqrt {163}}}&\approx 3^{5}\left(231-{\sqrt {2\left(1-{\tfrac {640\,320}{24}}+2\,413{\sqrt {3\cdot 163}}\right)}}\right)^{-2}-12.000\,000\,000\,000\,000\,21\dots \end{aligned}}}

If ${\displaystyle x}$  denotes the expression within the parenthesis (e.g. ${\displaystyle x=3-{\sqrt {2\left(1-{\tfrac {96}{24}}+1{\sqrt {3\cdot 19}}\right)}}}$ ), it satisfies respectively the quartic equations

{\displaystyle {\begin{aligned}x^{4}-{\color {white}00}4\cdot 3x^{3}+{\color {white}000\,0}{\tfrac {2}{3}}(96+3)x^{2}-{\color {white}000\,000}{\tfrac {2}{3}}\cdot 3(96-6)x-3&=0\\x^{4}-{\color {white}00}4\cdot 9x^{3}+{\color {white}000\,}{\tfrac {2}{3}}(960+3)x^{2}-{\color {white}000\,00}{\tfrac {2}{3}}\cdot 9(960-6)x-3&=0\\x^{4}-{\color {white}0}4\cdot 21x^{3}+{\color {white}00}{\tfrac {2}{3}}(5\,280+3)x^{2}-{\color {white}000}{\tfrac {2}{3}}\cdot 21(5\,280-6)x-3&=0\\x^{4}-4\cdot 231x^{3}+{\tfrac {2}{3}}(640\,320+3)x^{2}-{\tfrac {2}{3}}\cdot 231(640\,320-6)x-3&=0\\\end{aligned}}}

Note the reappearance of the integers ${\displaystyle n=3,9,21,231}$  as well as the fact that

{\displaystyle {\begin{aligned}2^{6}\cdot 3\left(-\left(1-{\tfrac {96}{24}}\right)^{2}+1^{2}\cdot 3\cdot 19\right)&=96^{2}\\2^{6}\cdot 3\left(-\left(1-{\tfrac {960}{24}}\right)^{2}+7^{2}\cdot 3\cdot 43\right)&=960^{2}\\2^{6}\cdot 3\left(-\left(1-{\tfrac {5\,280}{24}}\right)^{2}+31^{2}\cdot 3\cdot 67\right)&=5\,280^{2}\\2^{6}\cdot 3\left(-\left(1-{\tfrac {640\,320}{24}}\right)^{2}+2413^{2}\cdot 3\cdot 163\right)&=640\,320^{2}\end{aligned}}}

which, with the appropriate fractional power, are precisely the j-invariants.

Similarly for algebraic numbers of degree 6,

{\displaystyle {\begin{aligned}e^{\pi {\sqrt {19}}}&\approx \left(5x\right)^{3}-6.000\,010\dots \\e^{\pi {\sqrt {43}}}&\approx \left(5x\right)^{3}-6.000\,000\,010\dots \\e^{\pi {\sqrt {67}}}&\approx \left(5x\right)^{3}-6.000\,000\,000\,061\dots \\e^{\pi {\sqrt {163}}}&\approx \left(5x\right)^{3}-6.000\,000\,000\,000\,000\,034\dots \end{aligned}}}

where the xs are given respectively by the appropriate root of the sextic equations,

{\displaystyle {\begin{aligned}5x^{6}-{\color {white}000\,0}96x^{5}-10x^{3}+1&=0\\5x^{6}-{\color {white}000\,}960x^{5}-10x^{3}+1&=0\\5x^{6}-{\color {white}00}5\,280x^{5}-10x^{3}+1&=0\\5x^{6}-640\,320x^{5}-10x^{3}+1&=0\end{aligned}}}

with the j-invariants appearing again. These sextics are not only algebraic, they are also solvable in radicals as they factor into two cubics over the extension ${\displaystyle \mathbb {Q} {\sqrt {5}}}$  (with the first factoring further into two quadratics). These algebraic approximations can be exactly expressed in terms of Dedekind eta quotients. As an example, let ${\displaystyle \textstyle \tau ={\frac {1+{\sqrt {-163}}}{2}}}$ , then,

{\displaystyle {\begin{aligned}e^{\pi {\sqrt {163}}}&=\left({\frac {e^{\frac {\pi i}{24}}\eta (\tau )}{\eta (2\tau )}}\right)^{24}-24.000\,000\,000\,000\,001\,05\dots \\e^{\pi {\sqrt {163}}}&=\left({\frac {e^{\frac {\pi i}{12}}\eta (\tau )}{\eta (3\tau )}}\right)^{12}-12.000\,000\,000\,000\,000\,21\dots \\e^{\pi {\sqrt {163}}}&=\left({\frac {e^{\frac {\pi i}{6}}\eta (\tau )}{\eta (5\tau )}}\right)^{6}-6.000\,000\,000\,000\,000\,034\dots \end{aligned}}}

where the eta quotients are the algebraic numbers given above.

## Class 2 numbers

The three numbers 88, 148, 232, for which the imaginary quadratic field ${\displaystyle \mathbb {Q} \left[{\sqrt {-d}}\right]}$  has class number 2, are not considered as Heegner numbers but have certain similar properties in terms of almost integers. For instance,

{\displaystyle {\begin{aligned}e^{\pi {\sqrt {88}}}+8\,744&\approx {\color {white}00\,00}2\,508\,952^{2}-0.077\dots \\e^{\pi {\sqrt {148}}}+8\,744&\approx {\color {white}00\,}199\,148\,648^{2}-0.000\,97\dots \\e^{\pi {\sqrt {232}}}+8\,744&\approx 24\,591\,257\,752^{2}-0.000\,0078\dots \\\end{aligned}}}

and
{\displaystyle {\begin{aligned}e^{\pi {\sqrt {22}}}-24&\approx {\color {white}00}\left(6+4{\sqrt {2}}\right)^{6}+0.000\,11\dots \\e^{\pi {\sqrt {37}}}+24&\approx \left(12+2{\sqrt {37}}\right)^{6}-0.000\,0014\dots \\e^{\pi {\sqrt {58}}}-24&\approx \left(27+5{\sqrt {29}}\right)^{6}-0.000\,000\,0011\dots \\\end{aligned}}}

## Consecutive primes

Given an odd prime p, if one computes ${\displaystyle k^{2}\mod p}$  for ${\displaystyle \textstyle k=0,1,\dots ,{\frac {p-1}{2}}}$  (this is sufficient because ${\displaystyle \left(p-k\right)^{2}\equiv k^{2}\mod p}$ ), one gets consecutive composites, followed by consecutive primes, if and only if p is a Heegner number.[14]

For details, see "Quadratic Polynomials Producing Consecutive Distinct Primes and Class Groups of Complex Quadratic Fields" by Richard Mollin.[15]

## Notes and references

1. ^ Conway, John Horton; Guy, Richard K. (1996). The Book of Numbers. Springer. p. 224. ISBN 0-387-97993-X.
2. ^ Stark, H. M. (1969), "On the gap in the theorem of Heegner" (PDF), Journal of Number Theory, 1 (1): 16–27, Bibcode:1969JNT.....1...16S, doi:10.1016/0022-314X(69)90023-7, hdl:2027.42/33039
3. ^ Rabinovitch, Georg "Eindeutigkeit der Zerlegung in Primzahlfaktoren in quadratischen Zahlkörpern." Proc. Fifth Internat. Congress Math. ( Cambridge) 1, 418–421, 1913.
4. ^ Le Lionnais, F. Les nombres remarquables. Paris: Hermann, pp. 88 and 144, 1983.
5. ^ gives ${\displaystyle e^{\pi {\sqrt {d}}},d\in Z^{*}}$ , based on Nesterenko, Yu. V. "On Algebraic Independence of the Components of Solutions of a System of Linear Differential Equations." Izv. Akad. Nauk SSSR, Ser. Mat. 38, 495–512, 1974. English translation in Math. USSR 8, 501–518, 1974.
6. ^ Ramanujan Constant – from Wolfram MathWorld
7. ^ Barrow, John D (2002). The Constants of Nature. London: Jonathan Cape. ISBN 0-224-06135-6.
8. ^ Gardner, Martin (April 1975). "Mathematical Games". Scientific American. Scientific American, Inc. 232 (4): 127. Bibcode:1975SciAm.232e.102G. doi:10.1038/scientificamerican0575-102.
9. ^ These can be checked by computing
${\displaystyle {\sqrt[{3}]{e^{\pi {\sqrt {d}}}-744}}}$

on a calculator, and
${\displaystyle {\frac {196\,884}{e^{\pi {\sqrt {d}}}}}}$

for the linear term of the error.
10. ^
11. ^ The absolute deviation of a random real number (picked uniformly from [0,1], say) is a uniformly distributed variable on [0, 0.5], so it has absolute average deviation and median absolute deviation of 0.25, and a deviation of 0.22 is not exceptional.
12. ^
13. ^
14. ^
15. ^ Mollin, R. A. (1996). "Quadratic polynomials producing consecutive, distinct primes and class groups of complex quadratic fields" (PDF). Acta Arithmetica. 74: 17–30. doi:10.4064/aa-74-1-17-30.