<<

MATHEMATICS OF COMPUTATION Volume 71, Number 240, Pages 1735–1743 S 0025-5718(01)01367-9 Article electronically published on November 21, 2001

COMPUTATION OF CLASS NUMBERS OF QUADRATIC NUMBER FIELDS

STEPHANE´ LOUBOUTIN

Abstract. We explain how one can dispense with the numerical computation of approximations to the transcendental integral functions involved when com- puting class numbers of quadratic number fields. We therefore end up with a simpler and faster method for computing class numbers of quadratic number fields. We also explain how to end up with a simpler and faster method for computing relative class numbers of imaginary abelian number fields.

1. Introduction Currently, the best available rigorous methods for computing class numbers of 0.5+ quadratic number fields k of dk are of complexity O( dk ). How- ever, assuming suitable forms of the generalized Riemann hypothesis,| | one can de- vise conditional but more efficient methods of lower complexity (see [MoWi] where 0.2+ a conditional method of complexity O(dk ) for computing class numbers of real quadratic fields is developed, and see [Coh, Sections 5.5 and 5.9] where the condi- tional sub-exponential methods of McCurley and J. Buchmann for computing class groups of quadratic fields are developed). These rigorous methods stem from the analytic class number formulae (see [Coh, Sections 5.3.3 and 5.6.2], [MoWi], [ScWa] and [WiBr]) and require the computation to sufficient accuracy of the transcenden- ∞ x 1 tal integral functions E(z)= z e− x− dx (the exponential integral function) and 2 2 erfc(z)= ∞ e x dx (the complementary error function) by using the following √π z − R power series expansions (if z is small) and continued fractional expansions (if z is R large): n 2n+1 ∞ x2 1 ( 1) z (1) e− dx = √π − 2 − n!(2n +1) z n 0 Z X≥ 1 3 5 2 1 z 1 2 1 2 2 2 (2) = e− , 2 z+ z+ z+ z+ z+ z+ ···   n n ∞ x dx ( 1) z (3) e− = γ log(z) − x − − − n n! z n 1 Z X≥ ·

z 1 1 1 2 2 3 3 (4) = e− . z+ 1+ z+ 1+ z+ 1+ z+ ···  

Received by the editor March 29, 2000 and, in revised form, November 27, 2000. 2000 Mathematics Subject Classification. Primary 11R11, 11R29, 11R21, 11Y35. Key words and phrases. Quadratic number field, class number, Dirichlet L-function, relative class number.

c 2001 American Mathematical Society

1735

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 1736 STEPHANE´ LOUBOUTIN

