Eisenstein Series and Bernoulli Numbers

We introduce generalized Bernoulli numbers attached to Dirichlet characters and give an algorithm to enumerate the Eisenstein series in M_k(N,\eps).

The Eisenstein Subspace

Let M_k(\Gamma_1(N)) be the space of modular forms of weight k for \Gamma_1(N), and let \T be the Hecke algebra acting on M_k(\Gamma_1(N)), which is the subring of \End(M_k(\Gamma_1(N))) generated by all Hecke operators. Then there is a \T-module decomposition

M_k(\Gamma_1(N)) = \Eis_k(\Gamma_1(N)) \oplus S_k(\Gamma_1(N)),

where S_k(\Gamma_1(N)) is the subspace of modular forms that vanish at all cusps and \Eis_k(\Gamma_1(N)) is the Eisenstein subspace, which is uniquely determined by this decomposition. The above decomposition induces a decomposition of M_k(\Gamma_0(N)) and of M_k(N,\eps), for any Dirichlet character \eps of modulus N.

Generalized Bernoulli Numbers

Suppose \eps is a Dirichlet character of modulus N over \C. Leopoldt [Leo58] defined generalized Bernoulli numbers attached to \eps.

Definition 5.1

We define the generalized Bernoulli numbers B_{k,\eps} attached to \eps by the following identity of infinite series:

\sum_{a=1}^{N} \frac{\eps(a) \cdot x \cdot e^{ax}}{e^{Nx}-1}
\,\, = \,\,
\sum_{k=0}^{\infty} B_{k,\eps} \cdot \frac{x^k}{k!}.

If \eps is the trivial character of modulus 1 and B_k are as in Section Examples of Modular Forms of Level 1, then B_{k,\eps} = B_k, except when k=1, in which case B_{1,\eps} = -B_1 = 1/2 (see Exercise 5.2).

Algebraically Computing Generalized Bernoulli Numbers

Let \Q(\eps) denote the field generated by the image of the character \eps; thus \Q(\eps) is the cyclotomic extension \Q(\zeta_n), where n is the order of \eps.

Algorithm 5.2

Given an integer k\geq 0 and any Dirichlet character \eps with modulus N, this algorithm computes the generalized Bernoulli numbers B_{j,\eps}, for j\leq k.

  1. Compute g \set x/(e^{Nx}-1) \in \Q[[x]] to precision O(x^{k+1}) by computing e^{Nx}-1 = \sum_{n\geq 1} N^n x^n/n! to precision O(x^{k+2}) and computing the inverse 1/(e^{Nx}-1), then multiplying by x.

  2. For each a=1,\ldots, N, compute f_a \set g \cdot e^{ax}\in\Q[[x]], to precision O(x^{k+1}). This requires computing e^{ax}=\sum_{n\geq 0} a^n x^n/n! to precision O(x^{k+1}). (Omit computation of e^{Nx} if N>1 since then \eps(N)=0.)

  3. Then for j\leq k, we have

    B_{j,\eps} \set j!\cdot
\sum_{a=1}^{N} \eps(a) \cdot c_j(f_a),

    where c_j(f_a) is the coefficient of x^j in f_a.

Note that in steps (1) and (2) we compute the power series doing arithmetic only in \Q[[x]], not in \Q(\eps)[[x]], which could be much less efficient if \eps has large order. In step (1) if k is huge, we could compute the inverse 1/(e^{Nx}-1) using asymptotically fast arithmetic and Newton iteration.

Example 5.3

The nontrivial character \eps with modulus 4 has order 2 and takes values in \Q. The Bernoulli numbers B_{k,\eps} for k even are all 0 and for k odd they are

B_{1,\eps} &= -1/2,\\
B_{3,\eps} &= 3/2,\\
B_{5,\eps} &= -25/2,\\
B_{7,\eps} &= 427/2,\\
B_{9,\eps} &= -12465/2,\\
B_{11,\eps} &= 555731/2,\\
B_{13,\eps} &= -35135945/2,\\
B_{15,\eps} &= 2990414715/2,\\
B_{17,\eps} &= -329655706465/2,\\
B_{19,\eps} &= 45692713833379/2.

Example 5.4

