arXiv:2101.05663v2 [math.NT] 16 Feb 2021 9.6]). over ℓ curves elliptic from arising .) egv eutealn h xrcino ore offiinso coefficients Fourier of extraction s 2.3). the form (Theorem enabling cusp representatives result twist-minimal of a from elements give basis We of operators th coefficients Hecke 2.2). that Fourier of demonstrate the trace and recover the 2.1), to for (Theorem formula t forms a are ‘twist-minimal’ forms derive called cusp we of spaces paper for this elements basis In [22], in as such series, h eut fti ae o h ffiin optto falfrso forms all of computation im efficient work the Further for in paper [20]. this incorporated in of given be results spaces, also the weight-1 can computing representa results for on The method problems representations. aforementioned Galois o for at and spaces data form cusp twist-min explicit different of of number provides number smaller large a a recover calculate to Secondly, to order expressio us simpler allows computable. much and readily in spaces, results these are spaces terms twist-minimal to the formula the so and form, classical o noeve fsvrlapplications). several repres r Galois of of overview problem, classifications an number and for congruent forms, the quadratic by as integers such of problems mod of for coefficients Fourier data the explicit and [8]), theorem see modularity theorem, the last Fermat’s establishing in crucial been have properties iers oholomorphic to rise give ai aosrpeettosfloigwr yDlgeadSre(see Serre and Deligne by work following representations Galois -adic hl hr xs ipe xlctepesosfrFuircecet o coefficients Fourier for expressions explicit simple, exist there While h au fti ae stood isl,tefruai ie na exp an in given is formula the Firstly, twofold. is paper this of value The oua om lyacnrlrl nmc fmdr ubrtheory. number modern of much in role central a play forms Modular upfrsaeo atclritrs o ayraos o exam For reasons. many for interest particular of are forms Cusp WS-IIA RC OML O HOLOMORPHIC FOR FORMULA TRACE TWIST-MINIMAL rsnaino ul eeaie rc oml o h ho the for formula trace Str¨omberg. and generalised Cohen fully Str¨ombergss and a Lee of Booker, twist-minima presentation by a case of cus non-holomorphic development the or the in newform f by for this motivated elements was that work basis show We This computing of 2. forms way least efficient cusp at an weight holomorphic and twist-minimal character, and of level spaces on operator Abstract. edrv nepii oml o h rc fa rirr He arbitrary an of trace the for formula explicit an derive We L fntos(hc ntr con o all for account turn in (which -functions NVRIYO BRISTOL OF UNIVERSITY 1. UPFORMS CUSP Q IRNCHILD KIERAN n r soitdwt aiiso irreducible of families with associated are and ) Introduction 1 oopi aeby case lomorphic n swl sthe as well as on, ruaprovides ormula rc formula trace l iharbitrary with omspaces. form p c.Ti efficiently This nce. ike ocompute. to rickier lrfrsprovide forms ular nain se[23] (see entations ae (Theorem paces i unproving turn (in nsae fso- of spaces on ino integers of tion l,cs forms cusp ple, egt1and 1 weight f epresentations st compute to ns mlsae in spaces imal h ivn of sieving the si sufficient is is oSchaeffer’s to 1,Section [10, L Eisenstein f newforms f plementing cke -functions Their licit, 2 KIERANCHILD UNIVERSITYOFBRISTOL level at most 10,000 is currently in progress. A full explanation and discussion of the advantages of this method is given at the end of section 2. The idea of using trace formulae to derive information on modular forms dates back to the 1950s. Following the construction of certain non-holomorphic cusp forms, now called Maass cusp forms, by Maass in [16], Selberg sought to demon- strate the infinitude of such forms and provide an asymptotic expression for their count, which he achieved with a trace formula in [21]. He and Eichler continued work in this direction, leading to a trace formula for the action of Hecke operators Tn on spaces of holomorphic cusp forms for the full modular group and square-free n in [11]. Following work by others in [12] and [17], this formula is now available in full generality for traces of any Hecke operator on spaces of any level and character. Although this formula can be used to find Fourier coefficients for basis elements of cusp form spaces (as done in [3], with a newform sieve, for the generation of LMFDB data), our formula contains much simpler expressions, and is more efficient for this task in the case that the level N is not square-free. On the structural side, twists of modular forms were studied in [2] and the con- cept of a twist-minimal form1 was explored. In [19], Palm presented an ad`elic trace formula for twist-minimal forms. This approach was also taken in the classical context in [5] for Hecke operators T 1 and Maass cusp forms. The pathway be- tween the ad`elic and classical contexts± is shown in [15]. This motivates us to use the structural idea of restricting to twist-minimal forms in a classical setting for holomorphic cusp forms. The result will be a computable analogue of the ad`elic formula in [19]. The structure of the paper is as follows. Section 2 covers the required background theory leading to the presentation of two results. The formula for the trace of Hecke operators on spaces of twist-minimal modular forms is given in Theorem 2.1, and the extraction of basis elements for twist-minimal, newform or cusp form spaces from this trace formula is given in Theorem 2.2. A formula for the Fourier coefficients of an arbitrary newform given Fourier coefficients of a suitable twist-minimal form is given in Theorem 2.3. The remainder of the paper explains how these theorems are arrived at, with section 3 addressing the structural theory, and section 4 deriving the trace formula. Acknowledgements. I would like to thank Min Lee and Andrew Booker for their guidance and suggestions with this research.

2. Twist-minimal trace formula 2.1. Preliminary theory. For any N N, a Dirichlet character χ is a homomor- phism: ∈ χ : (Z/NZ)∗ C∗. (2.1) → The domain of χ is extended to Z by the canonical mod-N homomorphism, with χ(x) = 0 whenever (N, x) = 1. The number N in this construction is called the level of the character. The6 conductor of χ, denoted f(χ), is the least M N such that a b (mod M) implies χ(a)= χ(b). ∈ If f(≡χ) = N then we say χ is primitive. For any N, if f(χ) = 1 then we say χ

is trivial mod N. This character will be written as ½ with the level taken from context. Dirichlet characters factor over primes in the following sense. Let νp(x)

1In [2] this would be termed a ‘q-primitive form for all prime q.’ TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 3 be the maximum power of p dividing x. There exists for all p N a unique χ with | p level pνp(N) so that:

χ(x)= χp(x). (2.2) p N Y| We use this factorisation to define χp for any prime p N. The order of a non-trivial n | character is the least n N such that χ = ½. This is denoted Ord(χ). We define twist-minimal characters∈ as in [5, Definition 1.5]. Definition 2.1. Fix a prime p and e N. Let χ be a Dirichlet character level pe, s ∈ and fix s Z 0 so that f(χ) = p . We say that χ is twist-minimal if and only if one of the∈ following≥ holds: χ is primitive; •

p> 2 and χ = ½; • ν (p 1) p> 2 and Ord(χ)=2 2 − ; • e p = 2 and s = 2 ; • p = 2, s = 2, e>⌊ ⌋3 and 2 ∤ e; •

p = 2, χ = ½, and 2 ∤ e or e = 2. • In general, we define a twist-minimal character χ as a product χp where all of the χp are twist-minimal. Q This completes the prerequisites on Dirichlet characters, and we move onto mod- ular forms. Let H be the Poincar´eupper half plane H = z C : (z) > 0 . We get an action on H by M¨obius transformations with notation:{ ∈ ℑ } az + c a b γz = , γ = GL (R)+. (2.3) cz + d ∀ c d ∈ 2   a b For any complex-valued function f the weight k slash action of γ = c d ∈ +   GL2(R) on f is defined as: k/2 k f γ(z) = (detγ) (cz + d)− f(γz). (2.4) |k For any N N, the congruence subgroup Γ (N) is defined to be the following ∈ 0 subgroup of SL2(Z): a b Γ (N)= SL (Z): N c . (2.5) 0 c d ∈ 2 |    Fix k,N N and fix χ a Dirichlet character mod N. A of weight k, level N and∈ character χ is a complex-valued, holomorphic function f, defined on H, which satisfies:

(1) f kγ(z)= χ(d)f(z) for all γ Γ0(N). | 2 dxdy ∈ (2) Γ (N) H f y2 is finite. 0 \ | | ModularR forms have Fourier expansions: 2πinz f(z)= ane . (2.6) n 0 X≥ Such an expansion completely describes the form, and so it is these an coefficients which we seek to compute. All modular forms of weight k, level N and character χ form a space, denoted (N,χ). An important family of operators on this space are the Hecke operators. Mk 4 KIERANCHILD UNIVERSITYOFBRISTOL

We follow the definition and notation of [13, Section 6.5]. Let f be a modular form of weight k and character χ. For any n N we define the generic Hecke operator2 as: ∈ 1 az + b T χ(f)= χ(a)ak f . (2.7) n n d adX=n b modX d   Here, χ is included in the notation for clarity, even though this is determined by χ χ χ f. Hecke operators are commutative and multiplicative, so that Tnm = Tn Tm whenever (n,m) = 1. We aim to give an explicit expression for the trace of these operators on subspaces of modular forms called cusp forms, and we show these traces can be used to generate basis elements. A cusp form is a modular form for which the slash action f kγ(z) tends to 0 as (z) for all γ Γ (N). Cusp forms of weight k, level |N and character χ ℑ → ∞ ∈ 0 form a subspace of modular forms, denoted k(N,χ). This subspace is stable under the action of Hecke operators, and is a HilbertS space with respect to the Petersson inner product, defined as:

k dxdy f,g N := f(z)g(z)y 2 . (2.8) h i Γ (N) H y Z 0 \ This inner product is used to decompose the space of cusp forms. Fix M N and N | d M , then it is verified that for any level M cusp form f the function g(z)= f(dz) is| a level N cusp form with the same weight and character as f. Forms of level N which arise in this manner from any level M

2πinz fψ(z)= ψ(n)ane . (2.9) n 0 X≥ We immediately get the following interaction between twists and hecke operators. Lemma 2.1. Let f be a Hecke-eigenform of weight k, level N and character χ. χψ2 χ Let ψ be a character of level M. If (M,n)=1 then Tn (fψ)= ψ(n)(Tn (f))ψ.

2This definition is more general than in the original literature, where for p | N our operator Tp would be written Up. TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 5

This relation, first stated in [2], is checked by expanding out the definitions of 2 the operators involved. We also verify that fψ is a cusp form with character χψ . This means that the twist of any Hecke-eigenform is equivalent to a newform basis element. We can use twists to pass between Hecke-eigenforms of different levels and characters. We define a twist-minimal form as a normalised newform which is not equivalent to any form arising as the twist of a newform from a lower level. Twist-minimal forms of weight k, level N and character χ again span a Hilbert space, stable under min Hecke operators, which we denote k (N,χ). As in the newform decomposition, the immediate utility here is from furtherS restriction to the scope of study.

2.2. Results. It will be shown in Theorem 2.2 that basis elements for subspaces of cusp forms (given as Fourier expansions) can be computed from the trace of Hecke operators acting on spaces of twist-minimal forms with twist-minimal character. Our first result is an explicit formula for this trace. Theorem 2.1. Fix a weight k 2, a level N N and a twist-minimal char- ≥ ∈ acter χ of level N. Let χ factor over the primes as χ = p N χp, and denote | the conductor f(χ). Let TrT χ min(N,χ) denote the trace of the n-th Hecke op- n k Q erator acting on the space of| Stwist-minimal forms of level N, character χ and weight k. If gcd((N/ f(χ))2,n2,N) is not square-free, or if χ( 1) = ( 1)k, then TrT χ min(N,χ)=0. Otherwise, we have: − 6 − n | Sk TrT χ min(N,χ)= C C C + C , (2.10) n | Sk 1 − 2 − 3 4 where the terms are defined as follows:

e e 1 k 1 p + p if s = e n 2 (k 1)χ (√n) − − f e−2 C1 = − φ( p )(p 1) 12  ⌈1+ ⌉δ − (1 + δ p + δ (2s 2)) if s1 e=2 − Y|  2|e,p>2 k 1 k 1 ρ − ρ − h(d) min e C = −  S (1, ½,t,n) S (p ,χ ,t,n) 2 ρ ρ w(d) p p p t2<4n − p ℓ p N X pY∤|N Y| √ e 2 (χp(d)+χp(n/d)) (1 δ 2) if p =2, 2 e,γ e 1 s, 2 ∤ n,e > 2 8 − γ= e 1 | ≥ 2 − ≥ ′ k 1 2 − C3 = d −  χp(d)+ χp(n/d) if s = e d n p N  | |  dX√n Y 0 otherwise ≤  νp(n) C4 = δ µ(N)  σ(p )

k=2,χ=½ p n pY∤|N (2.11)

In all terms, e = νp(N) and s = νp(f(χ)) for a given prime p, and δ is the charac- teristic function of the condition underneath it. We give details of each term in this formula. In C1, χf is the primitive character which induces χ, and χf(√n) is 0 if n is not square. In C3 we define γ = νp(n/d d) 1 − and the dash on the sum indicates that we have an additional factor of 2 if d = √n. 2 In C2, ρ is a root of the polynomial x tx + n. We define d as the fundamental discriminant of t2 4n, and ℓ N such− that t2 4n = dℓ2. The functions h and w are the class− number and∈ roots of unity of a− quadratic extension with that 6 KIERANCHILD UNIVERSITYOFBRISTOL

min 2 fundamental discriminant. For the S terms, set γ = ν (t 4n), and let · p p − p denote the Kronecker symbol, then if p> 2 and (p,n)=1 we have:  

e−3 δ 1 d p χ(t/2) e=1 − p (2,e) or n =1  ( p )       δ + p δ (1 2s)+ δ δ p if s2 e=2 − 2 e − γ e 1  ≥ − S (p ,χ,t,n)=  | ≥ − p  γ=e 2  −νp(ℓ) e e−1   νp(ℓ) d 2p p p  χ(t/2) 2p + 1 p p− 1− if s = e,γ 2e 1 − − ≥ −  νp(ℓ)  t+u t u    d p (χ( 2 )+ χ( −2 )) if s = e,γ < 2e 1, p =1  − 0 else      (2.12) If p =2, s

3χ t if γ >e,e 3 − 2 ≥ χ t (( 1)e + 2) if γ = e,s = e ,e 4  2 − ⌊ 2 ⌋ ≥ χ t (1 2( 1)d) if γ = e 1, 2 ∤ e,s = e ,e 4 d  2  2 min e e 3  − − − ⌊e ⌋ ≥ S2 (2 ,χ,t,n)= 1 2 − 2( 1)d 1 if γ e,e 1 ,s< ,e 3 − 2 ⌈ ⌉  −  − ∈{ − } ⌊ 2 ⌋ ≥     δ 3 1 if e 1, 2 e=2 2 − ∈{ } γ=0  0 otherwise   (2.13)  If p =2, e = s and (p,n)=1 we have:

(1 δ 2)χ(t/2) − γ=2e γ  2 +1 e 1 d ν2(ℓ)+1 (2⌊ ⌋ 3 2 − )(1 2 )+ δ 2 if γ 2e · − · − 2∤d ≥    Smin(2e,χ,t,n)=   2   ν (ℓ) t+u t u d 2 2 (χ + χ − ) if γ < 2e 1, =1 2 2 − 2     0 otherwise    (2.14) and if (p,n)= p we have:

d 1 if γ>s =0 p − min e t u t+u Sp (p ,χ,t,n)= χ − + χ if s = e,γ =0 (2.15)  2 2  0   otherwise   In all cases, u ℓ√d is defined mod pe if p > 2 and pe+2 if p = 2. Finally, we have: ≡

νp(ℓ) νp(ℓ) d p 1 S (1, ½,t,n)= p + 1 − (2.16) p − p p 1    − TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 7

Definition 2.2. Fix a weight k, level N and character χ. The trace form of min(N,χ), denoted , is given by the following series on z H: Sk TN,χ ∈ (z)= TrT χ min(N,χ)e2πinz. (2.17) TN,χ n | Sk n 1 X≥ min We can extract basis elements for k from its trace form by the following lemma. S Lemma 2.2. Let be the trace form for the twist-minimal space min(N,χ). TN,χ Sk Then all T are in min(N,χ). Let M be a matrix with each colum M given nTN,χ Sk n by the coefficients of Tn N,χ. If M has at least the number of columns and rows equal to the Sturm boundT of the space then M is a basis for the space. i.e. the rank of M equals the dimension of the space. Proof. Let f be a normalised Hecke eigenform basis for min(N,χ), where the i-th i Sk element has n-th Fourier coefficient ai,n. Then we have: T = a f min(N,χ). (2.18) nTN,χ i,n i ∈ Sk i X Further, if we let B denote the matrix with columns given by fi coefficients, then M = BB⊤ and so the ranks of B and M are equal.  Definition 2.3. Fix a level N and a character χ. A ‘twist pair’, denoted M, ψ , is a tuple of level M and character ψ satisfying at least one of the followingh for everyi prime p:

ν (M)= ν (N) and ψ = ½ • p p 2 ∤ p, 2 ν (N), ν (f(χ)) <ν (N), ψ = χ and ν (M)= ν (f(ψ)) = νp(N) • | p p p p 6 p p p 2

2 ∤ p, ν (N) = 2, χ = ½, ν (M) = 0 and ψ = · • p p p p p   Two twist pairs M , ψ and M , ψ are considered equivalent if M = M and h 1 1i h 2 2i 1 2 ψ2 = χψ1. Basis elements for spaces of cusp forms can subsequently be generated as using the following result: Theorem 2.2. Fix a level N and weight k, and let χ be any (not necessarily twist- minimal) character of level N. The space k(N,χ) has a basis of cusp forms given by: S χψ2 Tm M,χψ2 (dz) (2.19) T ψ 2   where m N, χψ is twist-minimal level M, and setting M ′ = max(M, f(ψ) f(χψ)) ∈ N new we have M ′ N and d M ′ . Fixing d =1 in the above gives a basis for k (N,χ), | | min S and fixing ψ = ½ gives a basis for k (N,χ), provided χ is twist-minimal. If χ is twist-minimal, then basisS elements for any of these spaces are given by letting M and ψ run over all twist pairs for level N and character χ. If χ is not twist-minimal, then we can generate basis elements from bijection with a twist- minimal space. Further, for any of these spaces, there exists a subset of m N with m at most the Sturm bound of the space such that the resultant basis matrix∈ has zero nullity. Finally, we extend Lemma 2.1 to a result giving the Fourier expansion of a newform whenever an appropriate twist-minimal form is known. 8 KIERANCHILD UNIVERSITYOFBRISTOL

Theorem 2.3. Let f min(N,χ) be a twist-minimal form with Fourier coeffi- ∈ Sk cients an. Let ψ be a primitive Dirichlet character, and let ψ′ be the primitive character that induces χψ. Then f is equivalent to a newform in new(M,χψ2) ψ Sk with Fourier coefficients bn, where M = LCM(N, f(ψ) f(ψ′)) and:

apψ(p) if ψp = χp or p ∤ f(ψ), bp = 6 (2.20) (apψ′(p) otherwise for all primes p.

Proof. First, let Q be the product of primes p such that ψp = χp, and let ψQ be the product of the respective ψp. Twisting by ψQ is equivalent to applying the Atkin and Lehner WQ operator. The twist fψQ is equivalent to a newform of level N with coefficients as in (2.20) by [2, (1.1)]. Denote this newform g, and note that g is itself twist-minimal. This means we  can apply Lemma 3.1 to gψ N , whereupon the result follows. Q These results give us an efficient way of computing basis elements of cusp form spaces. The most computationally expensive term in Theorem 2.1 is C2 in which the multiplicative function is a simple case statement, and the relevant class numbers can be pre-calculated and stored in a table. This formula is thus simpler to compute than the respective formula for full cusp form spaces, given in (4.2). new Further, if we let dnew denote the dimension of a newform space , then the complexity of generating a full-rank matrix of leading coefficients ofS basis elements 3 from the trace formula is O(dnew). On the other hand, letting dmin denote the dimension of a particular twist-minimal space min which twists into new then the complexity of computing the same numberS of coefficients for just theseS basis 3 elements is O (dmindnew) 2 . As a result, as well as the individual terms being easier to compute, the overall complexity for computing spaces of newforms (or, in turn, full cusp form spaces) is reduced by recovering these spaces from twist- minimal spaces. The restriction that the weight be at least 2 means that weight 1 forms are missed in this approach.3 This is a meaningful issue as, since the proof of Serre’s modularity conjecture in [14], these forms are known to categorise all odd, two-dimensional, irreducible Galois representations over finite fields. The Fourier coefficients of these forms give the traces of Frobenius elements in the associated representations. The computation presented in [20], however, involves first computing weight 2 basis elements, before manipulating these in a manner to find weight 1 forms. In future work, we will adapt this approach, utilising the benefits of the twist-minimal weight 2 computation presented here to perform more efficient computations of weight 1 forms.

3. Structural theory We study the structural theory of cusp forms, which leads to the proof of The- orem 2.2. In [1, Theorem 5] a decomposition of cusp form spaces is given in terms of newforms and lifts of newforms. To decompose these newform spaces in terms of twist-minimal spaces we draw on previous results on twists of cusp forms.

3Weight 1 forms are also missed in the modular symbols approach outlined in [7] TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 9

Lemma 3.1. Fix some f min(N,χ) with χ twist-minimal, and let ψ be any ∈ Sk Dirichlet character, then we deduce the following about fψ:

(1) fψ is a newform if and only if ψp = ψp for all p f(ψ) 6 | 2 (2) If fψ is a newform, then it has level M and character χψ where, for any prime p, we have νp(M) = max(νp(N),νp(f(ψ)) + νp(f(χψ))) These come from applying the results in [2] to the specific case of twist-minimal forms with twist-minimal character. The multiplicativity present in both the ex- pression for the level of fψ and the definition of twist-minimal characters will allow us to decompose newform spaces multiplicatively. Fix a level N. For any χ, there exists a character ψ so that χψ2 is twist-minimal, min min 2 and twisting by ψ gives a bijection between k (N,χ) and k (N,χψ ). This is shown in [5, Lemma 1.6], with a constructionS of the requiredS ψ. As a result, we need only consider twist-minimal spaces with twist-minimal character, and need study only the decomposition of newform spaces with twist-minimal character.

3.1. Explicit decomposition of a specified newform space. In this section, we will identify which twist-minimal spaces are required to obtain all basis elements of any given newform space with twist-minimal character. Because of Lemma 3.1, and the definition of twist-minimal characters, we need only study spaces where N (and therefore f(χ)) is a power of some prime. Lemma 3.2. Let p be an odd prime and χ be a twist-minimal character level pf , min e new f then there exists a non-trivial twist from (p , ½) to (p ,χ) if and only if Sk Sk

χ = ½, f =2 and e 0, 1 ∈{ } min e 2 Proof. Twisting k (p , ½) by a character ψ gives forms with level f(χ) and char- acter χ = ψ2. TheS only possibility ψ to be non-trivial while ψ2 is twist-minimal is if Ord(ψ)=2, and so f = 2, whereupon e f(χψ ). This ≥ f 2 f means, by Lemma 3.1 part 2, that the level p > f(χ1ψ ), which contradicts p = f(χ2).  On the other hand, when the conductor of the character of the higher level space f is less than the level (written as f(χ2)

Lemma 3.4. Let p be an odd prime, f an even integer, and χ2 a twist-minimal f f f character level p with f(χ2)

Having covered all twists when p is odd, we now study p = 2.

e f Lemma 3.5. Let χ1 and χ2 be twist-minimal characters for 2 and 2 respectively with f >e. There does not exist any twist from min(2e,χ ) to new(2f ,χ ). Sk 1 Sk 2 Proof. Assume for contradiction that ψ is such a character. We break the proof down into three cases based on f(ψ) and f(χ1). If f(ψ) > f(χ1) then by level f 2 calculation we have p = f(ψ) . But the only twist-minimal χ2 with 2 f is when f 2 | 2 f(χ2) = p 2 = f(ψ). However, we also have f(χ2) = f(χ1ψ ) max(f(χ1), f(ψ )) < f(ψ), which is a contradiction. ≤ f 2e Next, suppose f(ψ) < f(χ1) so that f(χ2)= f(χ1) and p = f(ψ) f(χ1)

4. If f(χ1) = p then there exist no twist-minimal 6 e/2 characters for ee.  We can summarise the above lemmas to give a decomposition of newform spaces with twist-minimal character into twists from twist-minimal spaces. Let a twist pair be defined as in Definition 2.3, then we have: new(N,χ)= min(M,χψ2) , (3.1) Sk Sk ψ M,ψ h [ i with the union being taken over all valid twist pairs for level N and character χ. Here, the twist notation means that all forms in the space have been twisted by the subscript character. This is sufficient for Theorem 2.2 but in order to use this decomposition in computations we need it to be disjoint.

3.2. Removing twist-equivalent forms.

min 2 min 2 Definition 3.1. Let k (N1,χ2ψ1 ) and k (N2,χ2ψ2) be two spaces in the de- S S min 2 min 2 composition given in (3.1). We say that f k (N1,χ2ψ1) and g k (N2,χ2ψ2) are twist-equivalent if f = g . ∈ S ∈ S ψ1 ψ2 Twist-equivalent forms are thus twist-minimal forms which give rise to the same newform. We see immediately that two forms are twist-equivalent only if N1 = N2, and the following lemma lets us consider twist-equivalence as a condition on twist pairs. Lemma 3.6. Let min(pe,χ ψ2) and min(pe,χ ψ2) be two spaces in the decompo- Sk 2 1 Sk 2 2 sition given in (3.1). For any f min(pe,χ ψ2) there exists some twist-equivalent ∈ Sk 2 1 g min(pe,χ ψ2) if and only if we have either ψ = χ ψ or ψ = ψ . ∈ Sk 2 2 2 2 1 2 1 2 2 e Proof. We know from Lemma 3.4 that if ψ = ½ then f(χ ψ ) = f(χ ψ ) = p . 1 6 2 1 2 2 Assume that either ψ = χ ψ or ψ = ψ , then setting g = f we get g = f 2 2 1 2 1 ψ1ψ2 ψ2 ψ1 and the level of g is pe, hence g min(pe,χ ψ2). ∈ Sk 2 2 In the other direction, assume that f = g . Then twisting f by ψ ψ gives the ψ1 ψ2 1 2 e level of g as f(ψ1ψ2) f(χ2ψ1ψ2). This only equals p if ψ2 = χ2ψ1 or ψ2 = ψ1.  TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 11

In general for level N, we see that two forms are twist-equivalent if and only if this condition holds for all p N. This allows us to write down a disjoint decomposition. Let M, ψ be as before,| and let denote the relation by this lemma giving rise to twist-equivalence,h i then we have the∼ decomposition: new(N,χ)= min(M,χψ2) (3.2) Sk Sk ψ M,ψ / h Mi ∼ We now quantify the equivalence classes. This is also done multiplicatively, and we can find the number of elements in an equivalence class based on which case we are in for each p N in the definition of twist pairs (Definition 2.3). | Lemma 3.7. Fix a level N and Dirichlet character χ. Let M, ψ be some twist new h i pair in the decomposition of (N,χ). We define a function k N ,χ,ψ , as the Sk M N number of primes p such that either ψ = · or p f(χ). Then the size of | M p 6 p ||  k N ,χ,ψ the equivalence class of M, ψ in (3.2) is 2 ( M  ).

h i ½ Proof. By following Lemma 3.6 we see that if ψp = ½ or χp = and ψp = p· then the pair is in a singleton equivalence class. For all other cases, the lemma gives us a second, distinct twist pair. The result then follows from multiplicativity. 

4. Deriving the trace formula In [6, Theorem 12.4.11] we see the following explicit formula for the trace of a Hecke operator on an arbitrary full cusp form space. The specific details of functions and variables are as in Theorem 2.1. k χ Fix a level N, character χ and weight k 2. If χ( 1) = ( 1) then TrTn k(N,χ)= 0. Otherwise we have: ≥ − 6 − | S TrT χ (N,χ)= A A A + A , (4.1) n | Sk 1 − 2 − 3 4 where the individual terms are given by:

k/2 1 k 1 1 A = n − χ(√n) − N 1+ , 1 12 p p N   Y| k 1 k 1 2 2 ρ − ρ − h((t 4n)/f ) A = − − µ(p, N, (f,N),χ), 2 ρ ρ w((t2 4n)/f 2) t Z − f 2 (t2 4n) − p N t2X<∈4n | X− Y|N p∤ (N,f)

′ k 1 A3 = d − φ((c,N/c))χ(x1), d n c N | | dX√n (c,N/c) (XN ,n/d d) ≤ | f(χ) −

A4 = t, t n (n/t,NX| )=1 1 µ(p,N,g,χ)= g 1+ χ(x). · p   x mod N x2 tx+nX0 (mod Ng) − ≡ (4.2) 12 KIERANCHILD UNIVERSITYOFBRISTOL

In addition to the details from Theorem 2.1 , the variable x1 is defined by the congruences x d (mod c) and x n/d (mod N/c). These congruences are seen 1 ≡ 1 ≡ to uniquely fix x1 modulo f(χ), and so the term χ(x1) in A3 is well-defined. From the structural theory, we write the cusp form space trace formula in terms of newform spaces, and subsequently in terms of twist-minimal spaces. We then invert these formulae to get a formula for the twist-minimal space in terms of full cusp form spaces. The newform trace is written as a sum over the set: 2

(N,χ,n)= x : for all p x we have p x, p N,χ = ½ and p n . (4.3) P | || || p | From now on, the notation will always refer to this set. P Lemma 4.1. For any m N, define βm to be a multiplicative function, defined on powers of primes as: ∈ 1 if a =0 δ 2 if a =1 a p m − βm(p )=  | (4.4) 1 δ if a =2  − p m  | 0 if a 3.  ≥ 2 2  χ new If gcd((N/ f(χ)) ,n ,N) isn’t square-free, then TrTn k (N,χ)=0. Otherwise, we have: | S χ new k 1 χ TrT (N,χ)= χ(d)d − β 2 (N/dM)TrT (M,χ) n | Sk n/d n/d2 | Sk d (N,χ,n) M N/d ∈PX f(Xχ|) M | (4.5) Proof. In [6, Theorem 13.5.7] we get the equation:

χ new k 1 χ TrT (N,χ)= χ(d)d − β 2 (N/M)TrT (M/d,χ), n | Sk n/d n/d2 | Sk M N d ( M ,N ) | | f(χ) 1 f(Xχ) M X2 | d n | (4.6) where N1 is the squarefree component of N (the product of primes p N). In [2] N 2 || we see that if p n, f(χ) with p N then the p-th Hecke eigenvalue for any form new | χ new| in k (N,χ) is 0, and so TrTn k (N,χ) = 0. When this is not the case for any p, theS lemma follows from changing| S the order of summation. 

From Lemma 3.7 we get an equation giving the trace on any newform space in terms of traces on twist-minimal spaces. Let the k function, and M, ψ notation be as in that lemma, then we get: h i

χ new k( N χ,ψ) χψ2 min 2 TrT (N,χ)= 2− M ψ(n)TrT (M,χψ ). (4.7) n | Sk n | Sk M,ψ hXi We invert this formula to give:

χ min k′( N ) k( N ,χ,ψ) χψ2 new 2 TrT (N,χ)= ( 1) M 2− M ψ(n)TrT (M,χψ ), (4.8) n | Sk − n | Sk M,ψ hXi N N where k′ M is the number of primes dividing M .  TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 13

We now see that multiplicativity results in the trace formula carry through to the twist-minimal trace formula. Let f(N,χ) be a function defined on N N and χ level N. Fix n,m N and define f new and f min as: ∈ ∈ new f (N,χ)= βm(N/M)f(M,χ) (4.9) M N f(Xχ)| M | min k′(N,M) k(N,M,χ,ψ) new 2 f (N,χ)= ( 1) 2− ψ(n)f (M,χψ ) (4.10) − M,ψ hXi

νp(N) new Let f(N,χ) be multiplicative, so that f(N,χ) = p N f(p ,χp). Then f | and f min are also multiplicative in this way. Q We will show that each component of (4.2) can be written as linear combinations of multiplicative functions. Thus, we construct the twist-minimal trace formula by computing each component’s value at each prime for arbitrary twist-minimal character χ. This provides an expression of the form:

χ min k 1 TrT (N,χ)= χ (d)d − (B B B + B ). (4.11) n | Sk f 1 − 2 − 3 4 d (N,χ,n) ∈PX We then perform a further, similar sieve on n to get an expression of the form: TrT χ min(N,χ)= C C C + C , (4.12) n | Sk 1 − 2 − 3 4 as in Theorem 2.1. Due to the definition of βm in Lemma 4.1, the formulae for p (N,n) and p ∤ (N,n) quickly diverge, and we treat them separately. |

4.1. Formula for p ∤ (N,n) cases. We start by establishing an explicit formula for f min in terms of f in the case that χ is twist-minimal. Let δ be the characteristic function taking 1 when C is true and 0 when C C is false. Let χ be a twist-minimal character of level pe and conductor ps, as in Definition 2.1. From the definitions of f new and f min we get:

e 2 e 1 δ f(p − ,χ) 2f(p − ,χ) s e 2 ≤ − −  1  δ ψ(n)f(pe/2, χψ2) p>2 − 2 e min e e  2 e f(ψ)=p 2  f (p ,χ)= f(p ,χ)+ δ  | X  (4.13) s

 n f(p, ½) 

 ½   + δ f(1, )   p>2 p − 2   s=0       e=2    This is what we will refer to as the decomposition formula. We factor a multiplicative function from each term in (4.2), and then apply the decomposition formula to get expressions for Bi in (4.11). In this section, when evaluating the multiplicative function at some prime p N, we will assume that p ∤ n, with the cofactor case being handled in the next| section. Note that this means we can assume d = 1 in (4.11). At many points it will be useful to have the following lemma. 14 KIERANCHILD UNIVERSITYOFBRISTOL

Lemma 4.2. For any prime p and x, e N we have: ∈ 0 if νp(x 1)

k/2 1 k 1 e A = n − − R(p ,χ ,n) (4.15) 1 12 p p N Y| where: e e e 1 R(p ,χ,n)= χ(√n) p + p − . (4.16) Note that the following expression in the decomposition  formula simplifies: ψ(n)R(pe, χψ2,n)= R(pe,χ,n) (4.17) This makes it easy to evaluate Rmin, which is done on a case-by-case basis for each possible twist-minimal character. Applying Lemma 4.2 we get:

e e 1 p + p − if s = e e 2 p2 1 φ(p ) − if s2 ≥   2 Rmin(pe,χ,n)= χ(√n) p p 1 if s 2  2 (p 1)2 −2 if s =0,e =2,p> 2  p 1 if e =1  −  This is then rewritten more succinctly, so that B1 in (4.11) is given by:

φ( pe−2 )(p 1) ⌈ ⌉ − (1 + δ p + δ (2s 2)) if s1 e=2 B1 = n − χ(√n) − 2|e,p>2 − 12  e e 1 p N p + p − if s = e Y|  (4.19) 

4.1.2. A3 term. We will focus on the A3 in (4.2) next, returning to A2 as the most complicated component later. Again we extract a multiplicative factor R which is distinct from the R of the previous section. We write:

e φ((c,N/c))χ(x1)= R(p ,χp,d,n), (4.20) c N p N (c,N/c) (N/X|f(χ),n/d d) Y| | − where, setting γ = ν (n/d d) we have: p −

e e 1 e min( e ,e s,γ) p 2 p 2 − R(p ,χ,d,n) = (χ(d)+ χ(n/d)) p ⌊ 2 ⌋ − δ − .  − min(e s,γ) e 2  − ≥ 2 2 e>0  |   (4.21) TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 15

Applying the decomposition formula (4.13) to R we see considerable cancellation - although the expression for Rnew is quite complicated, the expression for Rmin is very simple. We get:

e √2 1 δ 2 if p =2, 2 e,γ e 1,s< e 8 − γ= e 1 | ≥ 2 − 2 Rmin(pe,χ,d,n) = (χ(d)+χ(n/d))   2 −  1 if s = e  0 otherwise  (4.22)  and so B3 is given by: 

e √2 1 δ if p =2, 2 e,γ e 1,s< e 4 2 e 2 2 ′ − γ= 1 | ≥ − k 1 2 − B = d − (χ (d)+χ (n/d))    3 p p 1 if s = e d n p N  | |  dX√n Y 0 otherwise ≤  (4.23)  The dash on the sum here holds the same meaning as in the A3 term in (4.2).

4.1.3. A4 term. The A4 term is 0 whenever k> 2. As the weight does not change in the decomposition formula, we can assume that k = 2. We rewrite A4 as:

A4 = σ(n) R(χp), (4.24) p N Y| where: 1 if p ∤ n R(χp)= δ νp(n) (4.25) s=0 p if p n ( σ(pνp(n)) | Note that for this section we are always in the top case. We again sieve R through the decomposition formula, giving: 1 if e =1 B4 = δ σ(n) − (4.26) χ=½ 0 otherwise p N ( Y|

4.1.4. A2 term. We follow the work of [4] to rewrite the A2 term multiplicatively. For t2 < 4n, write t2 4n = dℓ2 with fundamental discriminant d and ℓ N. Note that the sum over f 2 −(t2 4n) is equivalent to taking the sum over f ℓ,∈ discarding | − | cases where ν2(f)= ν2(ℓ +1) and 4 d, in which the sum over x (mod N) is zero. The class number formula (see [9])| leads to the following result from [4]:

d 2 2 h(dℓ /f ) lh(d) p p = − . (4.27) w(dℓ2/f 2) fw(d) p  p ℓ Y| f

Thus, the A2 term becomes: h(d) l A = χ(x) 2 w(d) f f ℓ x mod N X| x2 tx+n 0X (mod N(N,f)) − ≡ (4.28) min(e,ν (f)) 2 d p p − p + δ p δ γ · νp(f) e>0 − >νp(f) p p ℓ  ≥   ⌊ 2 ⌋   Y| 16 KIERANCHILD UNIVERSITYOFBRISTOL

Let g be some number dividing (N,ℓ). Define the function:

x mod N χ(x) if N > 1 x2 tx+n 0 (mod Ng) J(N,g,χ,t,n)= − ≡ (4.29) P 1 otherwise Let Ω(N,g,t,n) be set of solutions mod N to x2 + tx n 0 (mod Ng) so that − ≡ J(N,g,χ,t,n) = x Ω(N,g,t,n) χ(x). From studying the output of the Chinese Remainder Theorem,∈ we see that we can write Ω as a Cartesian product: P Ω(N,g,t,n)= Ω(pνp(N),pνp(g),t,n) (4.30) p N Y| Consequently, J is a multiplicative function. We arrive at the following expression for A2: h(d) l A = J(pe,pmin(νp(f),e),χ ,t,n) 2 w(d) f p f ℓ p N X| Y| (4.31) min(e,ν (f)) 2 d p p − p + δ p δ γ · νp(f) e>0 − >νp(f) p p ℓ  ≥   ⌊ 2 ⌋   Y| We rewrite this as one product over ℓN, swapping the sum and product to give: h(d) A = R (pe,χ ,t,n) (4.32) 2 w(d) p p p ℓN Y| where:

νp(ℓ) e min(νp(ℓ)+e j,νp(ℓ)) 2 d Rp(p ,χp,t,n)= p − − p + δ p δ j e>0 − γ >j p j=0 ≥ 2 X    ⌊ ⌋   J(pe,pmin(j,e),χ ,t,n) · p (4.33) Sieving over N we get:

h(d) min e

B = R (1, ½,t,n) R (p ,χ ,t,n), (4.34) 2 w(d) p p p p ℓ p N pY∤|N Y| where: νp(ℓ) νp(ℓ) d p 1 R (1, ½,t,n)= p + 1 − . (4.35) p − p p 1    − min We now find an explicit expression for Rp by sieving. This first requires an explicit expression for Rp in the case that χ is twist-minimal. From now on, set 2 γ = νp(t 4n) with prime p being clear from context. Also, for any a such that (a, f(χ)) =− 1, we let χ(1/a) mean χ(b) where ab 1 (mod f(χ)). We begin by finding explicit expressions for the≡ J function.

e Lemma 4.3. Let χp be a character level p . Let β Z 0 be such that β e and β ν (ℓ) where t2 4n = dℓ2 with fundamental discriminant∈ ≥ d. For any≤ prime ≤ p − TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 17 p> 2 we get:

e+β e−β ⌈ ⌉ f 2 χ(t/2)p⌊ 2 ⌋ if (χ) p γ≤ e+β  ≥  d  γ/2 β γ/2 ( p )=1 e β p − (χ(t/2+ up /2) if J(p ,p ,χp,t,n)=  γ

 γ/2 β γ/2 1 2 − (χ(t/2+ u2 − )  d 1 mod8, e+β+2 γ 3  γ/2 1 ≡ − ≥  +χ(t/2 u2 − )) if 2γ/2+1 2. If γ e + β then t2 4n 0 (mod pe+β) and e+β ≥ e−β − ≡ e β so we need 2x t (mod p⌈ 2 ⌉). This gives p⌊ 2 ⌋ elements of Ω(p ,p ,t,n). If e−β ≡ e+β f(χ) p⌈ 2 ⌉ then χ(x) is equal for all x Ω. If, however f(χ) >p⌈ 2 ⌉ then the sum≤ is 0 by orthogonality. ∈ If instead we have γ p − then the sum is 0 by orthogonality, else we get p − (χ(t/2+ upγ/2/2) + χ(t/2 upγ/2/2)). Finally, note that the two conditions 2 γ and (t2 4n)/pγ − d | − p = 1 can be combined as p = 1.  Now, assume that p =2. If2 ∤ t then x2 tx + n x(x 1)+1 1 (mod 2) so Ω= . Instead, assume 2 t, and so χ(t/2)− is well defined.≡ − When needed,≡ write ∅ | t =2t′. e−β e+β If γ e + β + 2 then Ω is 2⌊ 2 ⌋ elements, of the form t′ + kp⌈ 2 ⌉ where k ≥ e−β ranges through [1, 2⌊ 2 ⌋]. If instead we have γ

e+β+1 γ/2 k2 − . The result follows from summation over these elements, simplifying by appeals to orthogonality. 

Now that we have expressions for J we move on to evaluating R. We use the following formula, arrived at through application of the standard geometric series sum.

b c−j c c+a c c+a−1 c−b c−b+1 p⌊ 2 ⌋ = p −⌊ 2 ⌋ + p −⌊ 2 ⌋ p⌊ 2 ⌋ p⌊ 2 ⌋ (4.38) − − j=a X

Let p> 2. In the sum defining R we study the cases when e<νp(ℓ), νp(ℓ)

e Rp(p ,χp,t,n)= e 1 e+ν (l) 1 h h−1 d p − ν (l) h ν (l) h−1 δ p p − (p−⌊ 2 ⌋ + p−⌊ 2 ⌋)+ 1 (p p −⌊ 2 ⌋ + p p −⌊ 2 ⌋ p 1) χ(t/2) γ h − p p 1 − − ≥     −  ν (l)+min(e s,ν (l)) ν (l) ν (l) + δ p p − p χ(t/2+ up p )+ χ(t/2 up p )) . γ

This matches the formula in [5, Equation 2.41]. 2 Recall that γ = νp(t 4n) and h = max(2s 1,e). When p = 2 we split based on the relation between− these quantities. In each− case, we get a different result based on the congruence class of d mod 8. Again, applying (4.38), we arrive at the following expression for all cases:

e R2(2 ,χ,t,n)= ν (ℓ)+min(e s,ν (ℓ)) γ/2 1 γ/2 1 δ 2 2 − 2 (χ(t/2+ u2 − )+ χ(t/2 u2 − )) if γ 2s, 2 ∤ d  ·  e+1 d e 1  δ 2 + 1 2 − χ(t/2) if γ =2s>h − d 4 − 2   6≡    e 1 ν (ℓ) h ν (ℓ) h−1 χ(t/2) δ 2 − (2 2 −⌊ 2 ⌋ +2 2 −⌊ 2 ⌋) if γ > max(h, 2s)  · 2∤d  d e 1 γ h γ h−1 + δ 1 2 − (2⌊ 2 ⌋−⌊ 2 ⌋ +2⌊ 2 ⌋−⌊ 2 ⌋ 3)  γ>e+1 or d 8 − 2 −  6≡   (4.40) 

With expressions for Rp, this is now sieved using the decomposition formula (4.13). new We treat the odd and even prime cases separately, and sieve to Rp first, given by:

new e e e 1 e 2 Rp (p ,χ,t,n)= Rp(p ,χ,t,n) 2Rp(p − ,χ,t,n)+ δ Rp(p − ,χ,t,n) (4.41) − s e 2 ≤ − TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 19

Let p be an odd prime. We study the cases e =1,e = 2 and e 3 separately. The new e ≥ resultant expression for Rp (p ,χp,t,n) is given by:

e 3 d ν (l) e +1 d 2 p − δ p p p − 2 (p 1) 1 (p 1) if γ e 1 2 2 e − p − − − p − ≥ − ≥   |        pe 3 1 p d if γ = e 2 1  − p  − − ≥ new   d   R =χ(t/2)  1 p if e =1 p − −  pνp(l)(p 2 s) p2+p+1+s  νp(l)   d p (p 2 s)+ 1 p − −p 1− if γ e =2 − − − − ≥  1 s    if γ =1= e 1 − − − 0 otherwise    χ(t/2+ u)+ χ(t/2 u) if s =1, d =1  − p δ  d if s =0   − e=2,γ=0 p  0  otherwise  (4.42)  Assuming, now, that 2 e we have a further sieve for Rmin. This is only considered | p when p> 2 and 2 e. We start by working out the sum over primitive characters. | 2 e Note that we always have f(χψ ) = p 2 and so h = e 1. Using this, along with Lemma 4.2, we get the following when γ e 1: − ≥ −

e e 2 e 3 νp(l) +1 d ψ(n)Rp(p 2 , χψ ,t,n)=p − (p 1)((p 1)2p − 2 + 1 e − − − p ψ,f(Xψ)=p 2    ν (l) e +1 (2p p − 2 p 1))χ(t/2) · − − (4.43)

When γ

min We use these to find Rp when e> 2, and then treat the e = 2 case separately. In min e full, for any twist-minimal χ with s 2 we get Rp (p ,χ,t,n) given by:

d pe 3 δ δ 1 − χ(t/2) δ + p δ (1 2s)+ δ δ p e=1 γ e 2 − p (2,e) e>2 e=2 − 2 e − γ e 1  or ( n )=1 ≥ −    γ=e| 2 ≥ − p −   (4.45) When p = 2 there are more character cases to consider. They are studied in the following categorisation, which is seen to be exhaustive: e s = 2 ,e 4 • s ⌊0,⌋2 ,e≥ max(2s +2, 3) • e<∈{3 } ≥ • 20 KIERANCHILD UNIVERSITYOFBRISTOL

For each case, we further separate cases on the value of γ and its relation to e. In full, we get: 3 if γ >e,e 3 − ≥ ( 1)e + 2 if γ = e,s = e ,e 4  − ⌊ 2 ⌋ ≥ 2( 1)d+1 + 1 if γ = e 1, 2 ∤ e,s = e ,e 4 d  − − ⌊ 2 ⌋ ≥ min e 3  d e Rp = 1 χ(t/2) 2 − 2( 1) 1 if γ e,e 1 ,s< 2 ,e 3 − 2 ⌈ ⌉  − − ∈{ − } ⌊ ⌋ ≥     1 if γ e,e 1, 2 − ≥ ∈{ } 1 if e =2,γ =0  2  1 if e =1,γ =0  −  (4.46) When s = e there is no sieving, and so we just apply this special case to the original expressions for R. When p> 2 we get:

νp(ℓ) e e−1 νp(ℓ) d 2p p p χp(t/2) 2p + 1 p p− 1− if s = e,γ 2e 1 − − ≥ −      min  Rp =  νp(ℓ) t+u t u  δ p (χp( 2 )+ χp( −2 )) if s = e,γ < 2e 1  d − ( p )=1 where u l√d (mod pe+νp(ℓ))   ≡  (4.47) and when p= 2 we get:

γ 2 +1 e 1 d ν2(ℓ)+1 (2⌊ ⌋ 3 2 − )(1 2 )+ δ 2 χ2(t/2) if γ > 2e − · − 2∤d       e 1 d ν2(ℓ)+1  2 − 1 2 + δ 2 χ2(t/2) if γ =2e min − − 2∤d Rp =       ν2(ℓ) t+u t u d 2 (χ2 + χ2 − ) if γ < 2e 1, =1  2 2 − 2 where u l√d (mod pe+νp(ℓ)+2)  ≡     0 otherwise   (4.48)  4.2. Formula for p (N,n). We now address the case that p divides both n and N, finding expressions for| the multiplicative part of each term (which we have denoted R in each case). From Lemma 4.1 we see that if s 1 then the trace is 0. As such, we only consider terms when s = e or e = 1. Noting that βm is now equivalent to the M¨obius µ function, we get the much simpler decomposition formula: min e e

f (p ,χ)= f(p ,χ) δ f(1, ½) (4.49) − s 0 then as p n we necessarily have χ(√n) = 0. Thus, we | min only have a non-zero A1 term when e = 1 and s = 0. In this case, we get Rp = 1 and so in full: − min Rp (p,χ,n)= δ (4.50) −s=0 For the A2 term, depending on γ, we have at most two elements in Ω. If γ = ν (t2 4n) is non-zero, then we must have p x whereupon χ(x) = 0. On the other p − | TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 21

t+u t u hand, if γ = 0 then we get J = χp 2 + χp −2 . We get:

 νp(ℓ) νp(ℓ) d p 1 p + 1 p p 1− if s =0,γ > 0 − − − min e t u t+u Rp (p ,χ,t,n)= χp − + χp    if s = e,γ =0 (4.51)  2 2  0   otherwise  For the A term note that χ(x ) = 0 for either c =1 or c = p if and only if p ∤ d 3 1 6 or p ∤ n/d, which is subsequently true if and only if νp(n/d d) = 0. Using this to evaluate, we get: − min e Rp (p ,χ,d,n)= χ(d)+ χ(n/d) δ (4.52) − s=0

Finally for the A4 term we get:

νp(n) min p Rp (p,n)= δ 1 (4.53) s=0 σ(pνp(n)) −  

4.3. Factorising over n. The preceding subsections allow us to produce a formula N n in the form of (4.11), where each Bi is evaluated on the arguments ( d , χ, k, d2 ). We now incorporate the outer sum by swapping the sum and product in each term. For the B1 term, swapping gives:

e e 1 p + p − if s = e e−2 C1 = φ( p )(p 1)  ⌈ ⌉ − (1 + δ p + δ (2s 2)) if s1 e=2 p N  2|e,p>2 − Yp|∤n (4.54) k/2 1 n − (k 1)χ (√n) d − f ( 1) · 12 − d p N X∈P Y| d p n | d2 Then, using multiplicativity of as defined in (4.3), we evaluate the inner sum, giving: P

e e 1 nk/2 1(k 1)χ (√n) p + p − if s = e − f e−2 C1 = − φ( p )(p 1) 12  ⌈1+ ⌉δ − (1 + δ p + δ (2s 2)) if s1 e=2 − Y|  2|e,p>2 (4.55) For B3 swapping the order of summation and substituting md for m gives:

′ k 1 C3 = m − m n d (N,n,χ) | ∈P mX√n d (m,n/mX ) ≤ | e √2 (χp(m)+χp(n/m)) e n (1 δ 2) if p =2, 2 e,γ 1 s, 2 ∤ 2 ,e> 2 8 − γ= e 1 | ≥ 2 − ≥ d 2 −  n χp(m)+ χp (n/m) δ if s = e or p 2 ·  s=0 d p N  − | Y| d 0 otherwise  (4.56)  22 KIERANCHILD UNIVERSITYOFBRISTOL

Noting that if p ∤ n then the product evaluates identically for all d, and using multiplicativity of we get: P

√ e 2 (χp(d)+χp(n/d)) (1 δ 2) if p =2, 2 e,γ e 1 s, 2 ∤ n,e > 2 8 e 2 ′ − γ= 2 1 | ≥ − ≥ k 1 − C3 = d −  χp(d)+ χp(n/d) if s = e d n p N  | |  dX√n Y 0 otherwise ≤  (4.57)  For the B4 contribution we get:

2 νp(n/d ) e 2 p C4 = δ µ(p ) dσ(n/d ) 2 1 νp(n/d ) k=2,χ=½ σ(p ) − p N d (N,n,χ) p N , n ! Y| ∈PX (Yd d2 ) p∤n | (4.58) = δ µ(N) σ(pνp(n))

k=2,χ=½ p n pY∤|N

For the B2 term, we follow the same procedure as above. Noting that γ is unchanged by substituting n/d2 and t/d for n and t respectively, we get:

d 1 if γ>s =0 p − min e t u t+u Rp (p ,χ,t,n)= χp  − + χp if s = e,γ =0 (4.59)  2 2  0   otherwise  

These Ci terms are now exactly as in Theorem 2.1. TWIST-MINIMAL TRACE FORMULA FOR HOLOMORPHIC CUSP FORMS 23

References

[1] A.O.L. Atkin and Joseph Lehner. Hecke operators on Γ0(m). Mathematische Annalen, 185(2):134–160. [2] A.O.L. Atkin and Wein-Ch’ing Winnie Li. Twists of newforms and pseudo-eigenvalues of W-operators. Inventiones mathematicae, 48(3):221–243. [3] Alex J. Best, Jonathan Bober, Andrew R. Booker, Edgar Costa, John Cremona, Maarten Derickx, David Lowry-Duda, Min Lee, David Roe, Andrew V. Sutherland, and John Voight. Computing classical modular forms. https://arxiv.org/pdf/2002.04717.pdf, 2020. [4] Andrew R. Booker and Min Lee. The as a Dirichlet series. Forum Mathematicum, 29(3). [5] Andrew R. Booker, Min Lee, and Andreas Str¨ombergsson. Twist-minimal trace formulas and the Selberg eigenvalue conjecture. London Mathematical Society, 102(3). [6] Henri Cohen and Fredrik Str¨omberg. Modular Forms: A Classical Approach. American Math- ematical Society. [7] John E. Cremona. Algorithms for Modular Elliptic Curves. Cambridge University Press, 1997. [8] Henri Darmon, Fred Diamond, and Richard Taylor. Fermat’s last theorem. Current develop- ments in mathematics, 1:1–154, 1995. [9] Harold Davenport. Multiplicative . Springer. [10] Fred Diamond and Jerry M. Shurman. A first course in modular forms. Springer, 2005. [11] Martin Eichler. Eine verallgemeinerung der abelschen integrale. Mathematische Zeitschrift, 67(1):267–298, 1957. [12] Hiroaki Hijikata. Explicit formula of the traces of Hecke operators for Γ0(n). Journal of the Mathematical Society of Japan, 26(1):56–82, 1974. [13] Henryk Iwaniec. Topics in classical automorphic forms. American Mathematical Society, 1997. [14] Chandrashekhar Khare and Jean-Pierre Wintenberger. Serre’s modularity conjecture (i). In- ventiones Mathematicae, 178(3):485–504, 2009. [15] Andrew Knightly and Charles Li. Traces of Hecke Operators. American Mathematical Society, 2006. [16] Hans Maass. Uber¨ eine neue art von nichtanalytischen automorphen funktionen und die bestimmung dirichletscher reihen durch funktionalgleichungen. Mathematische Annalen, 121(1):141–183, 1949. [17] Joseph Oesterl´e. Sur la trace des op´erateurs de Hecke. PhD thesis, 1977. [18] Andrew P. Ogg. On the eigenvalues of Hecke operators. Mathematische Annalen, 179(2):101– 108. [19] Marc Palm. Explicit GL(2) trace formulas and uniform, mixed weyl laws. https://arxiv.org/abs/1212.4282, 2012. [20] George J. Schaeffer. Hecke stability and weight 1 modular forms. Mathematische Zeitschrift, 281(1-2):159–191. [21] Atle Selberg. Harmonic analysis and discontinuous groups in weakly symmetric Riemannian spaces with applications to Dirichlet series. Journal of the Indian Mathematical Society, 20:47–87, 1956. [22] Matthew P. Young. Explicit calculations with Eisenstein series. Journal of Number Theory, 199:1–48, 2019. [23] . Elliptic modular forms and their applications. In The 1-2-3 of modular forms, pages 1–103. Springer, 2008. Email address: [email protected]

University of Bristol, Beacon House, Queens Road, Bristol, BS8 1QU, UK