Odlyzko-Sch Onhage Algorithm in Conductor Aspect: Bstract

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

ODLYZKO-SCHÖNHAGE ALGORITHM

IN CONDUCTOR ASPECT
arXiv:math/0306101v2 [math.NT] 26 Jun 2003

JEFFREY STOPPLE

A BSTRACT. An algorithm is given to efficiently compute, for large


discriminant, L-functions of characters on the class group of a
complex quadratic field. This is an analog in conductor aspect of
the Odlyzko-Schönhage algorithm to compute the Riemann zeta
function. Examples are included for about 21000 L-functions with
conductor near 107 . The data shows good agreement with a sym-
plectic random matrix model.

1. I NTRODUCTION .
In [6], Odlyzko and Schönhage developed an algorithm to com-
pute the Riemann zeta function ζ(s) efficiently for values of s very
high up in the critical strip. Their method depends on precompu-
tation of Taylor series expansions of ζ(s) at regularly spaced points,
which in turn can be done efficiently by a clever application of the
Fast Fourier Transform. Rumely later implemented a version of this
for Dirichlet L-functions in [10].
In analytic number theory it is often the case that there is a sym-
metry between what one can prove for large values of t = Im(s) in
the critical strip, and what one can prove for L-functions with large
conductor q. With this in mind, it seems reasonable to try to find an
analog of the Odlyzko-Schönhage algorithm to efficiently compute
values of L-functions with very large conductor.
Roughly speaking, we want to view the L-function as a Mellin
transform of an automorphic form f , and split the integral at the
symmetry point. This gives the extended L-function as an infinite
sum
X
Λ(s, f ) = a(n){G(s, 2πn/q 1/2 ) + G(1 − s, 2πn/q 1/2 )}
n
of values of an incomplete Gamma function
Z ∞
dy
−s
G(s, x) = x Γ(s, x) = exp(−yx)y s .
1 y
1991 Mathematics Subject Classification. 11Y16; 11Y35.
1
2 JEFFREY STOPPLE

It was already observed in [11] that the rapid decay of G(s, x) as


x → ∞ means that we can truncate the infinite series at about O(q 1/2 )
terms. On the other hand, the exponential decay as t = Im(s) in-
creases will cause a loss of precision if we want to compute L-function
values for large t. This can be fixed by moving the contour integral
so that the x parameter has complex values, as observed in [5] and
[3] and implemented in [9].
The analog of the Odlyzko-Schönhage algorithm is based on com-
puting Taylor series expansions of the function G(s, x) in the second
variable. Differentiation under the integral sign and integration by
parts gives a recursion which allows the computations of derivatives
of G(s, x) at very little cost. The rapid decay of G(s, x) as x increases
will imply that, instead of taking equally spaced points for the cen-
ters of the Taylor expansions, the sequence of points can grow ex-
ponentially. This, in turn, will imply that we need very few Taylor
expansions to compute efficiently, in fact O(log(q)) expansions with
O(log(q)) terms in each.
However, too much change in t will require that we increase the
phase in the x parameters, and then all Taylor expansions must be
recomputed. For that reason, we will only consider |t| ≤ 1 in this
paper, although the method will generalize to any bounded region
in the critical strip. For further simplification we will consider only
s = 1/2 + it on the critical line, although this, too, is not crucial.
If we want to get the most benefit of the precomputations it makes
sense to compute zeros of lots of L-functions with the same conduc-
tor simultaneously. Here the power of the Fast Fourier Transform
can again play a role, if all of the L-functions arise from the same
abelian group structure. In this paper we will consider L-functions
attached to characters χ on the ideal class group of a complex qua-
dratic field with discriminant −q. The corresponding automorphic
forms are weight one forms, which are cusp forms if the character χ
is not a genus character. The corresponding Galois representations
are dihedral.
With this in mind we now explain the algorithm in a little more
detail. It will be convenient to use the correspondence between ideal
classes and binary quadratic forms Q of discriminant −q. Corre-
sponding to a character χ we have a theta function