The generalized Bernoulli numbers need not be in \Q. Suppose \eps is the mod 5 character such that \eps(2) = i = \sqrt{-1}. Then B_{k,\eps}=0 for k even and

B_{1,\eps} &= \frac{-i - 3}{5},\\
B_{3,\eps} &= \frac{6i + 12}{5},\\
B_{5,\eps} &= \frac{-86i - 148}{5},\\
B_{7,\eps} &= \frac{2366i + 3892}{5},\\
B_{9,\eps} &= \frac{-108846i - 176868}{5},\\
B_{11,\eps} &= \frac{7599526i + 12309572}{5},\\
B_{13,\eps} &= \frac{-751182406i - 1215768788}{5},\\
B_{15,\eps} &= \frac{99909993486i + 161668772052}{5},\\
B_{17,\eps} &= \frac{-17209733596766i - 27846408467908}{5}.\\

Example 5.5

We use Sage to compute some of the above generalized Bernoulli numbers. First we define the character and verify that \eps(2)=i (note that in Sage zeta4 is \sqrt{-1}).

sage: G = DirichletGroup(5)
sage: e = G.0
sage: e(2)

We compute the Bernoulli number B_{1,\eps}.

sage: e.bernoulli(1)
-1/5*zeta4 - 3/5

We compute B_{9,\eps}.

sage: e.bernoulli(9)
-108846/5*zeta4 - 176868/5

Proposition 5.6

If \eps(-1) \neq (-1)^k and k\geq 2, then B_{k,\eps}=0.


See Exercise 5.3.

Computing Generalized Bernoulli Numbers Analytically

This section, which was written jointly with Kevin McGown, is about a way to compute generalized Bernoulli numbers, which is similar to the algorithm in Section Fast Computation of Bernoulli Numbers.

Let \chi be a primitive Dirichlet character modulo its conductor f. Note from the definition of Bernoulli numbers that if \sigma\in\Gal(\Qbar/\Q), then

(1)\sigma(B_{n,\chi}) =  B_{n,\sigma(\chi)}.

For any character \chi, we define the Gauss sum \tau(\chi) as

\tau(\chi)=\sum_{r=1}^{f-1} \chi(r)\,\zeta^r

where \zeta=\exp(2\pi i/f) is the principal f^{th} root of unity. The Dirichlet L-function for \chi for \Re(s)>1 is

L(s,\chi)=\sum_{n=1}^\infty \chi(n)\,n^{-s}

In the right half plane \{s\in\C\mid \Re(s)>1\} this function is analytic, and because \chi is multiplicative, we have the Euler product representation

(2)L(s,\chi)=\prod_{p \text{ prime}} \left(1-\chi(p) p^{-s}\right)^{-1}

We note (but will not use) that through analytic continuation L(s,\chi) can be extended to a meromorphic function on the entire complex plane.

If \chi is a nonprincipal primitive Dirichlet character of conductor f such that \chi(-1)=(-1)^n, then (see, e.g., [Wan82])

L(n,\chi)=(-1)^{n-1}\, \frac{\tau(\chi)}{2} \left(\frac{2\pi i}{f}\right)^n

Solving for the Bernoulli number yields

B_{n,\chi}=(-1)^{n-1}\frac{2 n!}{\tau(\overline{\chi})}\left(\frac{f}{2\pi i}\right)^n

This allows us to give decimal approximations for B_{n,\chi}. It remains to compute B_{n,\chi} exactly (i.e., as an algebraic integer). To simplify the above expression, we define

K_{n,\chi} =(-1)^{n-1}\, 2 n!\left(\frac{f}{2 i}\right)^n

and write


Note that we can compute K_{n,\chi} exactly in the field \mathbb{Q}(i).

The following result identifies the denominator of B_{n,\chi}.

Theorem 5.7

Let n and \chi be as above, and define an integer d as follows:

d =
1    & \text{if $f$ is divisible by two distinct primes,}\\
2 & \text{if $f=4$,}\\
1 & \text{if $f=2^\mu$, $\mu>2$,}\\
np   & \text{if $f=p$, $p>2$,}\\
(1-\chi(1+p)) & \text{if $f=p^\mu$, $p>2$, $\mu>1$.}\\