(here γ =0.577 denotes Euler’s constant). In this paper we explain how one can dispense with··· these evaluations, thus greatly simplifying the implementation of these rigorous methods for computing class numbers of quadratic number fields, and 0.5+ making them faster but still of the same complexity O( dk ). In contrast with what is usually done, we will write all our class number| formulae| at s = 0. Indeed, values at s =0ofL-functions associated with odd Dirichlet characters are algebraic numbers, and we explained in [Lou3] how useful this observation is for computing their exact values from the computation of their numerical approximations (see also [Lou5] where we use [Lou4] to generalize the method developed in [Lou3] for computing relative class numbers of nonabelian CM-fields). Let us now set some of the notation we will be using throughout this paper. We let χ be a primitive Dirichlet character modulo f>1. We set n n 1 (5) S (χ)= χ(k)andT (χ)= χ(k). n n k k=1 k=1 X X πn2/f n2α2 We also set α = π/f, en = e− = e− and f 1 p − τ(χ)= χ(x)e2xπi/f . x=1 X For t>0realandM 0real,weset ≥ 1 B(t, M, f)= f t log(f/π)+M /π = α− M 2t log α r −   p and assume f = 3, which implies f>π,0<α<1, B(t, M, f) f/π and m2α2 2t 6 M ≥ e− α e− for m B(t, M, f). Finally, we will use: ≤ ≥ p Lemma 1. Let α>0 be real and g of class 2 in the range )0, + ( be given. Then for any positive rational integer n 1 we haveC ∞ ≥ (n+1)α g((n +1)α)+g(nα) θα2 (n+1)α g = α + g00 ( θ 1). 2 8 | | | |≤ Znα Znα Proof. Set B2(x)=x(x 1)/2. Then the reader will check that we have − (n+1)α g((n +1)α)+g(nα) 1 g(x)dx = α + α3 B (x)g (α(x + n))dx. 2 2 00 Znα Z0 Now, the bound 0 B2(x) 1/8for0 u 1 yields the desired result. ≤| |≤ ≤ ≤ 2. Imaginary abelian number fields Let χ be a primitive odd Dirichlet character modulo f>3. Set W (χ)= 1 i− τ(χ)/√f, which has absolute value equal to one. We can express L(0,χ)as the limit of rapidly absolutely convergent series (see [Dav] or [Lou3])

1 W (χ) χ¯(n) ∞ x2 (6) L(0,χ)= e +2 χ(n) e− dx √π α n n n 1 n 1 nα  X≥ X≥ Z  and (n+1)α 1 W (χ) χ¯(n) x2 (7) L(0,χ)= e +2 S (χ) e− dx . √π α n n n n 1 n 1 nα  X≥ X≥ Z 

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use COMPUTATION OF CLASS NUMBERS 1737

Proposition 2 (Compare with Proposition 7). Let χ beaprimitiveoddDirichlet character of conductor f.Forsomeθ satisfying θ 1, it holds that | |≤ 1 W (χ) χ¯(n) 3θ L(0,χ)= e + α (e + e )S (χ) + . √π α n n n n+1 n 8f 1/2 n 1 n 1  X≥ X≥  x2 Proof. Applying Lemma 1 to g(x)=e− and noticing that Sn(χ) n,weobtain | |≤ (n+1)α 2 θα (8) 2 S (χ) e x dx = α (e + e )S (χ)+ R n − n n+1 n 4 0 n 1 nα n 1 X≥ Z X≥ with θ 1and | |≤ (n+1)α R0 = α n g00 | | n 1 nα X≥ Z ∞ = α g00 | | n 1 nα X≥ Z ∞ ∞ ∞ def α g00(x) dx du = x g00(x) dx = Rodd ≤ 0 αu | | 0 | | Z Z  Z x2 which, for g(x)=e− , yields

∞ 2 x2 (9) Rodd = x 4x 2 e− dx =(4/√e) 1=1.426 3/2. | − | − ···≤ Z0 Using (7), (8) and (9), we obtain the desired result.

Proposition 3. Assume f>3, t>0 and M 1. For any positive rational integer m B(t, M, f) it holds that ≥ ≥ W (χ) χ¯(n) 1 1 1 2t 1 M en en α − e− α n ≤ α n ≤ 2 n>m n>m X X and 2t 1 M α (en + en+1)Sn(χ) α 2nen α − e− . ≤ ≤ n>m n>m X X Proof. For m B( t, M, f)wehave ≥ 1 1 2 2 1 ∞ 2 2 dx e n α xe x α α n − α − x2 n>m ≤ m X Z m2α2 2t 1 M 1 ∞ x2α2 e− α − e− 2t 1 M xe− dx = α − e− /2 ≤ αm2 2m2α3 ≤ 2(M 2t log α) ≤ Zm − and

2 2 2 2 1 2 2 α 2ne n α 2α ∞ xe m x dx = e m α α2t 1e M . − − α − − − n>m ≤ m ≤ X Z According to Propositions 2 and 3, we obtain

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 1738 STEPHANE´ LOUBOUTIN

Theorem 4 (Compare with Theorem 9 below). Let M 1 be given, let χ be a primitive odd Dirichlet character of conductor f,letm be≥ the least rational integer 1 0.5+ greater than or equal to B( 2 ,M,f)=O(f ) and set 1 W (χ) m χ¯(n) m (10) L (0,χ)= e + α (e + e )S (χ) , M √π α n n n n+1 n n=1 n=1  X X  n2α2 where α = π/f, en = e− and Sn(χ) is defined in (5).Then,

3 M 3 p L(0,χ) LM (0,χ) e− + . | − |≤2√π 8√f Remark 5. 1. Of particular importance is the case where χ is the primitive quadratic odd Dirichlet character of conductor f = dk associated with an imaginary qua- | | dratic field k of dk < 4 and class number hk. Then,χ ¯ = χ, − W (χ)=+1,hk = L(0,χ) and Theorem 4 provides us with a much more satisfactory result than [Lou1, Theorem 1]. 2 2. In practice, we do not compute all the en =exp( πn /f)’s for 1 n m − ≤ ≤ by using the exponential function. It is more efficient to compute the en’s inductively by setting fn =exp( π(2n+1)/f), by computing f0 =exp( π/f) − − and h =exp( 2π/f) and by using the induction formulae fn+1 = hfn and − en+1 = enfn. In this process, at each step n, instead of performing the computation of exp( πn2/f) we only perform two multiplications. 3. We explained in [Lou3]− how to compute relative class numbers of imaginary abelian number fields of a given degree by computing numerical approxima- tions to linear combinations with bounded coefficients of values at s =0of L-functions associated with odd primitive Dirichlet characters. Therefore, combining Theorem 4 and the method developed in [Lou3], we end up with an efficient method for computing relative class numbers of imaginary abelian number fields of a given degree. This method does not require us to compute approximations to transcendental integral functions. 4. We also explained in [Lou5] how to compute relative class numbers of CM- fields by computing numerical approximations to linear combinations with bounded coefficients of values at s =0ofHeckes’sL-functions associated with characters on strict ray class groups. Therefore, in to extend our present method further, we would like to find a method (generalizing Proposition 2 and Proposition 3) which would enable us to dispense with the computation of numerical approximations to the complicated integral transcendental functions involved when computing numerical approximations to values at s = 0 of such Hecke’s L-functions (see [Lou2] and [Lou4]).

3. Real quadratic number fields Let χ be a primitive even Dirichlet character modulo f>3. Set W (χ)= τ(χ)/√f, which has absolute value equal to one. Then L(0,χ)=0andwecan express the derivative L0(0,χ) as the limit of rapidly absolutely convergent series (use [Dav]):

2 dx W (χ) χ¯(n) 2 (11) L (0,χ)= χ(n) ∞ e x + ∞ e x dx 0 − x α n − n 1 nα n 1 nα X≥ Z X≥ Z

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use COMPUTATION OF CLASS NUMBERS 1739

and (12) (n+1)α (n+1)α 2 dx W (χ) 2 L (0,χ)= S (χ) e x + T (¯χ) e x dx. 0 n − x α n − n 1 nα n 1 nα X≥ Z X≥ Z Lemma 6. For n 1,set ≥ en en+1 n +1 1 1 (13) un = + + 2 log( ) . n n +1 n − n − n +1 For any m 1 we have ≥ (n+1)α 2 dx 1 θα (14) S (χ) e x = u S (χ)+ n − x 2 n n 4 n 1 nα n 1 X≥ Z X≥ for some θ satisfying θ 1,and | |≤ (15) (n+1)α 1 2 1 θα T (¯χ) e x dx = (e + e )T (¯χ)+ log(e/α) α n − 2 n n+1 n 4 n 1 nα n 1 X≥ Z X≥ for some θ satisfying θ 1. | |≤ x2 2 x2 x2 2 Proof. Set g(x)=(e− 1)/x.Thenxg00(x)=(4x +2)e− +2(e− 1)/x and according to Lemma− 1 we obtain −

m (n+1)α 2 dx S (χ) e x n − x n=1 nα X Z m (n+1)α m n +1 = S (χ) g(x)dx + S (χ) log( ) n n n n=1 nα n=1 X Z X m g((n +1)α)+g(nα) m n +1 θα = α S (χ)+ S (χ)log( )+ R 2 n n n 8 00 n=1 n=1 X X 1 m θα = u S (χ)+ R 2 n n 8 00 n=1 X where, as in the proof of Proposition 2, we have

m (n+1)α ∞ def R00 = α n g00 x g00(x) dx = Reven =2(βg0(β) g(β)) | |≤ | | − n=1 nα 0 X Z Z where β =1.792641 is the only positive real zero of g00. Hence, R00 Reven = 2 β2 ··· ≤ 4(1 (1 + β )e− )/β =1.853264 2. − ···≤x2 Applying Lemma 1 to g(x)=e− ,weobtain

(n+1)α 1 2 1 θα (16) T (¯χ) e x dx = (e + e )T (¯χ)+ R α n − 2 n n+1 n 8 000 n 1 nα n 1 X≥ Z X≥

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 1740 STEPHANE´ LOUBOUTIN

with θ 1and | |≤ n 1 (n+1)α R000 = ( ) g00 k | | n 1 k=1 nα X≥ X Z 1 ∞ = g00 n | | n 1 nα X≥ Z ∞ ∞ ∞ du g00(x) dx + g00(x) dx ≤ α | | 1 αu | | u Z Z Z  ∞ ∞ = g00(x) dx + g00(x) log(x/α)dx | | | | Zα Zα ∞ g00(x) log(ex/α)dx ≤ | | Z0 1/√2 4 x2 ∞ x2 = log(e/α√2) 2 e− dx +2 e− dx √2e − Z0 Z1/√2 1 7 log α 2 log(e/α), ≤ 2 − 4 ≤ and using (16), we obtain the desired result.

According to (12) and to Lemma 6 (where we take the limit as m goes to infinity in (14)), we obtain Proposition 7 (Compare with Proposition 2). Let χ be a primitive even Dirichlet character of conductor f>1.Forsomeθ satisfying θ 1, it holds that | |≤ 1 W (χ) θα L (0,χ)= u S (χ)+ (e + e )T (¯χ)+ log(e2/α). 0 2 n n 2 n n+1 n 4 n 1 n 1 X≥ X≥ Proposition 8. Assume f>3, t>0 and M 1. For any positive rational integer m B(t, M, f) it holds that ≥ ≥ (n+1)α x2 dx 1 2t 1 M (17) Sn(χ) e− en α − e− nα x ≤ ≤ 2 n>m Z n>m X X and

1 1 2t 1 M (18) (en + en+1)Tn(¯χ) α − e− log(e/α). 2 ≤ 2 n>m X Proof. We have (n+1)α (n+1)α 2 dx 2 dx S (χ) e x n e x n − x − x n>m nα ≤ n>m nα X Z X Z m2α2 2t 1 M n2α2 1 ∞ x2α2 e− α − e− e− xe− dx = . m 2mα2 2√M 2t log α ≤ n>m ≤ m ≤ X Z − Inthesameway,wehave n def 1 1 n2α2 Rm = (en + en+1)Tn(¯χ) ( )en log(en)e− . 2 ≤ k ≤ n>m n>m k=1 n>m X X X X

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use COMPUTATION OF CLASS NUMBERS 1741

α2x2 Since M 1andt>0implym B(t, M, f) 1/α and since x log(ex)e− decreases≥ in the range x 1/α,weobtain≥ ≥ 7→ ≥ m2α2 ∞ log(ex) α2x2 log(em)e− 1 2t 1 M log(eu/α) Rm xe− dx α − e− ≤ x ≤ 2mα2 ≤ 2 u Zm log(eu/α) where u = √M 2t log α 1. Since u u decreases in the range u α and since we have− u 1 >α≥ , we obtain7→ the desired result. ≥ ≥ According to (12), (14), (15), (17) and (18), we obtain Theorem 9 (Compare with Theorem 4). Let M 1 be given, let χ be the primi- tive even Dirichlet character of conductor f>1,let≥ m be the least rational integer 1 0.5+ geater than or equal to B( 2 ,M,f)=O(f ) and set 1 m 1 m (19) L (0,χ)= u S (χ)+ (e + e )T (¯χ), M0 2 n n 2 n n+1 n n=1 n=1 X X n2α2 where α = π/f, en = e− , Sn(χ) and Tn(χ) are defined in (5) and un is defined in (13).Then, p M α +2e− 2 L0(0,χ) L0 (0,χ) log(e /α). | − M |≤ 4 Remark 10. 1. Of particular importance is the case where χ is the primitive quadratic even Dirichlet character of conductor f = dk associated with a real quadratic field k of discriminant dk, fundamental k > 1, and class number hk. Then, χ¯ = χ, W (χ)=+1,hk = L0(0,χ)/ log k and Theorem 9 yields

5 π 5 M hk L0 (0,χ)/ log k + e− | − M |≤4 d 2 r k 2 (for k (√dk 4+√dk)/2 yields log(e /α) 5logk). We refer the ≥ − ≤ reader to [WiBr, Section 2] for the evaluation of the regulator log k of a real 0.5+ quadratic field k by using an elementary algorithm of complexity O(dk ) based on the use of continued fractional expansions. 2. Here again, the second point of Remark 5 applies. 3. In contrast with Theorem 4 (see Point 2 of Remark 5), Theorem 9 cannot be used to compute class numbers of nonquadratic real abelian numbers fields of a given degree (for it is not known how to reduce their computation to the computation of numerical approximations to linear combinations with bounded coefficients of values at s =0ofderivativesofL-functions associated with even characters (compare with [Lou3])).

4. Numerical examples

To assess the efficiency of the present technique for computing class numbers hk of quadratic number fields k of large discriminants dk, we programmed our formulas (10) and (19) with M = 3 in Kida’s language UBASIC, which allows fast arbitrary precision calculation on PC’s (the precision of real numbers in significant digits we used was equal to 28). Let us detail how much our method improves upon the previous ones based on the use of (6) and Point 1 of Remark 5 for dk < 0, and of (11) and Point 1 of Remark 10 for dk > 0 (see [Coh] and [WiBr]). We give all the

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 1742 STEPHANE´ LOUBOUTIN Table 1. The imaginary quadratic case

dk < 0 T1 T2 T3 T4 hk 5 1010 410312438272 5 − 1011 12 34 100 78 95 840 5 − 1012 41 112 323 251 506 880 5 − 1013 138 376 1 053 812 1 051 452 5 − 1014 460 1224 3391 2619 3 312 448 −

2 2 details only in the case that k is imaginary. Set αk = π/ dk , en =exp( n αk), 1 | | − mk = B( ,M, dk )= dk (log( dk /π)+2M)/2π, 2 | | | | | | p m m 1p 1 k χ (n) k (20) h (M)= k e + α (e + e )S (χ ) k √π α n n k n n+1 n k k n=1 n=1  X X  (see Theorem 4 and Point 1 of Remark 5) for which

3 M 3 (21) Rk(M):= hk hk(M) e− + , | − |≤2√π 8 dk | | and p mk mk 1 1 χk(n) ∞ x2 (22) h0 (M)= e +2 χ (n) e− dx k √π α n n k k n=1 n=1 nαk  X X Z  (see (6) and Point 1 of Remark 5) for which

1 M (23) R0 (M):= hk h0 (M) e− k | − k |≤√π 2 1 2 2 ∞ x ∞ x X (notice that 2 X e− dx X X 2xe− dx = e− /X and use Proposition 3 with t =0.5). Notice that the≤ number of terms in the truncated sums (20) and (22) R R are equal, and that the error terms Rk and Rk0 are of the same quality. Now, the previously known rigorous method for computing hk consists in using (22) and the power series expansion (1) for small values of z and continued fraction expansion (2)

for large values of z to compute approximations to hk0 . The main drawbacks of this method are (i) that we must carefully explain how many terms we have to consider in (1) and (2) to end up with good enough approximations to each erfc(nαk), (ii) 2 2 that computing erfc(nαk) is slower than computing en =exp( n αk) and (iii) that we cannot take advantage of the second point of our Remark− 5 while dealing with the indices for which we use (1) for computing approximations to erfc(nαk). Instead, by using (20) and Point 2 of Remark 5 we do not meet with any of these drawbacks and end up with a faster and easier to implement method for computing hk. We present in Tables 1 and 2 the results of applying these methods to compute class numbers of five imaginary quadratic fields with various size discriminants and of five real quadratic fields with various size discriminants and regulators. The computations were all carried out on a PC microcomputer with Pentium III, 333Mhz. Here, T1 is the time required to compute hk when using (20) and the second point of Remark 5, T2 is the time required to compute hk when using (20) but when disregarding the second point of Remark 5, T3 is the time required to compute hk when using (22), (1) for nαk = z<1.8and(2)fornαk = z 1.8 and, finally, T4 ≥ is the time required to compute hk when using (22), (1) for nαk = z<1.8and(2)

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use COMPUTATION OF CLASS NUMBERS 1743

Table 2. The real quadratic case

dk > 0 T0 T1 T2 T3 T4 hk 1010 + 5 0 8 15 51 41 1 134 1011 + 21 4 27 49 167 132 2 1012 + 1 0 90 161 545 427 50 280 1013 + 1 48 297 532 1763 1374 2 1014 + 5 0 959 1729 5706 4417 107 920

2 for nαk = z 1.8 and the second point of Remark 5 to compute the exp( (nαk) )’s ≥ − in (2) for the n’s for which nαk = z 1.8AlltheseTi are expressed in seconds. ≥ Here, T0 denotes the time required to compute log k by using continued fractions (see [WiBr]), and T1, T2, T3 and T4 are as in Table 1. These Tables 1 and 2 clearly show that our method is significantly faster in practice than existing rigorous methods. References

[Coh] H. Cohen. A Course in Computational . Springer-Verlag, Grad. Texts Math. 138, 1993. MR 94i:11105 [Dav] H. Davenport. Multiplicative Number Theory, The functional Equation of the L- Functions. Springer-Verlag, Grad. Texts Math. 74 (1980), Chapter 9. MR 82m:10001 [Lou1] S. Louboutin. L-functions and class numbers of imaginary quadratic fields and of qua- dratic extensions of an imaginary quadratic field. Math. Comp. 59 (1992), 213-230. MR 92k:11128 [Lou2] S. Louboutin. Computation of relative class numbers of CM-fields. Math. Comp. 66 (1997), 173-184. MR 97k:11157 [Lou3] S. Louboutin. Computation of relative class numbers of imaginary abelian number fields. Experimental Math. 7 (1998), 293-303. MR 2000c:11207 [Lou4] S. Louboutin. Computation of relative class numbers of CM-fields by using Hecke L- functions. Math. Comp. 69 (2000), 371-393. MR 2000i:11172 [Lou5] S. Louboutin. Computation of L(0,χ) and of relative class numbers of CM-fields. Nagoya Math. J. 161 (2001), 171–191. CMP 2001:09 [MoWi] R. A. Mollin and H. C. Williams. Computation of the class number of a real quadratic field. Utilitas Math. 41 (1992), 259-308. MR 93d:11134 [ScWa] R. Schoof and L. C. Washington. Quintic polynomials and real cyclotomic fields with large class numbers. Math. Comp. 50 (1988), 543-556. MR 89h:11067b [StWi] A. J. Stephens and H. C. Williams. Computation of real quadratic fields with class number one. Math. Comp. 51 (1988), 809-824. MR 90b:11106 [WiBr] H. C. Williams and J. Broere. A computational technique for evaluating L(1,χ)andthe class number of a real quadratic field. Math. Comp. 30 (1976), 887-893. MR 54:2623

Institut de Mathematiques´ de Luminy, UPR 906, 163, avenue de Luminy, Case 907, 13288 Marseille Cedex 9, France E-mail address: [email protected]

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use