def.
X X X
Θ(z, χ) = χ(Q) rQ (n) exp(2πinz) = rχ (n) exp(2πinz).
[Q] n>0 n>0
ODLYZKO ALGORITHM IN CONDUCTOR ASPECT 3

Then
def.
Λ(s, χ) = (q 1/2 /2π)s Γ(s)L(s, χ) =
X
rχ (n) G(s, 2πn/q 1/2 ) + G(1 − s, 2πn/q 1/2 ) .

n>0

For purposes of locating zeros on the critical line it is better to com-


pute the Hardy function Z(t, χ) defined for t > 0 by
θ(t, χ) = t log(q 1/2 /(2π)) + arg(Γ(1/2 + it))
and, with s = 1/2 + it,
Z(t, χ) = exp(iθ(t, χ))L(s, χ)
= exp(iθ(t, χ))(2π/q 1/2 )s Γ(s)−1 ×
X
rχ (n) G(s, 2πn/q 1/2 ) + G(1 − s, 2πn/q 1/2 ) .

n>0

We will truncate the infinite series after N terms, and arrange the n <
N into intervals Ij , j = 1, 2, . . . T centered at points xj and with width
∆j . For n in the interval Ij we compute a Taylor series expansion,
truncated to B terms
XB
1/2 1/2
G(s, 2πn/q ) + G(1 − s, 2πn/q ) ≈ Gj,k (s)(2πn/q 1/2 − xj )k ,
k=0

where
Gj,k (s) = G(k) (s, xj ) + G(k) (1 − s, xj ) /k!.

(1)
This gives Z(t, χ) as

(2) Z(t, χ) ≈ exp(iθ(t, χ))(2π/q 1/2 )s Γ(s)−1 ×


T X
B
X X (2πn/q 1/2 − xj )k
Gj,k (s)∆kj rχ (n) .
j=1 k=0 n∈Ij
∆kj

Here we have inserted canceling terms ∆kj , ∆−k j to control the small
size of Gj,k (s) and the large size of (2πn/q − xj )k .
1/2

The point, then, is that the inner sum over n ∈ Ij is independent


of s, and so can be done as a precomputation. Of course, this is
done separately for each character χ, but the coefficients rχ (n) can
be computed for all characters χ very efficiently via the Fast Fourier
Transform once the representation numbers rQ (n) are known.
The remaining sections of the paper is as follows:
2. Review of properties of G(s, x).
4 JEFFREY STOPPLE

3. Truncation of the L-series after N terms.


4. Arrangement of the Taylor expansions.
The T intervals Ij = (xj − ∆j /2, xj + ∆j /2) are determined.
5. Truncation of the Taylor expansions after B terms.
6. Implementation and examples.

2. R EVIEW OF PROPERTIES OF G(s, x).


As above we define for x > 0 and s ∈ C
Z ∞
dy
−s
G(s, x) = x Γ(s, x) = exp(−xy)y s .
1 y
Differentiating with respect to x under the integral we see that
Z ∞
d dy
(3) G(s, x) = − exp(−xy)y s+1 = −G(s + 1, x).
dx 1 y
Integration by parts, on the other hand, gives
exp(−x) s
(4) G(s + 1, x) = + G(s, x).
x x
Equations (3) and (4) give a nice recursive relation for all the deriva-
tives G(k) (s, x) in terms of G(s, x).
We will need bounds for G(s, x) and its derivatives. For s in the
critical strip, that is 0 < Re(s) < 1, we have
Z ∞
|G(s, x)| ≤ exp(−xy)y Re(s)−1 dy.
1

Change the variables by u = y − 1 to get


Z ∞
|G(s, x)| ≤ exp(−x) exp(−xu)(u + 1)Re(s)−1 du.
0

Now u + 1 ≥ 1 and by hypothesis, Re(s) − 1 < 0, so (u + 1)Re(s)−1 ≤ 1,