Then dn^{-1}\,B_{n,\chi} is integral.


See [Car59a] for the proof and [Car59b] for further details.

To compute the algebraic integer d n^{-1} B_{n,\chi}, and we compute L(n,\overline{\chi}) to very high precision using the Euler product (2) and the formula (3). We carry out the same computation for each of the \Gal(\Qbar/\Q) conjugates of \chi, which by (1) yields the conjugates of d n^{-1} B_{n,\chi}. We can then write down the characteristic polynomial of d n^{-1} B_{n,\chi} to very high precision and recognize the coefficients as rational integers. Finally, we determine which of the roots of the characteristic polynomial is d n^{-1}
B_{n,\chi} by approximating them all numerically to high precision and seeing which is closest to our numerical approximation to d n^{-1} B_{n,\chi}. The details are similar to what is explained in Section Fast Computation of Bernoulli Numbers.

Explicit Basis for the Eisenstein Subspace

Suppose \chi and \psi are primitive Dirichlet characters with conductors L and R, respectively. Let

(4)E_{k,\chi,\psi}(q) = c_0 + \sum_{m \geq 1} \left(
\sum_{n|m} \psi(n) \cdot \chi(m/n) \cdot n^{k-1}\right) q^{m}
\in \Q(\chi, \psi)[[q]],


c_0 = \begin{cases} 0 & \text{ if } L>1, \\
\ds- \frac{B_{k,\psi}}{2k} & \text{ if } L=1.

Note that when \chi=\psi=1 and k\geq 4, then E_{k,\chi,\psi} = E_k, where E_k is from Chapter Modular Forms.

Miyake proves statements that imply the following in [Miy89, Ch. 7].

Theorem 5.8

Suppose t is a positive integer and \chi, \psi are as above and that k is a positive integer such that \chi(-1)\psi(-1) = (-1)^k. Except when k=2 and \chi=\psi=1, the power series E_{k,\chi,\psi}(q^t) defines an element of M_k(RLt,\chi \psi). If \chi=\psi=1, k=2, t>1, and E_2(q) = E_{k,\chi,\psi}(q), then E_2(q) - t E_2(q^t) is a modular form in M_2(\Gamma_0(t)).

Theorem 5.9

The Eisenstein series in M_k(N, \eps) coming from Theorem 5.8 with RLt \mid N and \chi \psi = \eps form a basis for the Eisenstein subspace E_k(N,\eps).

Theorem 5.10

The Eisenstein series E_{k,\chi,\psi}(q) \in M_k(RL) defined above are eigenforms (i.e., eigenvectors for all Hecke operators T_n). Also E_2(q) - t E_2(q^t), for t>1, is an eigenform.

Since E_{k,\chi,\psi}(q) is normalized so the coefficient of q is 1, the eigenvalue of T_m is the coefficient

\sum_{n|m} \psi(n) \cdot \chi(m/n) \cdot n^{k-1}

of q^m (see Proposition 9.10). Also for f = E_2(q) - t E_2(q^t) with t>1 prime, the coefficient of q is 1, T_m(f) = \sigma_{1}(m)\cdot f for (m,t)=1, and T_t(f) =
((t+1)-t)f = f.

Algorithm 5.11

Given a weight k and a Dirichlet character \eps of modulus N, this algorithm computes a basis for the Eisenstein subspace E_k(N,\eps) of M_k(N,\eps) to precision O(q^r).

1. [Weight 2 Trivial Character?] If k=2 and \eps=1, output the Eisenstein series E_2(q) - tE_2(q^t), for each divisor t\mid N with t\neq 1, and then terminate.

  1. [Empty Space?] If \eps(-1)\neq (-1)^k, output the empty list.
  2. [Compute Dirichlet Group] Let G\set D(N,\Q(\zeta_n)) be the group of Dirichlet characters with values in \Q(\zeta_n), where n is the exponent of (\Z/N\Z)^*.
  3. [Compute Conductors] Compute the conductor of every element of G using Algorithm 4.19.
  4. [List Characters \chi] Form a list V of all Dirichlet characters \chi \in G such that \cond(\chi)\cdot \cond(\chi/\eps) divides N.
  5. [Compute Eisenstein Series] For each character \chi in V, let \psi = \chi/\eps and compute E_{k,\chi,\psi}(q^t)\pmod{q^r} for each divisor t of N/(\cond(\chi)\cdot \cond(\psi)). Here we compute E_{k,\chi,\psi}(q^t) \pmod{q^r} using (4) and Algorithm 5.2.

