Computing L-Functions of Quadratic Characters at Negative Integers
aa r X i v : . [ m a t h . N T ] J a n Computing L -Functions of Quadratic Charactersat Negative Integers Henri CohenUniversit´e de Bordeaux,Institut de Math´ematiques, U.M.R. 5251 du C.N.R.S,351 Cours de la Lib´eration,33405 TALENCE Cedex, FRANCEJanuary 27, 2021
Abstract
We survey a number of different methods for computing L ( χ, − k ) fora Dirichlet character χ , with particular emphasis on quadratic characters.The main conclusion is that when k is not too large (for instance k ≤ k is large the best method is the use of the completefunctional equation, unless the conductor of χ is really large, in whichcase the previous method again prevails. This paper can be considered as a complement of two of my old papers [2] and[3], updated to include new formulas, and surveying existing methods.The general goal of this paper is to give efficient methods for computingthe values at negative integers of L -functions of Dirichlet characters χ . Sincethese values are algebraic numbers, more precisely belong to the cyclotomicfield Q ( χ ), we want to know their exact value. When χ ( −
1) = ( − r − wehave L ( χ, − k ) = 0, so we always assume implicitly that χ ( −
1) = ( − r . Inaddition, if χ is a non-primitive character modulo F and χ f is the primitivecharacter associated to χ , we have L ( χ, − k ) = L ( χ f , − k ) Y p | F, p ∤ f (1 − χ f ( p ) p r − ) , so we may assume that χ is primitive.Note that we will not consider the slightly different problem of computing tables of L ( χ, − k ), either for fixed k and varying χ (such as χ = χ D the1uadratic character of discriminant D ), or for fixed χ and varying k , althoughseveral of the methods considered here can be used for this purpose.In addition to their intrinsic interest, these computations have several appli-cations, for instance:(1) Computing λ -invariants of quadratic fields (I am indebted to J. Ellenbergand S. Jain for this, see [7]).(2) Computing Sato–Tate distributions for modular forms of half-integral weight,see [8] and [9].(3) Computing Hardy–Littlewood constants of polynomials, see [1].There exist at least five different methods for computing these quantities,some having several variants. We denote by F the conductor of χ .(1) Bernoulli methods: one can express L ( χ, − k ) as a finite sum involving O ( F ) terms and Bernoulli numbers, so that the time required is ˜ O ( F )(we use the “soft-O” notation ˜ O ( X ) to mean O ( X ε ) for any ε > χ -Bernoulli numbers, the second which uses recursions .(2) Use of the complete functional equation . Using it, it is sufficient first tocompute numerically L ( χ, k ) to sufficient accuracy (given by the functionalequation), which is done using the Euler product, and second to know anupper bound on the denominator of L ( χ, − k ), which is easy (and usuallyequal to 1). The required time is also ˜ O ( F ), but with a much smallerimplicit O () constant.(3) Use of the approximate functional equation , which involves in particularcomputing the incomplete gamma function or similar higher transcenden-tal functions. The required time is ˜ O ( F / ), but with a large implicit O ()constant.(4) Use of Hecke-Eisenstein series (Hilbert modular forms) on the full modulargroup, which expresses L ( χ, − k ) as a finite sum involving O ( F / ) termsand (twisted) sum of divisors function. The required time is ˜ O ( F / ) witha very small implicit O () constant. A variant which is useful only forvery small k such as k ≤
10 uses Hecke-Eisenstein series on congruencesubgroups of small level.(5) Use of Eisenstein series of half-integral weight over Γ (4), which again ex-presses L ( χ, − k ) as a finite sum involving O ( F / ) terms and (twisted)sum of divisors function, but different from the previous ones. The re-quired time is again ˜ O ( F / ), but with an even smaller implicit O () con-stant. An important variant, valid for all k , is to use modular forms ofhalf-integral weight on subgroups of Γ (4).2he first three methods are completely general, but the last two are reallyefficient only if χ is equal to a quadratic character or possibly a quadraticcharacter times a character of small conductor. We will therefore present allfive methods and their variants, but consider the last two methods only in thecase of quadratic characters, and therefore compare them only in this case.After implementing these methods and comparing their running times forvarious values of F , we have arrived at the following conclusions: first, thetwo fastest methods are always either the fifth (Eisenstein series of half-integralweight) or the second (complete functional equation). Second, one should choosethe second method only if k is large, for instance k ≥ F is large.Note also that the case F = 1 corresponds to the computation of Bernoullinumbers, and that indeed the fastest method for this is the use of the completefunctional equation of the Riemann zeta function.Because of these conclusions, we will give explicitly the formulas for the first,third, and fourth method, but only describe the precise implementations andtimings for the second and fifth, which are the really useful ones. Proposition 2.1
Define the χ -Bernoulli numbers B k ( χ ) by the generating func-tion Te F T − X ≤ r 2. Also, recall that for k ≥ B k ( χ ) = 0 if χ ( − = ( − k . Proposition 2.2 Set S n ( χ ) = P ≤ r We have the recursion X ≤ j Let χ be a nontrivial primitive character of conductor F , set ε = χ (2) and Q k ( χ ) = X ≤ r Let χ be a nontrivial primitive character of conductor F . (1) If χ is even we have X ≤ j ≤ ( k − / (cid:18) k j + 1 (cid:19) F j B k − j ( χ )2 k − j = ( − k F X ≤ r We have L ( χ, − k ) = 2 · ( k − F k ( − iπ ) k g ( χ ) L ( χ, k ) , where g ( χ ) is the standard Gauss sum of modulus | F | / associated to χ . Corollary 3.2 As k → ∞ we have | L ( χ, − k ) | ∼ · e − / (cid:18) kF πe (cid:19) k − / . Proof. Clear from Stirling’s formula and the fact that L ( χ, k ) tends to 1when k → ∞ . ⊓⊔ Theorem 3.3 Denote by u the order of χ , so that u | φ ( F ) and L ( χ, − k ) ∈ K = Q ( ζ u ) . We have D ( χ, k ) L ( χ, − k ) ∈ Z [ ζ u ] , where the “denominator” D ( χ, k ) can be chosen as follows: (1) If F is not a prime power then D ( χ, k ) = 1 . (2) Assume that F = p v for some odd prime p and v ≥ .(a) If u = p v − ( p − / gcd( p − , k ) then D ( χ, k ) = 1 .(b) If u = p v − ( p − / gcd( p − , k ) then D ( χ, k ) = pk/ (( p − /u ) if v = 1 or D ( χ, k ) = χ (1 + p ) − if v ≥ . (3) If F = 2 v for some v ≥ then D ( χ, k ) = 1 if v ≥ , while D ( χ, k ) = 2 if v = 2 . (4) If F = 1 then D ( χ, k ) = k Q ( p − | k p . Stronger statements are easy to obtain, see [5], but these bounds are suffi-cient. 5o compute L ( χ, − k ) using these results, we proceed as follows. Let B bechosen so that B > ( k − / 2) log( kF/ (2 πe )) + log( | D ( χ, k ) | ) + 10 , where 10 is simply a safety margin. Thanks to the above two results, computing L ( χ, − k ) to relative accuracy e − B will guarantee that the coefficients of thealgebraic integer D ( χ, k ) L ( χ, − k ) on the integral basis ( ζ ju ) ≤ j<φ ( u ) will becorrect to accuracy e − , say, and since they are in Z , they can thus be recoveredexactly.Thanks to the functional equation, it is thus sufficient to compute L ( χ, k )to relative accuracy e − B , but since L ( χ, k ) is close to 1, k being large, this isthe same as absolute accuracy. Note from the above formula that B will be(considerably) larger than k .To compute L ( χ, k ), we first compute Q p ≤ L ( B,k ) (1 − χ ( p ) /p k ), using aninternal accuracy of e − kB/ ( k − and limit L ( B, k ) = ( e B / ( k − / ( k − . Moreprecisely, we initially set P = 1, and for primes p going from 2 to L ( B, k ),we compute 1 /p k to p k e − kB/ ( k − of relative accuracy (this is crucial), andthen set P ← P − P (1 /p k ). It is clear that this will compute 1 /L ( χ, k ) tothe desired precision, from which we immediately obtain L ( χ, k ). Importantimplementation remark: to compute the accuracy needed in the intermediatecomputations, one does not compute log( p k ) = k log( p ), but only some roughapproximation, for instance by counting the number of bytes that the multi-precision integer p k occupies in memory, or any other fast method.Even though this method is designed to be fast for relatively large k , we findthat it is considerably faster than any of the Bernoulli methods, even for verysmall k , the ratio increasing with increasing k and decreasing F .Here are the times obtained using this method. The reader will notice thatthe times for very small k are larger than for moderate k due to the very largenumber of Euler factors to be computed, the smallest being impossibly long.We use ∗ to indicate very long times (usually more than 100 seconds), and onthe contrary – to indicate a negligible time, less than 50 milliseconds. D (cid:31) k + 1 ∗ . 03 0 . 20 0 . 11 0 . 09 0 . 08 0 . 08 0 . 07 0 . + 1 ∗ . . 36 1 . 19 0 . 93 0 . 81 0 . 79 0 . 73 0 . + 1 ∗ ∗ . . . 75 8 . 32 7 . 97 7 . 25 7 . + 1 ∗ ∗ ∗ ∗ . . . . . D (cid:31) k 20 40 60 80 100 150 200 250 30010 + 1 – – – – – 0 . 06 0 . 08 0 . 11 0 . + 1 0 . 08 0 . 12 0 . 17 0 . 22 0 . 29 0 . 48 0 . 68 1 . 01 1 . + 1 0 . 77 1 . 09 1 . 62 2 . 01 2 . 66 4 . 48 6 . 29 9 . 23 12 . + 1 7 . 52 10 . . . . . . . . + 1 75 . . ∗ ∗ ∗ ∗ ∗ ∗ ∗ (cid:31) k 400 800 1600 3200 6400 12800 25600 5120010 + 5 – – – – 0 . 24 1 . 25 6 . 36 31 . + 1 – – 0 . 07 0 . 34 1 . 85 9 . 84 51 . ∗ + 1 – 0 . 11 0 . 56 2 . 94 15 . . ∗ ∗ + 1 0 . 24 0 . 98 4 . 96 26 . ∗ ∗ ∗ ∗ + 1 2 . 16 9 . 49 44 . ∗ ∗ ∗ ∗ ∗ + 1 20 . . ∗ ∗ ∗ ∗ ∗ ∗ All the methods that we have seen up to now take time proportional to theconductor F , the main difference between them being the dependence in k andthe size of the implicit constant in the time estimates.We are now going to study a number of methods which take time pro-portional to F / ε for any ε > 0. The simplest version of the approximatefunctional equation that we will use is as follows: Theorem 4.1 Let e = 0 or be such that χ ( − 1) = ( − k = ( − e . For anycomplex s we have the following formula, valid for any A > : Γ (cid:18) s + e (cid:19) L ( χ, s ) = X n ≥ χ ( n ) n s Γ (cid:18) s + e , Aπn F (cid:19) + ε ( χ ) X n ≥ χ ( n ) n − s Γ (cid:18) − s + e , πn AF (cid:19) , where the root number ε ( χ ) is given by the formula ε ( χ ) = g ( χ ) / ( i e √ F ) , where g ( χ ) is the Gauss sum attached to χ , and Γ( s, x ) is the incomplete gammafunction Γ( s, x ) = R ∞ x t s − e − t dt . Since Γ( s, x ) ∼ x s − e − x hence tends to 0 exponentially fast as x → ∞ ,the above formula does lead to a ˜ O ( F / ) algorithm for computing L ( χ, s ), notnecessarily for a negative integer s . Note that this type of formula is availablefor any type of L -function with functional equation, not only those attached toa Dirichlet character.The constant A is included as a check on the implementation, since the left-hand side is independent of A , but once checked the optimal choice is A = 1.This constant can also be used to compute ε ( χ ) if it is not known (note that ε ( χ ) = 1 if χ is quadratic), but there are better methods to do this.Even though this method is in ˜ O ( F / ), so asymptotically much faster thanthe first two methods that we have seen, its main drawback is the computationtime of Γ( s, x ). Even though quite efficient methods are known for computingit, our timings have shown that in all ranges of the conductor F and value of k , either the use of the full functional equation or the use of Eisenstein seriesof half-integral weight (methods (2) and (5)) are considerably faster, so we willnot discuss this method further. 7 Using Hecke–Eisenstein Series The main theorem comes from the computation of the Fourier expansion ofHecke–Eisenstein series in the theory of Hilbert modular forms, and is easilyproved using the methods of [3]: Theorem 5.1 Let K be a real quadratic field of discriminant D > , let ψ bea primitive character modulo F such that ψ ( − 1) = ( − k , let N be a squarefreeinteger, and assume that gcd( F, N D ) = 1 . If we set a k,ψ,N (0) = Y p | N (1 − ψχ D ( p ) p k − ) L ( ψ, − k ) L ( ψχ D , − k )4 , and for n ≥ : a k,ψ,N ( n ) = X d | n gcd( d,N )=1 ψχ D ( d ) d k − X s ∈ Z σ k − ,ψ (cid:18) ( n/d ) D − s N (cid:19) , where σ k − ,ψ ( m ) = P d | m ψ ( d ) d k − , then X n ≥ a k,ψ,N ( n ) q n ∈ M k (Γ ( F N ) , ψ ) . Note that in the above we set implicitly σ k − ,ψ ( m ) = 0 if m / ∈ Z ≥ .The restriction gcd( F, N ) = 1 is not important, since letting N have factorsin common with F would not give more general results. Similarly for the restric-tion on N being squarefree. On the other hand, the restriction gcd( F, D ) = 1is more important: similar results exist when gcd( F, D ) > 1, but they are con-siderably more complicated. Since we need them, we will give one such resultbelow in the case gcd( F, D ) = 4.We use this theorem in the following way. First, we must assume for practicalreasons that k , F , and N are not too large. In that case it is very easy tocompute explicitly a basis for M k (Γ ( F N ) , ψ ). Given this basis, it is then easyto express any constant term of an element of the space as a linear combinationof u coefficients (not necessarily the first ones), where u is the dimension of thespace. In particular, this gives a k,ψ,N (0), and hence L ( ψχ D , − k ), as a finitelinear combination of some a k,ψ,N ( n ) for n ≥ ψ must be small, the method is thus applicableonly to compute L ( χ, − k ) for Dirichlet characters χ which are “close” toquadratic characters, in other words of the form ψχ D with conductor of ψ small. Of course the quantities L ( ψ, − k ) are computed once and for all (usingany method, since F and k are small). Note that the auxiliary integer N is usedonly to improve the speed of the formulas, as we will see below, but of courseone can always choose N = 1 if desired.8 .2 The Case k Even For future use, define S k ( m, N ) = X s ∈ Z σ k (cid:18) m − s N (cid:19) , where for any arithmetic function f such as σ k we set f ( x ) = 0 if x Z ≥ , i.e.,if x is either not integral or non-positive. Using the theorem with F = N = 1we immediately obtain formulas such as L ( χ D , − 1) = − S ( D, L ( χ D , − 3) = S ( D, L ( χ D , − 5) = − (cid:18)(cid:18) 24 + 2 (cid:18) D (cid:19)(cid:19) S ( D, 4) + S ( D, (cid:19) To obtain a general formula we recall the following theorem of Siegel: Theorem 5.2 Let r = dim( M k (Γ)) and define coefficients c ki by ∆ − r E r − k +2 = X i ≥− r c ki q i , where by convention E = 1 . Then for any f = P n ≥ a ( n ) q n ∈ M k (Γ) we have X ≤ n ≤ r a ( n ) c k − n = 0 , and c k = 0 . Combined with the main theorem (with F = N = 1), we obtain the followingcorollary: Corollary 5.3 Keep the above notation, let k ≥ be an even integer, and set r = dim( M k (Γ)) = ⌊ k/ ⌋ + 1 . If D > is a fundamental discriminant we have L ( χ D , − k ) = 4 kc k B k X ≤ m ≤ r S k − ( m D, X ≤ d ≤ r/m d k − (cid:18) Dd (cid:19) c k − dm . For very small values of k it is possible to improve on the speed of the abovegeneral formula by choosing F = 1 but larger values of N in the theorem.Without entering into details, on average we can gain a factor of 3 . 95 for k = 2,of 1 . k = 6, and of 1 . k = 8, and I have found essentially no improvementfor other values of k including for k = 4.The advantages of this method are threefold. First, it is by far the fastestmethod seen up to now for computing L ( χ D , − k ). Second, the universal9oefficients c k − n that we need are easily computed thanks to Siegel’s theorem.And third, the flexibility of choosing the auxiliary Dirichlet character ψ in thetheorem allows us to compute L ( χ, − k ) for more general characters χ thanquadratic ones.The two disadvantages are first that the quantities S k − ( m D, 4) need tobe computed for each m (although some duplication can be avoided), and sec-ond that m D becomes large when m increases. These two disadvantages willdisappear in the method using Eisenstein series of half-integral weight (at theexpense of losing some of the advantages mentioned above), so we will not givethe timings for this method. k Odd Thanks to the main theorem, although Hilbert modular forms in two variablesare only for real quadratic fields, thus with discriminant D > 0, if we choosean odd character ψ such as ψ = χ − or χ − , it can also be used to compute L ( χ D , − k ) for D < 0, hence k odd. I have not been able to find useful formulaswith ψ = χ − , so from now on we assume that ψ = χ − , so F = 4. We firstintroduce some notation. Definition 5.4 We set σ (1) k ( m ) = X d | m (cid:18) − d (cid:19) d k , σ (2) k ( m ) = X d | m (cid:18) − m/d (cid:19) d k , and S ( j ) k ( m, N ) = X s ∈ Z σ ( j ) k (cid:18) m − s N (cid:19) , with the usual understanding that σ ( j ) k ( m ) = 0 if m / ∈ Z ≥ . Note that, as for σ k itself when k is odd, for k even these arithmetic func-tions occur naturally as Fourier coefficients of Eisenstein series of weight k + 1and character (cid:0) − . (cid:1) . More precisely, for k ≥ E k ( χ − , 1) and E k (1 , χ − ) form a basis of the Eisenstein subspace of M k (Γ (4) , χ − ), where E k ( χ − , τ ) = L ( χ − , − k )2 + X n ≥ σ (1) k − ( n ) q n and E k (1 , χ − )( τ ) = X n ≥ σ (2) k − ( n ) q n . To be able to use the theorem in general, it is necessary to assume thefollowing: Conjecture 5.5 If D > is squarefree (not necessarily a discriminant), F = 4 ,and N = 1 , the statement of Theorem 5.1 is still valid verbatim. ψ = χ − and theHecke operator T (2) it is immediate to prove the following: Corollary 5.6 Let D < − be any fundamental discriminant. Set a k,D (0) = (cid:18) − k − (cid:18) D (cid:19)(cid:19) L ( χ − , − k ) L ( χ D , − k )4 , and a k,D ( n ) = X d | n (cid:18) D/δd (cid:19) d k − S (1) k − (( n/d ) | D/δ | , , where δ = 1 if D ≡ and δ = 4 if D ≡ . Then P n ≥ a k,D ( n ) q n ∈ M k (Γ (2)) . To use this result, we need an analogue of Siegel’s Theorem 5.2 for Γ (2),and for this we need to introduce a number of modular forms. Definition 5.7 We set F ( τ ) = 2 E (2 τ ) − E ( τ ) , F ( τ ) = (16 E (2 τ ) − E ( τ )) / ,and ∆ ( τ ) = ( E ( τ ) − E (2 τ )) / , where E and E are the standard Eisen-stein series of weight and on the full modular group. Note that F ∈ M (Γ (2)) and F and ∆ are in M (Γ (2)). Theorem 5.8 Let k ∈ Z be a positive even integer, set r = ⌊ k/ ⌋ + 2 , E = F F if k ≡ , E = F if k ≡ , and write E/ ∆ r = P i ≥− r c ki q i . Then for any F = P n ≥ a ( n ) q n ∈ M k (Γ (2)) we have X ≤ n ≤ r a ( n ) c k − n = 0 , and in addition c k = 0 . Note that since we will use this theorem for M k (Γ (2)) with k odd, we have2 k ≡ E = F . The analogue of Corollary 5.3is then as follows: Corollary 5.9 Keep the above notation, let k ≥ be an odd integer, and set r = ( k + 3) / . If D < − is a fundamental discriminant we have L ( χ D , − k ) = 8 A X ≤ m ≤ r S (1) k − ( m | D | /δ, X ≤ d ≤ r/m d k − (cid:18) D/δd (cid:19) c k − dm , with A = c k (2 k − (cid:0) D (cid:1) − E k − , and where the E k are the Euler numbers ( E = 1 , E = − , E = 5 , E = − ,. . . ). The advantages/disadvantages mentioned in the case k even are the samehere. 11 Using Eisenstein Series of Half-Integral Weight We now come to the most powerful method known to the author for computing L ( χ D , − k ): the use of Eisenstein series of half-integral weight. Once again,we will see a sharp distinction between k even and k odd. We first begin byrecalling some basic results on M w (Γ (4)) (we use the index w for the weightsince it will be used with w = k +1 / (4). M w (Γ (4)) Recall that the basic theta function θ ( τ ) = P s ∈ Z q s = 1 + 2 P s ≥ q s satisfiesfor any γ = (cid:0) a bc d (cid:1) ∈ Γ (4) the modularity condition θ ( γ ( τ )) = v θ ( γ )( cτ + d ) / θ ( τ ), where the theta-multiplier system v θ ( γ ) is given by v θ ( γ ) = (cid:18) − d (cid:19) − / (cid:16) cd (cid:17) , and all square roots are taken with the principal determination. The space M w (Γ (4) , v wθ ) of holomorphic functions behaving modularly like θ w underΓ (4) and holomorphic at the cusps will be simply denoted M w (Γ (4)) sincethere is no risk of confusion. Note, however, that if w is an odd integerand in the context of modular forms of integral weight, M w (Γ (4)) is denoted M w (Γ (4) , χ − ).We recall the following easy and well-known results (note that F and ∆ are not the same functions as those used above): Proposition 6.1 Define F ( τ ) = η (4 τ ) η (2 τ ) = − 124 ( E ( τ ) − E (2 τ ) + 2 E (4 τ )) , ∆ ( τ ) = η ( τ ) η (4 τ ) η (2 τ ) = 1240 ( E ( τ ) − E (2 τ ) + 16 E (4 τ )) . (1) We have M w M w (Γ (4)) = C [ θ, F ] and M w S w (Γ (4)) = θ ∆ C [ θ, F ] . (2) In particular we have the dimension formulas dim( M w (Γ (4))) = ( for w < 01 + ⌊ w/ ⌋ for w ≥ . dim( S w (Γ (4))) = for w ≤ ⌊ w/ ⌋ − for w > , w / ∈ Z ⌊ w/ ⌋ − for w > , w ∈ Z . 12e also recall that when w ∈ / Z , the Kohnen +-space of M w (Γ (4)),denoted simply by M + w , is defined to be the space of forms F having a Fourierexpansion F ( τ ) = P n ≥ a ( n ) q n with a ( n ) = 0 if ( − w − / n , M +1 / = M / (Γ (4)) and M +3 / = { } , so we will always assume that w ≥ / 2. In that case there a singleEisenstein series in M + w , due to the author, that we will denote by H k : its im-portance is due to the fact that if we write H k ( τ ) = P n ≥ a k ( n ) q n , then if D =( − w − / n is a fundamental discriminant we have a k ( n ) = L ( χ D , − ( w − / H k automaticallygives us a fast method for computing our desired quantities L ( χ D , − k ) with k = w − / M + w , which we of course denote by S + w , is formed bythe cusp forms belonging to M + w . One of Kohnen’s main theorems is that S + w is Hecke-isomorphic to the space of modular forms of even weight S w − (Γ). Inparticular, note the following: Corollary 6.2 For w ≥ / half-integral we have dim( M + w ) = ( ⌊ w/ ⌋ if ∤ ( w − / , ⌊ w/ ⌋ if | ( w − / . Notation:(1) Recall that if a ( n ) is any arithmetic function (typically a = σ k − or twistedvariants), we define a ( x ) = 0 if x / ∈ Z ≥ .(2) If F is a modular form and d ∈ Z ≥ , we denote by F [ d ] the function F ( dτ ).(3) We will denote by D ( F ) the differential operator qd/dq = (1 / (2 πi )) d/dτ . k Even using Γ (4) The main idea is to use Rankin–Cohen brackets of known series with θ to gen-erate M + w : indeed, θ and its derivatives are lacunary , so multiplication by themis much faster than ordinary multiplication, at least in reasonable ranges (oth-erwise Karatsuba or FFT type methods are faster to construct tables ).First note the following immediate result: Proposition 6.3 The form θE [4] − D ( θ ) is a basis of M +5 / and the form θE [4] is a basis of M +9 / . In particular, we recover the formulas L ( χ D , − 1) = ( − / S ( D, 4) and L ( χ D , − 3) = S ( D, 4) already obtained using Hecke–Eisenstein series.As in the case of Hecke–Eisenstein series, we will need to distinguish twocompletely different cases: the case w − / even , which is considerably simpler,and the case w − / heorem 6.4 Assume that w ≥ / is such that k = w − / ∈ Z . Themodular forms ([ θ, E k − j [4]] j ) ≤ j ≤⌊ k/ ⌋ form a basis of M + w , where we recall that [ f, g ] n denotes the n th Rankin–Cohenbracket. We can now easily achieve our goal. First, we compute the Fourier ex-pansions of the basis given by the theorem up to the Sturm bound. Then tocompute L ( χ D , − k ) with k = w − / 2, we do as follows: we compute theFourier expansion of H k up to the Sturm bound, and using the basis coefficientswe deduce a linear combination of the form H k = X ≤ j ≤⌊ k/ ⌋ c kj [ θ, E k − j [4]] j . We can easily compute the coefficients of these brackets: Proposition 6.5 Let F r = − B r E r / (2 r ) be the Eisenstein series of level andweight r normalized so that the Fourier coefficient q is equal to . We have [ θ, F r [4]] n = P m ≥ b n,r ( m ) q m , with b n,r ( m ) = m n X s ∈ Z P n,r ( s /m ) σ r − (cid:18) m − s (cid:19) , where P n,r ( X ) = n X ℓ =0 ( − ℓ (cid:18) n − / ℓ (cid:19)(cid:18) n + r − ℓ − / n − ℓ (cid:19) X n − ℓ , are Gegenbauer polynomials . In particular, if we generalize a previous notation and set for any polynomial P n of degree n S k ( m, N, P n ) = m n X s ∈ Z P n ( s /m ) σ k (cid:18) m − s N (cid:19) , we have L ( χ D , − k ) = X ≤ j ≤⌊ k/ ⌋ c kj S k − j − ( D, , P j,k − j ) . The biggest advantage of this formula compared to the one coming from Hecke–Eisenstein series is that the different S k − j − can be computed simultaneouslysince they involve factoring the same integers ( D − s ) / 4, and in addition theseintegers stay small, contrary to the former method where the integers were ofthe form ( n D − s ) / χ , but mainly because for large k the computa-tion of c kj involves solving a linear system of size proportional to k , so when k is14n the thousands, this becomes prohibitive. It is possible that there is a muchfaster method to compute them analogous to Siegel’s theorem which expressesthe constant term of a modular form as a universal (for a given weight) linearcombination of higher degree terms, but I do not know of such a method.As already mentioned, this gives the fastest method known to the author forcomputing L ( χ D , − k ), at least when k is not unreasonably large. k Even using Γ (4 N ) We can, however, do better by using subgroups of Γ (4), i.e., brackets with E k − j [4 N ] for N > 1. Recall that in the case of Hecke–Eisenstein series thisallowed us to give faster formulas only for very small values of k ( k = 2, 6and 8). On the contrary, we are going to see that here we can obtain fasterformulas for all k , only depending on congruence and divisibility properties ofthe discriminant D .After considerable experimenting, I have arrived at the following conjecture,which I have tested on tens of thousands of cases and proved in small weights.All of these identities can in principle be proved. Conjecture 6.6 For N = 4 , , and and any even integer k ≥ there existuniversal coefficients c kj,N such that for all positive fundamental discriminants D (which in addition must be congruent to modulo when N = 16 ) we have (cid:18) (cid:18) DN/ (cid:19)(cid:19) L ( χ D , − k ) = X ≤ j ≤⌊ k/m N ⌋ c kj,N S k − j − ( D, N, P j,k − j ) , with m N = 6 , , , and respectively and the same polynomials P as above. By what we said above this conjecture is proved for N = 4 (with c kj, = 2 c kj ),and should be easy to prove using the finite-dimensionality of the correspondingmodular form spaces together with the Sturm bounds, but I have not done theseproofs. It is also easy to prove for small values of k .It is clear that if we can choose a larger value of N than N = 4 (i.e.,when 1 + (cid:16) DN/ (cid:17) = 0) the number of terms involved in S k − j − will be smaller.Computing that number leads to the following algorithm:If 3 | D use N = 12, otherwise if D ≡ N = 16, otherwise if4 | D use N = 8, otherwise if D ≡ N = 12, otherwise use N = 4.Note, however, that the size of the linear system which needs to be solvedto find the coefficients c kj,N is larger when N > 4, so one must balance thetime to compute these coefficients with the size of D : for very large D it maybe worthwhile, but for moderately large D it may be better to always choose N = 4 (see the second table below).As before, we give tables of timings using these improvements. Note thatthey are only an indication, since congruences modulo 16 and 3 may improvethe times: 15 (cid:31) k + 1 0 . 07 0 . 07 0 . 07 0 . 08 0 . 08 0 . 09 0 . 09 0 . 11 0 . + 9 0 . 30 0 . 32 0 . 33 0 . 35 0 . 36 0 . 39 0 . 40 0 . 44 0 . + 1 2 . 25 2 . 31 2 . 32 2 . 41 2 . 42 2 . 53 2 . 55 2 . 67 2 . + 1 10 . . . . . . . . . + 1 54 . . . . . . . . . N only when D issufficiently large, and the corresponding timings have a ∗ ; all the others areobtained only with N = 4: D (cid:31) k 20 40 60 80 100 150 200 250 300 35010 + 1 – – – – – – 0 . 07 0 . 14 0 . 29 0 . + 1 – – – – – 0 . 08 0 . 16 0 . 30 0 . 55 0 . + 1 – – – 0 . ∗ . ∗ . 25 0 . 50 0 . 89 1 . 50 2 . + 1 – 0 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . + 1 0 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ + 9 0 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ + 1 2 . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ ∗ ∗ ∗ + 1 12 . ∗ . ∗ . ∗ . ∗ . ∗ ∗ ∗ ∗ ∗ ∗ + 1 60 . ∗ . ∗ . ∗ ∗ ∗ ∗ ∗ ∗ ∗ For larger values of k the time to compute the coefficients dominate, so wefirst give a table giving these timings: N (cid:31) k 100 200 300 400 500 600 700 800 900 10004 – 0 . 04 0 . 20 0 . 69 1 . 95 4 . 04 7 . 54 13 . . . 48 – 0 . 17 0 . 87 2 . 77 6 . 95 14 . . . . ∗ 12 – 0 . 32 1 . 90 5 . 77 14 . . . ∗ ∗ ∗ 16 – 0 . 20 1 . 13 3 . 64 9 . 59 20 . . . . ∗ As already mentioned, these timings would become much smaller if we hada method analogous to Siegel’s theorem to compute them. D (cid:31) k 400 500 600 700 800 900 100010 + 1 0 . 73 2 . 03 4 . 16 7 . 72 13 . . . + 1 0 . 87 2 . 26 4 . 53 8 . 27 14 . . . + 1 1 . 39 3 . 21 6 . 91 10 . . . . + 1 3 . 33 6 . 61 11 . . . , . + 1 10 . . . . . . ∗ + 1 31 . ∗ . ∗ . ∗ ∗ ∗ ∗ ∗ + 9 108 . ∗ ∗ ∗ ∗ ∗ ∗ ∗ .4 The Case k Odd using Γ (4 N ) In this case, the Kohnen +-space, to which H k belongs, is the space of modularforms P n ≥ a ( n ) q n such that a ( n ) = 0 if n ≡ directly obtain elements in this space using brackets with θ . What wecan do is the following: as above, for ℓ ≥ E (1) ℓ := E ℓ ( χ − , τ ) = L ( χ − , − ℓ )2 + X n ≥ σ (1) ℓ − ( n ) q n and E (2) ℓ := E ℓ (1 , χ − )( τ ) = X n ≥ σ (2) ℓ − ( n ) q n , which belong to M ℓ (Γ (4)) (using our notation, otherwise we should write M ℓ (Γ (4) , χ − )). It is clear that for u = 1 and 2 the j -th brackets [ θ, E ( u ) k − j ] j belong to M k +1 / (Γ (4)), and it should be easy to prove that they generatethis space (I have extensively tested this, and if it was not the case the im-plementation would detect it). We can therefore express any modular form, inparticular H k , as a linear combination of these brackets, and therefore againobtain explicit formulas for L ( χ D , − k ).However, we can immediately do considerably better in two different ways.First, by Shimura theory we know that T (4) H k still belongs to M k +1 / (Γ (4)),and by definition it is equal to P n ≥ H k (4 n ) q n . Expressing it as a linear com-bination of the above brackets again gives formulas for L ( χ D , − k ), but wherethe coefficients involve | D | / | D | , so much faster (and of course ap-plicable only for D ≡ not applicable in thecase of even k because T (4) H k is not anymore in the Kohnen +-space, so wewould lose all the advantages of having a space of small dimension.The second way in which we can do better is to consider brackets of θ with E ( u ) ℓ [ N ] (where we replace q n by q Nn ) for suitable values of N : notethat these modular forms belong to M k +1 / (Γ (4 N )). It is then necessary toapply a Hecke-type operator to reduce the dimension of the spaces that weconsider. More precisely, if we only look at coefficients a ( | D | ) with given (cid:0) D (cid:1) ,we see experimentally that there is a linear relation between H k and the abovebrackets. This leads to the following analogue for k odd of Conjecture 6.6, wheregeneralizing the notation S ( j ) k ( m, N ) used above for j = 1 and 2 we also use S ( j ) k ( m, N, P n ) = m n X s ∈ Z P n ( s /m ) σ ( j ) k (cid:18) m − s N (cid:19) , where P n is a polynomial of degree n . Conjecture 6.7 For N = 1 , , , , , and , any odd integer k ≥ , and e ∈ {− , , } , there exist universal coefficients c kj,N,e such that for all negativefundamental discriminants D such that (cid:0) D (cid:1) = e we have (cid:18) (cid:18) | D | N (cid:19)(cid:19) L ( χ D , − k ) = X ≤ j ≤ m ( k,N,e ) c kj,N,e S (1+ j ) k − j − ( | D | /δ, N, P j ,k − j ) , here N = N/ if N is even and N = N if N is odd, δ = 4 if | D and δ = 1 otherwise, we write j = 2 j + j with j ∈ { , } , upper bounds for m ( k, N, e ) will be given below, and where we must assume e = − if N = 6 and on thecontrary e = − if N = 7 .Upper bounds for m ( k, N, e ) are given for e = − , , and as follows: (( k − / , ( k − / , ( k − / for N = 1 , (( k − / , ( k − / , ( k − / for N = 2 , (( k − / , (2 k − / , ( k − / for N = 3 , ((3 k − / , k − , (3 k − / for N = 5 , ( ∗ , k − , k − for N = 6 , and ( k − , ∗ , ∗ ) for N = 7 , where ∗ denotes impossible cases. For concreteness, we give the special case k = 3, e = 1: if D ≡ L ( χ D , − 2) = 135 S (1)2 ( | D | , 1) = 17 S (1)2 ( | D | , , (1 − (cid:0) D (cid:1) ) L ( χ D , − 2) = − 263 ( S (1)2 ( | D | , 3) + 14 S (2)2 ( | D | , , (1 + (cid:0) D (cid:1) ) L ( χ D , − 2) = − 23 ( S (1)2 ( | D | , 5) + 4 S (2)2 ( | D | , , (1 − (cid:0) D (cid:1) ) L ( χ D , − 2) = 114 ( − S (1)2 ( | D | , 6) + 5 S (1)0 ( | D | , , − x )) . Similarly to the case of even k , computing the number of terms involved in thesums leads to the following algorithm:(1) When D ≡ | D use N = 6, otherwise if 5 | D use N = 5,otherwise if D ≡ N = 6, otherwise if D ≡ ± N = 5, otherwise use N = 2.(2) When D ≡ | D and D ≡ N = 7, otherwiseif 3 | D and D ≡ N = 6, otherwise if 5 | D use N = 5,otherwise if D ≡ D ≡ , , N = 7, otherwiseif D ≡ D ≡ N = 6, otherwise if 3 | D (hence D ≡ N = 3, otherwise if D ≡ ± N = 5,otherwise use N = 2.As in the case of k even, care must be taken in choosing N > c kj,N,e is larger, so the above algorithm is valid only if this time is negligible.We thus give a table of timings using this algorithm. Note that − j − − j − | D | / | D | , and that a lot depends on divisibilities by 3, 5, and7, so the tables are only an indication:18 (cid:31) k − − . 05 0 . 06 0 . 06 0 . 07 0 . 08 0 . 09 0 . 10 0 . 10 0 . 12 0 . − − . 05 0 . 05 0 . 06 0 . 06 0 . 07 0 . 07 0 . 08 0 . 09 0 . 10 0 . − − . 25 0 . 27 0 . 28 0 . 31 0 . 33 0 . 36 0 . 40 0 . 44 0 . 47 0 . − − . 50 0 . 53 0 . 56 0 . 60 0 . 64 0 . 68 0 . 73 0 . 79 0 . 85 0 . − − . 36 1 . 41 1 . 47 1 . 55 1 . 64 1 . 74 1 . 86 1 . 99 2 . 12 2 . − − . 21 2 . 30 2 . 40 2 . 53 2 . 67 2 . 82 3 . 00 3 . 20 3 . 40 3 . − − . 86 7 . 06 7 . 28 7 . 54 7 . 84 8 . 18 8 . 55 8 . 98 9 . 44 9 . − − . . . . . . . . . . − − . . . . . . . . . . k = 1 which will be discussed below.As we have done in the case k even, for larger values of k the time to computethe coefficients dominate, so we first give a table giving these timings:( (cid:0) D (cid:1) , N ) (cid:31) k 81 101 151 201 251 301 351 401 451 501(1 , 1) – – 0 . 07 0 . 20 0 . 53 1 . 22 2 . 28 3 . 76 6 . 15 9 . , 2) – – 0 . 16 0 . 48 1 . 23 3 . 00 5 . 50 8 . 83 14 . . , 3) – 0 . 10 0 . 58 1 . 73 4 . 39 9 . 31 17 . . . . , 5) 0 . 21 0 . 57 2 . 57 7 . 43 18 . . . ∗ ∗ ∗ (1 , 6) – 0 . 07 0 . 38 1 . 44 3 . 90 10 . . . . ∗ ( − , 1) – – 0 . 07 0 . 22 0 . 54 1 . 27 2 . 30 3 . 90 6 . 33 9 . − , 2) – – 0 . 16 0 . 51 1 . 23 3 . 11 5 . 51 9 . 15 14 . . − , 3) – 0 . 11 0 . 62 1 . 82 4 . 59 9 . 69 18 . . . . − , 5) 0 . 13 0 . 34 1 . 53 4 . 95 10 . . . . . ∗ ( − , 7) 0 . 28 0 . 61 2 . 73 8 . 15 20 . . . ∗ ∗ ∗ (0 , 1) – – 0 . 12 0 . 39 1 . 05 1 . 91 3 . 34 5 . 80 9 . 33 14 . , 2) – 0 . 07 0 . 40 1 . 15 2 . 67 5 . 76 10 . . . . , 3) 0 . 08 0 . 18 0 . 95 2 . 82 6 . 80 14 . . . . ∗ (0 , 5) 0 . 25 0 . 53 2 . 28 6 . 78 16 . . . . ∗ ∗ (0 , 6) 0 . 29 0 . 58 2 . 64 7 . 66 19 . . . . ∗ ∗ For future reference, we observe that the times are very roughly10 − k (1 . , . , , . , . 5) for e = 1,10 − k (1 . , . , , . , 51) for e = − 1, and10 − k (2 . , , , , 50) for e = 0,where as usual e = (cid:0) D (cid:1) .In the next table we use N = 2 only when | D | is sufficiently large, and thecorresponding timings have a ∗ ; all the other timings are obtained with N = 1.19 (cid:31) k 21 41 61 81 101 151 201 251 301 351 401 451 501 − − 20 – – – – – 0 . 14 0 . 43 1 . 11 1 . 99 3 . 46 5 . 96 9 . 57 14 . − − . 10 0 . 27 0 . 63 1 . 41 2 . 50 4 . 19 6 . 72 10 . − − . 05 0 . 19 0 . 51 1 . 26 2 . 23 3 . 82 6 . 45 10 . . − − . 06 0 . 17 0 . 41 0 . 87 1 . 78 3 . 04 4 . 95 7 . 69 11 . − − 20 – – 0 . 05 0 . 08 0 . 13 0 . 36 0 . 85 1 . 85 3 . 17 5 . 18 8 . 32 12 . . − − . 05 0 . 08 0 . 13 0 . 18 0 . 44 0 . 99 1 . 84 3 . 29 5 . 24 8 . 07 11 . . − − 20 0 . ∗ . ∗ . ∗ . ∗ . ∗ . 98 2 . 07 3 . 91 6 . 49 10 . . . . − − 19 0 . ∗ . ∗ . ∗ . ∗ . 62 1 . 44 3 . 00 5 . 26 8 . 60 13 . . . . − − . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . . . . . − − . ∗ . ∗ . ∗ . ∗ . ∗ . 35 10 . . . . . . . − − . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ ∗ ∗ ∗− − . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ ∗ ∗ ∗ ∗ ∗− − . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ ∗ ∗ ∗ ∗ ∗− − . ∗ . ∗ . ∗ . ∗ . ∗ . ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗− − . ∗ . ∗ . ∗ . ∗ . ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗− − . ∗ . ∗ . ∗ . ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗− − . ∗ . ∗ . ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ k = 1 In this brief section, we consider the case k = 1, i.e., the problem of computing L ( χ, 0) for an odd character χ . Of course the Bernoulli method as well as theapproximate functional equation are still applicable in general. But in the case χ = χ D with D < D < − L ( χ D , 0) = h ( D ) which can therefore becomputed using subexponential algorithms, but it is still interesting to look atmodular-type formulas. Note that H is not quite but almost a modular formof weight 3 / 2, so it is not surprising that the method given above also works for k = 1.For instance, we have the following result, where we refer to Definition 5.4for the definition of S (1)0 (note that S (2)0 = S (1)0 ): Proposition 7.1 Let D be a negative fundamental discriminant D . (1) Set e = (cid:0) D (cid:1) . We have S (1)0 ( | D | , N ) L ( χ D , 0) = − e ) when N = 1 and N = 2 , (1 − (cid:0) D (cid:1) )(5 − e ) / when N = 3 , (1 + (cid:0) D (cid:1) )(1 − e ) / when N = 5 , (1 − (cid:0) D (cid:1) )(1 + e ) / when N = 6 , (1 − (cid:0) D (cid:1) ) when N = 7 and e = − . If | D , we also have S (1)0 ( | D | / , N ) L ( χ D , 0) = when N = 1 , when N = 2 , (1 − (cid:0) D (cid:1) ) / when N = 3 and N = 6 , (1 + (cid:0) D (cid:1) ) / when N = 5 . In particular, Conjecture 6.7 is valid for k = 1 with m (1 , N, e ) = 0, c ,N,e =2 / (3(1 − e )), 2 / (3(1 − e )), 2 / (5 − e ), 2 / (1 − e ), 2 / (1 + e ), and 1 when δ = 1 for N = 1, 2, 3, 5, 6, and 7 respectively, and c ,N, = 2 / 3, 2, 2, 2, and 2 when δ = 4and N = 1, 2, 3, 5, and 6 respectively.Since we can efficiently compute L ( χ D , 0) by using class numbers this resulthas no computational advantage, but is simply given to show that the formulasthat we obtained above for k ≥ k = 1. References [1] K. Belabas and H. Cohen, Numerical Algorithms for Number Theory usingPari/GP , Surveys in Math., American Math. Soc., to appear.[2] H. Cohen, Sums involving the values at negative integers of L -functions ofquadratic characters , Math. Ann. (1975), 271–285.[3] H. Cohen, A lifting of modular forms in one variable to Hilbert modularforms in two variables , Modular forms of one variable VI, Lecture Notesin Math. , Springer, Berlin, 1977, 175–196.[4] H. Cohen, Number Theory vol I: Tools and Diophantine Equations , Grad-uate Texts in Math. , Springer-Verlag (2007).[5] H. Cohen, Number Theory vol II: Analytic and Modern Tools , GraduateTexts in Math. , Springer-Verlag (2007).[6] H. Cohen and D. Zagier, Vanishing and Nonvanishing Theta Values ,Ann. Math. Quebec (2013), 45–61.[7] J. Ellenberg, S. Jain, and A. Venkatesh, Modeling λ -invariants by p -adicrandom matrices , Comm. pure appl. math. (2011), 1243–1262.[8] I. Inam and G. Wiese, Fast computation of half-integral weight modularforms , arXiv:2010.11239.[9] I. Inam, Z. ¨Ozkaya, E. Tercan, and G. Wiese, On the distribution of coeffi-cients of half-integral weight modular forms and the Ramanujan–Peterssonconjecture , arXiv:2010.11240.[10] R. Odoni, On Gauss sums (mod p n ) , n ≥ 2, Bull. London Math. Soc.5