and therefore
Z ∞
exp(−x)
(5) |G(s, x)| ≤ exp(−x) exp(−xu)du = .
0 x
To estimate the derivatives G(k) (s, x) = (−1)k G(s + k, x) this method
does not apply, since we only have Re(s) + k − 1 < k. Instead we can
use the Cauchy formula for derivatives
|G(k) (s, x)| MR
≤ k,
k! R
ODLYZKO ALGORITHM IN CONDUCTOR ASPECT 5

where MR is a bound for G(s, w) with |w − x| = R. An estimate


similar to (5) shows that |G(s, w)| ≤ exp(−Re(w))/Re(w), which a
calculus argument shows is maximized at w = x − R, that is,
|G(k) (s, x)| exp(R − x)
(6) ≤
k! (x − R)Rk
for any 0 < R < x.

3. T RUNCATION OF THE L- SERIES .


To compute to D digits of accuracy, we need enough terms N in
the L-series so that
X
(7) 2 rχ (n)|Re(G(s, 2πn/q 1/2 ))| ≤ 10−D .
n>N

Since the rχ (n) are the coefficients of a weight one cusp form, rχ (n) ≪
n1/2 . Using (5), the left side of (7) is
X
≪ (q/n)1/2 exp(−2πn/q 1/2 )
n>N
Z ∞
1/2
≈q y −1/2 exp(−2πy/q 1/2 )dy
N
Z ∞
1/2
<(q/N) exp(−2πy/q 1/2 )dy
N
1/2
≪q/N exp(−2πN/q 1/2 ).
For this to be less than 10−D we need
log(q) + D log(10) < 2πN/q 1/2 + log(N)/2;
it suffices that
(8) N = q 1/2 log(q · 10D )/2π.

4. A RRANGEMENT OF THE TAYLOR EXPANSIONS .

We seek to find intervals of radius ∆j centered at xj and bounding


circles of radius Rj so that
0 < ∆j < Rj < xj .
The tail of the Taylor expansion

X
Gj,k (s)(2πn/q 1/2 − xj )k
k=B
6 JEFFREY STOPPLE

is bounded, via (6) by



X exp(Rj − xj ) exp(Rj − xj ) (∆j /Rj )B
(9) (∆j /Rj )k = ,
k=B
xj − Rj xj − Rj 1 − ∆j /Rj

where Gj,k (s) is as in (1).


One might wish to minimize the total number of terms in all the
Taylor expansions, but this seems intractable. Instead we will simply
choose the truncation parameter B to be independent of j. To make
this happen we require that
∆j /Rj = (constant) 1/c < 1,
xj − Rj = (constant) K > 0.
Furthermore, in order that the endpoints of the intervals meet, we
require that
xj + ∆j = xj+1 − ∆j+1 .
This gives
xj = Rj + K = c∆j + K
xj+1 = Rj+1 + K = c∆j+1 + K,
so
xj+1 − xj = c(∆j+1 − ∆j )
xj+1 − xj = ∆j + ∆j+1 .
Thus
∆j+1 + ∆j = c(∆j+1 − ∆j )
∆j+1 = ∆j (c + 1)/(c − 1).
Now
2c
xj+1 = xj + ∆j + ∆j+1 = xj + ∆j
c−1
and
∆j = Rj /c = (xj − K)/c
implies that
xj+1 = xj (c + 1)/(c − 1) − 2K/(c − 1).
For simplicity we choose the parameters c = e and K = x1 /2 which
gives
 j−1
e+1 x1 x1
(10) xj = + ,
e−1 2 2
ODLYZKO ALGORITHM IN CONDUCTOR ASPECT 7

and
 j−1
e+1 x1
(11) ∆j = .
e−1 2e

The simplest choice for x1 is 2π/q 1/2 so that the first interval I1
contains the n = 1 term of the series, and this was implemented in
practice. However, because of the exponential growth, for small j
some of the intervals Ij will contain only a single term 2πn/q 1/2 , and
some will contain none at all. Thus for the very small values of j
where the intervals contain fewer than B terms one can do better
computing each term instead of using the Taylor expansion. This
would improve the efficiency about 40% for q near 106 , 30% near 109,
and 20% near 1020 .
We can now determine how many intervals T are needed, since
we need to compute terms in the series out to

