TITLE: is this a modular form of some kind?
QUESTION [16 upvotes]: I suspect that the function
$$F(q) = \sum_{n \geq 0} (2n + 1) \, q^\binom{n+1}{2}$$
may be some kind of modular form. It looks like a weighted theta function, but is not exactly an harmonic theta series.
Plotting this function in the complex unit disc suggests a modular behaviour. There is a real zero around $-0.3$, and other zeros inside the disc.
The formula above has an hidden symmetry, because summation over all negative integers would give the opposite function.

Is $F(q)$ indeed a modular form ?

And if so

Does it appear in the literature ?

I am also interested in the expansion around $q=1$, where there is a pole. But this would be another question.
EDIT:
The answer below by Somos is interesting, but it only tells us that another resembling series (with alternating signs) is a modular form. It is not possible to pass from this modular form to $F(q)$ by just changing $q$ to $-q$.
EDIT:
Trying to follow the suggested track of Eichler integrals for modular forms of half-integer weights and quantum modular forms, one auxiliary question is now whether the following is a modular form:
$$\sum_{n \geq 0} q^{(2n+1)^2/8}.$$
Here the sum can also be taken over $\mathbb{Z}$, so this is rather similar to a theta function...
EDIT: ... and in fact is equal to the difference
$$\sum_{n} q^{n^2/8} - \sum_{n} q^{n^2/2}.$$
EDIT: Here is a picture

REPLY [2 votes]: Regarding the function $G(q) = \sum_{n \geq 0} q^{(2n+1)^2/8}$ we have
\begin{equation*}
G(q) = \frac12 \sum_{n \in \mathbb{Z}} q^{n^2/8} - \frac12 \sum_{n \in \mathbb{Z}} q^{n^2/2} = \frac12 \vartheta\bigl(\frac{\tau}{4}\bigr) - \frac12 \vartheta(\tau)
\end{equation*}
where $\vartheta(\tau)$ is the Jacobi theta function $\vartheta_{00}(0;\tau)$. It is known that $\vartheta$ is modular for $\Gamma := \Gamma(2) \cup \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \Gamma(2)$  (see for example [1], Annexe E). In general if $f(\tau)$ is a modular form for $\Gamma(N)$ and $\delta \geq 1$ is any integer, then $f(\delta\tau)$ and $f(\tau/\delta)$ are modular forms for $\Gamma(N\delta)$. So $G(q)$ would be a modular form of weight $1/2$ for $\Gamma(8)$, except that the transformation $\tau \to \tau/4$ changes the multiplier system involved in the definition of an half-integral modular form, so one might need to add some level to get the true level of $G$.
Regarding the definition of the multiplier system for half-integral weight modular forms, Shimura in [2] takes $(\gamma,\tau) \mapsto \theta(\gamma \tau)/\theta(\tau)$ with $\theta(\tau)=\vartheta(2\tau)$, which is defined for $\gamma \in \Gamma_0(4)$. The matrix $\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}$ conjugates $\Gamma_0(4)$ to $\Gamma(2)$, so here one may simply choose the multiplier $(\gamma,\tau) \mapsto \vartheta(\gamma \tau)/\vartheta(\tau)$ defined on any subgroup of $\Gamma$. This multiplier is computed explicitly in Martin-Royer, see [1, Proposition 166].
[1] Martin, François; Royer, Emmanuel. Formes modulaires et périodes. Formes modulaires et transcendance, 1--117, Sémin. Congr., 12, Soc. Math. France, Paris,  2005.
[2] Shimura, Goro. On modular forms of half integral weight. Ann. of Math. (2)  97  (1973), 440--481.