Projections of modular forms on Eisenstein series and its application to Siegel's formula
Let $k \geq 2$ and $N$ be positive integers and let $χ$ be a Dirichlet character modulo $N$. Let $f(z)$ be a modular form in $M_k(Γ_0(N),χ)$. Then we have a unique decomposition $f(z)=E_f(z)+S_f(z)$, where $E_f(z) \in E_k(Γ_0(N),χ)$ and $S_f(z) \in S_k(Γ_0(N),χ)$. In this paper we give an explicit formula for $E_f(z)$ in terms of Eisenstein series. Then we apply our result to certain families of eta quotients and to representations of positive integers by $2k$-ary positive definite quadratic forms in order to give an alternative version of Siegel's formula for the weighted average number of representations of an integer by quadratic forms in the same genus. Our formula for the latter is in terms of generalized divisor functions and does not involve computation of local densities.