n = N = q 1/2 log(q · 10D )/2π,


so
2πN
= log(q · 10D ).
q 1/2
This requires that
( T −1 )
e+1 e+1 x1
xT + ∆T = +1 > log(q · 10D ).
e−1 e 2

With x1 = 2π/q 1/2 we want


 T −1
1/2 D e+1
q log(q · 10 )e/(π(e + 1)) < ,
e−1
or
T > 1 + log(q 1/2 · log(q · 10D ) · e/(π(e + 1))) / log((e + 1)/(e − 1)).


With
1 + log(e/(π(e + 1)))/ log((e + 1)/(e − 1)) < 0,
1/ log((e + 1)/(e − 1)) < 1.3
we can simply choose

(12) T = 1.3 · log(q 1/2 · log(q · 10D ))


8 JEFFREY STOPPLE

5. T RUNCATION OF THE TAYLOR EXPANSIONS .

Suppose we make error δ in computing


G(s, 2πn/q 1/2 ) + G(1 − s, 2πn/q 1/2 ).
Using the bound n1/2 for rχ (n) and the rough estimate q 1/2 for N, the
maximal error we make in the sum for Z(t, χ) is bounded by
1/2
q
X
q −1/4
n1/2 · δ ≪ δ · q 1/2 .
n=1

Alternatively we can consider the standard error, assuming the er-


rors in the terms are independent with standard deviation ǫ. Then
the standard error in the sum is bounded by [1]
 1/2 1/2
q
X
q −1/4  (n1/2 · ǫ)2  ≪ ǫ · q 1/4 .
n=1

We will assume the latter from now on. We want ǫ · q 1/4 < 10−D , or
(13) ǫ < q −1/4 10−D ,
which will determine how many terms B we need to take in each
Taylor expansion.
It follows from the choice made in §3 that
∆j 1
= and xj − Rj = x1 /2.
Rj e
Thus the tail (9) of the Taylor series reduces to
2 exp(−x1 /2) −B
(14) ǫ= e (1 − 1/e)−1 .
x1
Again, with x1 = 2π/q 1/2 we combine (13) and (14) to find that we
require
q 1/2 exp(−π/q 1/2 )e−B (e − 1)/(πe) < q −1/4 10−D .
Since
exp(−π/q 1/2 )(e − 1)/(πe) < 1
we ignore it, and so we need q 3/4 10D < eB , and let
(15) B = log(q 3/4 10D ).
Even under the assumption of maximal error we would still only
need B = log(q10D ).
ODLYZKO ALGORITHM IN CONDUCTOR ASPECT 9

6. I MPLEMENTATION AND EXAMPLES .

To implement this algorithm requires the computation of reduced


representatives of all the forms, as well as their coordinates in terms
of the generators of the cyclic factors of the class group. This com-
putation is clearly O(q 1/2 ).
We then need to evaluate all the forms ax2 + bxy + cy 2 on a rect-
angular grid of integer lattice points (x, y), large enough not to miss
any representation of any integer n < N. Determining the dimen-
sions of the grid is a Lagrange multipliers problem; we must maxi-
mize g(x, y) = x (respectively f (x, y) = y) subject to the constraint
ax2 + bxy + cy 2 = N. One finds
x ≤ 2(Nc/q)1/2 and y ≤ 2(Na/q)1/2 .
Since the forms are reduced, the inequalities on c and a and our
choice (8) of N imply
x ≤ q 1/4 log(q · 10D )1/2 and y ≤ 2/31/4 log(q · 10D )1/2 .
We have triple (x2 , xy, y 2) for each lattice point, which are the rows
of a O(q 1/4 log(q · 10D )) × 3 matrix. Evaluation of the all the forms at
all the lattice points consists of multiplying the above matrix by the
3 × O(q 1/2 ) matrix of form data. This is O(q 3/4 log(q)) multiplications
(in terms of q, for a fixed number D of digits of accuracy.)
The representation numbers rQ (n) are computed by brute force
and ignorance; we look at each entry in the matrix product and in-
crement the corresponding rQ (n), another O(q 3/4 log(q)) operations.
Fast Fourier Transform on a group of size O(q 1/2 ) is O(q 1/2 log(q 1/2 )),
and the function is vector valued with N = O(q 1/2 log(q)) entries, for
a total computation of size O(q log(q)2 ).
For each character χ, the precomputation of the sums
X (2πn/q 1/2 − xj )k
rχ (n)
n∈Ij
∆kj

