# Computing coefficients of theta functions associated to quadratic forms

If we take an integral positive definite quadratic form $$Q$$ and set $$\Theta_Q(z) = \sum_{k\geq 0}R_Q(k)e^{2\pi ikz}$$, what are the most efficient algorithms to compute the $$R_Q(k)$$? I am aware e.g. of the results in Edixhoven et al's book, for even unimodular lattices (Theorem 15.3.2); but are these the current state of the art? (Assuming GRH is fine).

• Peter Bruin has extended the algorithms to allow modular forms of any level (hence quadratic forms which are not necessarily even unimodular). See this paper from 2011: doi.org/10.5802/pmb.a-133 May 6, 2022 at 15:12
• Why involve the theta series? You can just formulate your question as one about computing representation numbers. May 6, 2022 at 20:49
• @Kimball The algorithms of Edixhoven et al rely fundamentally on the modularity of $\Theta_Q$. Do you know an algorithm which doesn't use the modular interpretation, and which is competitive in complexity with their algorithm? (I certainly don't.) So calling for all mention of $\Theta_Q$ to be struck out of the question would seem a strange, almost Luddite approach. May 7, 2022 at 13:00
• @DavidLoeffler No, but the OP doesn't describe Edixhoven's algorithm at all. With the information that is in the question, I just thought the question be stated more directly without theta series. (That said, I would prefer if the OP gave more background.) May 7, 2022 at 13:55
• @DavidLoeffler that reference is great - thanks so much! May 8, 2022 at 13:58