Remark 5.12

Algorithm 5.11 is what is currently used in Sage. It might be better to first reduce to the prime power case by writing all characters as a product of local characters and combine steps (4) and (5) into a single step that involves orders. However, this might make things more obscure.

Example 5.13

The following is a basis of Eisenstein series for E_2(\Gamma_1(13)).

f_{1} &= \frac{1}{2} + q + 3q^{2} + 4q^{3} + \cdots,\\
f_{2} &= -\frac{7}{13}\zeta_{12}^{2} - \frac{11}{13} + q + \left(2\zeta_{12}^{2} + 1\right)q^{2} + \left(-3\zeta_{12}^{2} + 1\right)q^{3} + \cdots,\\
f_{3} &= q + \left(\zeta_{12}^{2} + 2\right)q^{2} + \left(-\zeta_{12}^{2} + 3\right)q^{3} + \cdots,\\
f_{4} &= -\zeta_{12}^{2} + q + \left(2\zeta_{12}^{2} - 1\right)q^{2} + \left(3\zeta_{12}^{2} - 2\right)q^{3} + \cdots,\\
f_{5} &= q + \left(\zeta_{12}^{2} + 1\right)q^{2} + \left(\zeta_{12}^{2} + 2\right)q^{3} + \cdots,\\
f_{6} &= -1 + q + -q^{2} + 4q^{3} + \cdots,\\
f_{7} &= q + q^{2} + 4q^{3} + \cdots,\\
f_{8} &= \zeta_{12}^{2} - 1 + q + \left(-2\zeta_{12}^{2} + 1\right)q^{2} + \left(-3\zeta_{12}^{2} + 1\right)q^{3} + \cdots,\\
f_{9} &= q + \left(-\zeta_{12}^{2} + 2\right)q^{2} + \left(-\zeta_{12}^{2} + 3\right)q^{3} + \cdots,\\
f_{10} &= \frac{7}{13}\zeta_{12}^{2} - \frac{18}{13} + q + \left(-2\zeta_{12}^{2} + 3\right)q^{2} + \left(3\zeta_{12}^{2} - 2\right)q^{3} + \cdots,\\
f_{11} &= q + \left(-\zeta_{12}^{2} + 3\right)q^{2} + \left(\zeta_{12}^{2} + 2\right)q^{3} + \cdots.\\

We computed it as follows:

sage: E = EisensteinForms(Gamma1(13),2)
sage: E.eisenstein_series()

We can also compute the parameters \chi,\psi,t that define each series:

sage: e = E.eisenstein_series()
sage: for e in E.eisenstein_series():
...       print e.parameters()
([1], [1], 13)
([1], [zeta6], 1)
([zeta6], [1], 1)
([1], [zeta6 - 1], 1)
([zeta6 - 1], [1], 1)
([1], [-1], 1)
([-1], [1], 1)
([1], [-zeta6], 1)
([-zeta6], [1], 1)
([1], [-zeta6 + 1], 1)
([-zeta6 + 1], [1], 1)


Exercise 5.1

Suppose A and B are diagonalizable linear transformations of a finite-dimensional vector space V over an algebraically closed field K and that AB=BA. Prove there is a basis for V so that the matrices of A and B with respect to that basis are both simultaneously diagonal.

Exercise 5.2

If \eps is the trivial character of modulus 1 and B_k are as in Section Examples of Modular Forms of Level 1, then B_{k,\eps} = B_k, except when k=1, in which case B_{1,\eps} = -B_1 = 1/2.

Exercise 5.3

Prove that for k\geq 2 if \eps(-1) \neq (-1)^k, then B_{k,\eps} = 0.

Exercise 5.4

Show that the dimension of the Eisenstein subspace E_3(\Gamma_1(13)) is 12 by finding a basis of series E_{k,\chi,\psi}. You do not have to write down the q-expansions of the series, but you do have to figure out which \chi, \psi to use.