takes N ·B operations, which is O(q 1/2 log(q)2 ) by (8) and (15). Subse-
quently, evaluations of Z(t, χ) using (2) require only T ·B operations,
which is O(log(q)2 ) by (12) and (15).
This algorithm was implemented in Mathematica and run on a 400
MHz. Apple Powerbook G4 under OS X 10.2. Mathematica is a good
choice if one wants to re-invent the wheel as few times as possible.
The incomplete Gamma function Γ(s, x) is available; it is computed
via hypergeometric functions and continued fractions according to
10 JEFFREY STOPPLE

-q h(-q) C(-q) ♯ L-functions


-10000003 706 {706} 352
-10000004 1648 {412, 2, 2} 820
-10000007 3660 {3660} 1829
-10000011 816 {204, 2, 2} 404
-10000015 1134 {1134} 566
-10000019 1275 {1275} 637
-10000020 928 {232, 2, 2} 460
-10000023 2064 {258, 2, 2, 2} 1024
-10000024 990 {330, 3} 494
-10000027 282 {282} 140
-10000031 5426 {5426} NA
-10000036 876 {876} 437
-10000039 1912 {956, 2} 954
-10000043 618 {618} 308
-10000047 1512 {756, 2} 754
-10000051 742 {742} 370
-10000052 1692 {846, 2} 844
-10000055 3584 {896, 2, 2} 1788
-10000056 1480 {370, 2, 2} 736
-10000059 968 {484, 2} 482
-10000063 1722 {1722} 860
-10000072 724 {724} 361
-10000079 4147 {4147} 2073
-10000083 416 {208, 2} 206
-10000084 1364 {682, 2} 680
-10000087 1076 {1076} 537
-10000088 1512 {126, 6, 2} 752
-10000091 1382 {1382} 690
-10000095 2928 {732, 2, 2} 1460
-10000099 640 {320, 2} 318

TABLE 1. Class group data for various discriminants

[4, A.9.4]. Also the Fast Fourier Transform is supported in a sophis-


ticated way [4, A.9.4], via decomposition of the length of lists of data
into prime factors. For large factors, fast convolution methods are
used. Since our data are real (the representation numbers rQ (n)),
the algorithm makes use of a real transform method. Non-cyclic
ODLYZKO ALGORITHM IN CONDUCTOR ASPECT 11

0.8

0.6

0.4

0.2

0.5 1 1.5 2 2.5 3

F IGURE 1. Histogram data of first zero above 0.

1.2

0.8

0.6

0.4

0.2

0.5 1 1.5

F IGURE 2. 1-level density vs. 1 − sin(2πx)/(2πx)

abelian groups are handled automatically. The Mathematica func-


tion FindRoot finds zeros of functions by a combination of damped
Newton’s method, the secant method, and Brent’s method [4, A.9.4].
On the other hand, a specialized package for number theory, such
as PARI [7] is preferable for computations involving binary qua-
dratic forms. Fortunately, Mathematica’s MathLink capability allows
users to install their own C code, and this was done, essentially in-
stalling all the PARI functions for computations with binary qua-
dratic forms into Mathematica. (This was documented in [8].)
The accuracy of the algorithm was checked by computing, to 15
digits, the zeros of some genus character L-functions. By genus the-
ory, these are products of Dirichlet L-functions attached to quadratic
characters. These zeros were first computed directly, writing the
Dirichlet L-function as a linear combination of Hurwitz zeta func-
tions (also supported in Mathematica). The zeros were also compared
to the data in [10], and agreed to the number of digits given.
12 JEFFREY STOPPLE

