The Eichler-Selberg trace formula (Theorem 2.2 here) gives a relation between the trace of a Hecke operator acting on the space of cusp forms and sums of weighted class numbers of imaginary quadratic orders. For example, by putting $N = 1$, $k = 2$ and $\omega'$ to be the trivial character, we get $$H(-4n) + 2\sum_{t = 1}^{\lceil\sqrt{4n}\rceil - 1} H(t^2 - 4n) = 2\left(\sum_{d|n} d\right) - 2\left(\sum_{\substack{d|n \\ d<\sqrt{n}}} d\right) - \chi(n)\sqrt{n} + \frac{1}{6}\chi(n),$$ where $H(D)$ denotes the Hurwitz class number and $\chi(n)$ is $1$ if $n$ is a square and $0$ otherwise. Here are a few questions that I would like to ask:

- Is there some source listing more interesting relations like this which can be obtained by plugging in suitable parameters in the trace formula?
- Can such equations be used to compute class numbers efficiently? I am aware of algorithms above which uses the above formula for verifying its correctness (see here), but I don't know if such formulas themselves can be used to compute the class numbers. If so, are they able to match the efficiency of other state-of-the-art algorithms? The only such algorithm I am aware of is Corollary 5.3.9 in Cohen's
*Computational Algebraic Number Theory*, but that one is not so fast.

Where should I be looking to find more research on this? Thanks!