In number theory, a Heegner number (as termed by Conway and Guy) is a squarefree positive integer d such that the imaginary quadratic field Q(√−d) has class number 1. Equivalently, its ring of integers has unique factorization.
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, 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.
Euler's primegenerating polynomial
n
2
−
n
+
41
,
which gives (distinct) primes for n = 1, ..., 40, is related to the Heegner number 163 = 4 · 41 − 1.
Euler's formula, with
n
taking the values 1,... 40 is equivalent to
n
2
+
n
+
41
,
with
n
taking the values 0,... 39, and Rabinowitz proved that
n
2
+
n
+
p
gives primes for
n
=
0
,
…
,
p
−
2
if and only if its discriminant
1
−
4
p
equals minus a Heegner number.
(Note that
p
−
1
yields
p
2
, so
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.
Ramanujan's constant is the transcendental number
e
π
163
, which is an almost integer, in that it is very close to an integer:
e
π
163
=
262
537
412
640
768
743.999
999
999
999
25
…
≈
640
320
3
+
744.
This number was discovered in 1859 by the mathematician Charles Hermite. In a 1975 April Fool article in Scientific American magazine, "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 qexpansion of the jinvariant.
Briefly,
j
(
(
1
+
−
d
)
/
2
)
is an integer for d a Heegner number, and
e
π
d
≈
−
j
(
(
1
+
−
d
)
/
2
)
+
744
via the qexpansion.
If
τ
is a quadratic irrational, then the jinvariant is an algebraic integer of degree

Cl
(
Q
(
τ
)
)

, the class number of
Q
(
τ
)
and the minimal (monic integral) polynomial it satisfies is called the Hilbert class polynomial. Thus if the imaginary quadratic extension
Q
(
τ
)
has class number 1 (so d is a Heegner number), the jinvariant is an integer.
The qexpansion of j, with its Fourier series expansion written as a Laurent series in terms of
q
=
exp
(
2
π
i
τ
)
, begins as:
j
(
q
)
=
1
q
+
744
+
196
884
q
+
⋯
.
The coefficients
c
n
asymptotically grow as
ln
(
c
n
)
∼
4
π
n
+
O
(
ln
(
n
)
)
, and the low order coefficients grow more slowly than
200
000
n
, so for
q
≪
1
/
200
000
, j is very well approximated by its first two terms. Setting
τ
=
(
1
+
−
163
)
/
2
yields
q
=
−
exp
(
−
π
163
)
or equivalently,
1
q
=
−
exp
(
π
163
)
. Now
j
(
(
1
+
−
163
)
/
2
)
=
(
−
640
320
)
3
, so,
(
−
640
320
)
3
=
−
e
π
163
+
744
+
O
(
e
−
π
163
)
.
Or,
e
π
163
=
640
320
3
+
744
+
O
(
e
−
π
163
)
where the linear term of the error is,
−
196
884
/
e
π
163
≈
196
884
/
(
640
320
3
+
744
)
≈
−
0.000
000
000
000
75
explaining why
e
π
163
is within approximately the above of being an integer.
The Chudnovsky brothers found in 1987,
1
π
=
12
640
320
3
/
2
∑
k
=
0
∞
(
6
k
)
!
(
163
⋅
3
344
418
k
+
13
591
409
)
(
3
k
)
!
(
k
!
)
3
(
−
640
320
)
3
k
and uses the fact that
j
(
1
+
−
163
2
)
=
−
640
320
3
. For similar formulas, see the Ramanujan–Sato series.
For the four largest Heegner numbers, the approximations one obtains are as follows.
e
π
19
≈
96
3
+
744
−
0.22
e
π
43
≈
960
3
+
744
−
0.000
22
e
π
67
≈
5
280
3
+
744
−
0.000
0013
e
π
163
≈
640
320
3
+
744
−
0.000
000
000
000
75
Alternatively,
e
π
19
≈
12
3
(
3
2
−
1
)
3
+
744
−
0.22
e
π
43
≈
12
3
(
9
2
−
1
)
3
+
744
−
0.000
22
e
π
67
≈
12
3
(
21
2
−
1
)
3
+
744
−
0.000
0013
e
π
163
≈
12
3
(
231
2
−
1
)
3
+
744
−
0.000
000
000
000
75
where the reason for the squares is due to certain Eisenstein series. For Heegner numbers
d
<
19
, one does not obtain an almost integer; even
d
=
19
is not noteworthy. The integer jinvariants are highly factorisable, which follows from the
12
3
(
n
2
−
1
)
3
=
(
2
2
⋅
3
⋅
(
n
−
1
)
⋅
(
n
+
1
)
)
3
form, and factor as,
j
(
(
1
+
−
19
)
/
2
)
=
96
3
=
(
2
5
⋅
3
)
3
j
(
(
1
+
−
43
)
/
2
)
=
960
3
=
(
2
6
⋅
3
⋅
5
)
3
j
(
(
1
+
−
67
)
/
2
)
=
5
280
3
=
(
2
5
⋅
3
⋅
5
⋅
11
)
3
j
(
(
1
+
−
163
)
/
2
)
=
640
320
3
=
(
2
6
⋅
3
⋅
5
⋅
23
⋅
29
)
3
.
These transcendental numbers, in addition to being closely approximated by integers, (which are simply algebraic numbers of degree 1), can also be closely approximated by algebraic numbers of degree 3,
e
π
19
≈
x
24
−
24
;
x
3
−
2
x
−
2
=
0
e
π
43
≈
x
24
−
24
;
x
3
−
2
x
2
−
2
=
0
e
π
67
≈
x
24
−
24
;
x
3
−
2
x
2
−
2
x
−
2
=
0
e
π
163
≈
x
24
−
24
;
x
3
−
6
x
2
+
4
x
−
2
=
0
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. In addition, they can also be closely approximated by algebraic numbers of degree 4,
e
π
19
≈
3
5
(
3
−
2
(
−
3
+
1
3
⋅
19
)
)
−
2
−
12.000
06
…
e
π
43
≈
3
5
(
9
−
2
(
−
39
+
7
3
⋅
43
)
)
−
2
−
12.000
000
061
…
e
π
67
≈
3
5
(
21
−
2
(
−
219
+
31
3
⋅
67
)
)
−
2
−
12.000
000
000
36
…
e
π
163
≈
3
5
(
231
−
2
(
−
26
679
+
2
413
3
⋅
163
)
)
−
2
−
12.000
000
000
000
000
21
…
Note the reappearance of the integers
n
=
3
,
9
,
21
,
231
as well as the fact that,
2
6
⋅
3
(
−
3
2
+
3
⋅
19
⋅
1
2
)
=
96
2
2
6
⋅
3
(
−
39
2
+
3
⋅
43
⋅
7
2
)
=
960
2
2
6
⋅
3
(
−
219
2
+
3
⋅
67
⋅
31
2
)
=
5
280
2
2
6
⋅
3
(
−
26679
2
+
3
⋅
163
⋅
2413
2
)
=
640
320
2
which, with the appropriate fractional power, are precisely the jinvariants. As well as for algebraic numbers of degree 6,
e
π
19
≈
(
5
x
)
3
−
6.000
010
…
e
π
43
≈
(
5
x
)
3
−
6.000
000
010
…
e
π
67
≈
(
5
x
)
3
−
6.000
000
000
061
…
e
π
163
≈
(
5
x
)
3
−
6.000
000
000
000
000
034
…
where the xs are given respectively by the appropriate root of the sextic equations,
5
x
6
−
96
x
5
−
10
x
3
+
1
=
0
5
x
6
−
960
x
5
−
10
x
3
+
1
=
0
5
x
6
−
5
280
x
5
−
10
x
3
+
1
=
0
5
x
6
−
640
320
x
5
−
10
x
3
+
1
=
0
with the jinvariants appearing again. These sextics are not only algebraic, they are also solvable in radicals as they factor into two cubics over the extension
Q
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
τ
=
(
1
+
−
163
)
/
2
, then,
e
π
163
=
(
e
π
i
/
24
η
(
τ
)
η
(
2
τ
)
)
24
−
24.000
000
000
000
001
05
…
e
π
163
=
(
e
π
i
/
12
η
(
τ
)
η
(
3
τ
)
)
12
−
12.000
000
000
000
000
21
…
e
π
163
=
(
e
π
i
/
6
η
(
τ
)
η
(
5
τ
)
)
6
−
6.000
000
000
000
000
034
…
where the eta quotients are the algebraic numbers given above.
Given an odd prime p, if one computes
k
2
(
mod
p
)
for
k
=
0
,
1
,
…
,
(
p
−
1
)
/
2
(this is sufficient because
(
p
−
k
)
2
≡
k
2
(
mod
p
)
), one gets consecutive composites, followed by consecutive primes, if and only if p is a Heegner number.
For details, see "Quadratic Polynomials Producing Consecutive Distinct Primes and Class Groups of Complex Quadratic Fields" by Richard Mollin.