1.2

0.8

0.6

0.4

0.2

1 1.1 1.2 1.3 1.4


F IGURE 3. Mean of first zero vs. h(−q)/ q.

The algorithm was then run on 21336 L-functions with conductor


near q = 107. The Hardy function Z(t, χ) was evaluated, to six dig-
its of accuracy, for t between 0. and 1. in steps of size 2π/(20 log(q)),
looking for sign changes. When detected, Mathematica’s FindRoot
was used to find the zero. This calculation took 137 hours, 21 min-
utes, and found 35190 zeros below t = 1. No attempt was made to
prove GRH for these L-functions in this range, or to prove that all
the zeros had been located.
Table 1 shows the discriminants, class numbers, class group struc-
ture, and number of L-functions (omitting real (genus) characters,
and one of each complex conjugate pair.) Figure 1 shows a histogram
of of the lowest zero, renormalized by γ̃ = γ · log(q)/(2π). These
seem to support a conjecture that the corresponding random matrix
model is symplectic (see [2, Figure 5]). The mean height above 0. is
1.13, considerably larger than
Z ∞
.78 = tν1 (USp)(t)dt
0

predicted by this model, due to the slow convergence as q → ∞.


Figure 2 compares the 1-level density of USp(∞), that is,

1 − sin(2πx)/(2πx),
ODLYZKO ALGORITHM IN CONDUCTOR ASPECT 13

to the histogram data


(β − α)−1 XX
χ[α,β) (.78/1.18 · γ̃),
♯{characters φ} φ γ

where
[α, β) = [0, .05), [.05, .1), . . . , [1.75, 1.80)
(Here we denote the L-function L(s, φ), so that χ[α,β) can denote a
characteristic function, as usual.) The zeros γ̃ have been re-renormalized
so that the mean above 0. of the first zero is .78.
Finally, for each of the 29 discriminants considered, the mean above
0. of the first zero for the L-functions with that discriminant was

compared to the relative size h(−q)/ q of the class number. Fig-
ure 3 shows the plot. Surprisingly, the discriminants with smaller
class number tend to have a larger mean first zero. The correlation
between the two quantities is −.89.
R EFERENCES
[1] G. Dahlquist, Numerical Methods, Prentice Hall, 1974.
[2] N. Katz, and P. Sarnak, Zeros of zeta functions and symmetry, Bull. Amer. Math.
Soc., 36, no. 1, 1999, pp. 1-26.
[3] J. Lagarias, and A. Odlyzko, On computing Artin L-functions in the critical strip,
Math. Comp. 33, 147, 1979, pp.1081-1095.
[4] S. Wolfram, The Mathematica Book, 4th ed., 1999.
[5] H. Montgomery, and P. Weinberger, Notes on small class numbers, Acta Arith.
XXIV 1974, pp. 529-542.
[6] A. Odlyzko, and A. Schönhage, Fast algorithms for multiple evaluations of the
Riemann zeta function, Trans. Amer. Math. Soc. 309, 2, 1988 pp. 797-809.
[7] PARI-GP. By C. Batut, D. Bernardi, H. Cohen , and M. Olivier, currently main-
tained by K. Belabas. http://www.parigp-home.de
[8] PARI-GP mailing list, available at
http://www.parigp-home.de/lists/200212aav
[9] M. Rubinstein, Evidence for a spectral interpretation of the zeros of L-functions,
Ph.D. thesis, Princeton 1998.
[10] R. Rumely, Numerical computations concerning the ERH, Math. Comp., 61, 203,
1993, pp. 415-440.
[11] P. Weinberger, On small zeros of Dirichlet L-functions, Math. Comp., 29 no. 129,
1975, pp. 319-328.
E-mail address: [email protected]

You might also like