“Modularity” of generalized theta series

The most basic theta series is defined by $$\theta(z)=\sum_{n=-\infty}^{\infty}q^{n^2}$$, where $$q=e^{2\pi iz}$$. This is connected to the question of how many representatations does an integer $$n$$ have as a sum of $$k$$ squares. The answer is just the $$n$$-th coefficient of $$\theta(z)^k$$.
This coefficent can be (at least in some cases) computed thanks to an astonsihing fact -- $$\theta(z)$$ is a modular form of weight $$1/2$$. The can be obtained by Fourier-transforming the function $$f(t)=e^{-at^2}$$. The result is $$\frac 1 {2\sqrt a}e^{-\omega^2/4a}$$, also a Gausian function.

But what if we try to analyze sums of higher powers, 3rd or even 4th. The function $$\sum_{n=-\infty}^{\infty}q^{n^3}$$ is not holomorphic, but $$\sum_{n=-\infty}^{\infty}q^{n^4}$$ is. However, for the Fourier transform of $$f(t)=e^{-at^4}$$ we get the DE: $$\frac {d^3F} {d\omega^3}=\frac {\omega} {4a}F$$. This is much more complicated than the original case and the function is certainly not a modular form.

But since the only difference between the two functions is the power of $$n$$, this naturally suggests that there may be at least some nice behaviour under some transformation. The function is certainly periodic with period 1, but that doesn't really help. Is there a more general framework, in which these functions may be studied and questions like "how many times can an integer be represented as $$a^4+b^4$$" answered?

• See also this question: mathoverflow.net/questions/57717/… – Stopple Mar 4 at 22:27
• $\sum_n e^{2i \pi n^4 z} = \sum_{m \ge 1} \lambda(m) \theta(m^2 z)$ where $\lambda(m) = \sum_{d^2 | m} \mu(m/d^2)$ and $\sum_n e^{-2i \pi n^4 / z} = (4iz)^{1/2} \sum_{m \ge 1} \lambda(m) m^{-1} \theta(z/ m^2)$ which isn't periodic. – reuns Mar 5 at 5:37