Is there anything known about the (mock)modular properties, if any, of the following theta series,


$\sum\_{n\in {\mathbb Z}^r\_+} e^{2\pi i \langle b, n\rangle} q^{\frac12 \langle n,n\rangle}$,


where $\langle x, y\rangle$ might be degenerate. For example,


$\sum\_{\lambda,\mu,\nu=0}^\infty q^{\lambda+\mu+\nu+\lambda(\mu+\nu)}$,


is related to the quasimodular function $E\_2(\tau)$. 



Modular property of indefinite degenerate theta series
For indefinite theta series of higher signature than (1,1) (which as Jeff mentions above are studied in Zwegers' thesis), in general there will be non-holomorphic completions which are modular. These will generically be "higher depth" mock modular forms, which were considered by Zagier and Zwegers and by Raum, and are defined in Raum's paper here: <http://arxiv.org/ftp/arxiv/papers/1207/1207.5603.pdf>. Essentially, the mock modular forms of higher depth d are defined inductively be saying that a function transforming as a modular form has depth d if its image under the lowering operator (or equivalently the \xi operator) is a linear combination of products of modular forms and a mock modular form of depth d-1 (where one factor in each factor needs to have a complex conjugate). 


When the form is degenerate, this lowers the amount of "mockness". For example, in this paper of Bringmann, Zwegers, and I: <http://arxiv.org/pdf/1506.07833v2.pdf>, we write some examples of indefinite theta series of signature (1,2) in terms of products of modular and mock modular objects. In particular, take a look at (1.1) there. These formulas take some work to find explicitly, but the reason it works is the degeneracy of the indefinite theta function. Explicitly, (1.1) of our paper says that
$$
q^{-\frac18}\zeta\_1^{-\frac12}\zeta\_2^{\frac12 }\zeta\_3^{\frac12}\left(\sum\_{k>0,\ell,m\geq0}+\sum\_{k\leq0,\ell,m<0}\right)(-1)^kq^{\frac{k(k+1)}2+k\ell+km+\ell m}\zeta\_1^k\zeta\_2^{\ell}\zeta\_3^m=i\vartheta(z\_1)\mu(z\_1,z\_2)\mu(z\_1,z\_3)-\frac{\eta^3\vartheta(z\_2+z\_3)}{\vartheta(z\_2)\vartheta(z\_3)}\mu(z\_1,z\_2+z\_3)
,
$$
where I suppressed the dependence on $\tau$. Examples of some of these higher depth forms, which are analogous to the displayed equation above, are also discussed in Section 4 of Raum's paper cited above, where he explains how to restrict generalized objects transforming as Jacobi forms to torsion points in order to obtain many examples of higher depth forms satisfying the definition given above.


