eisenstein part of the theta function If $Q:\mathbb{Z}^{2k}\to \mathbb{Z}$ is any positive definite integer -valued quadratic form in $2k$ variables, then it is  well known, that the $\textbf{theta series}$ $\theta_Q(z):=\sum_{m\in\mathbb{Z}^{2k}}q^{Q(m)}\ (q=e^{2\pi i z})$ is a modular form of weight $k$ on the congruence group $\Gamma_0(N)$ ( for some integer $N$ ) with some character $\chi$ $\bmod$ $N$, i.e. $\theta_Q \left(\frac{az+b}{cz+d}\right)=\chi(d)(cz+d)^k \theta_Q(z)$ for all $\big(\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\big)\in \Gamma_0(N)$. Let us denote the space of modular forms of weight $k$ on $\Gamma_0(N)$ with character $\chi$ by M$_k(\Gamma_0(N),\chi)$. Let S$_k(\Gamma_0(N),\chi)$ be the subspace of cusp forms and $\mathcal{E}_k(\Gamma_0(N),\chi)$ be the eisenstein subspace. We know
$\text{M}_k(\Gamma_0(N),\chi)=\mathcal{E}_k(\Gamma_0(N),\chi)\oplus\text{S}_k(\Gamma_0(N),\chi)$ and this decomposition is orthogonal under the Petersson inner product. My Question is: Is there any explicit formula for the eisenstein part of the the theta function $\theta_Q$? Perhaps a simple form, when $\chi$ is the trivial character?!
 A: I believe the formula you're looking for is a formula of Siegel that expresses the $n$th Fourier coefficient of an Eisenstein series as a product of local densities. There are lots of papers giving formulas for these local densities in terms of the arithmetic of $Q$ in the literature. My two favorite sources are
$\bullet$ ''Local densities and explicit bounds for representability by a quadratic form'' by Jonathan Hanke, Duke Math. J. (2004), no. 2, 351-388, and
$\bullet$ ''An explicit formula for local densities of quadratic forms,'' by Tonghai Yang, J. Number Theory 72 (1998), 309-356.
The formulas you get simplify quite a bit if $\chi = 1$, and even more if the integer $n$ you want to represent is coprime to $N$.
A: The general statement is the Siegel-Weil theorem ... specialized to the case of real-anisotropic orthogonal group in an even number of variables paired against $SL_2$ or $Sp_n$.
The Siegel-Weil formula directly expresses certain Eisenstein series as linear combinations of holomorphic theta series, and the manifest fact that Eisenstein series are finite linear combinations of those formed from local data that factors over primes gives the factorization into local data.
