# Koike's Trace Formula

Koike's Trace Formula states that \begin{equation} \mbox{Tr}((U_p^{\kappa})^n) = - \sum_{0 \leq u < \sqrt{p^n}\ (u,p)=1}H(u^2-4p^n)\frac{\gamma(u)^\kappa}{\gamma(u)^2 - p^n}-1, \end{equation} where $\kappa\in \mathbb{C}_p$, $H(D)$ is the Hurwitz class number of $D$, and $\gamma(u)$ is the unique $p$-adic unit root of the equation $$x^2-ux+p^n=0.$$ Is there an implementation of this formula in sage ?

Please help us with the initialization of the involved objects, by sharing with us already existing code - even if it does not work properly. Some choice of the many involved symbols $p, u, n, \kappa$ that may be of interest - with the expected values for the results - would be a great help also. Both sides should be implemented? What is $U_p^\kappa$ if yes? Some self-contained reference for the framework would be also useful for a potential answerer.