1 Introduction

Given a family of quasimodular forms, the question which of its members are modular often has an interesting answer. For example, consider the family of theta series

$$\begin{aligned} \theta _P(\tau ) = \sum _{\underline{x}\in \mathbb {Z}^r} P(\underline{x})q^{x_1^2+\ldots +x_r^2} \quad \quad \quad (q=e^{2\pi i \tau }) \end{aligned}$$

given by all homogeneous polynomials \(P\in \mathbb {Z}[x_1,\ldots , x_r]\). The quasimodular form \(\theta _P\) is modular if and only if P is harmonic (i.e. \(P\in \ker \sum _{i=1}^r \frac{\partial ^2}{\partial x_i^2}\)) [10]. (As quasimodular forms were not yet defined, Schoeneberg only showed that \(\theta _P\) is modular if P is harmonic. However, for every polynomial P it follows that \(\theta _P\) is quasimodular by decomposing P as in Formula (1).) Also, for every two modular forms fg, one can consider the linear combination of products of derivatives of f and g given by

$$\begin{aligned} \sum _{r=0}^n a_r f^{(r)} g^{(n-r)} \quad \quad (a_r\in \mathbb {C}). \end{aligned}$$

This linear combination is a quasimodular form which is modular precisely if it is a multiple of the Rankin–Cohen bracket \([f,g]_n\) [4, 9]. In this paper, we provide a condition to decide which member of the family of quasimodular forms provided by the Bloch–Okounkov theorem is modular. Let \(\mathscr {P}\) denote the set of all partitions of integers and \(|\lambda |\) denote the integer that \(\lambda \) is a partition of. Given a function \(f:\mathscr {P}\rightarrow \mathbb {Q}\), define the q-bracket of f by

$$\begin{aligned} \langle f \rangle _q := \frac{\sum _{\lambda \in \mathscr {P}} f(\lambda ) q^{|\lambda |}}{\sum _{\lambda \in \mathscr {P}} q^{|\lambda |}}. \end{aligned}$$

The celebrated Bloch–Okounkov theorem states that for a certain family of functions \(f:\mathscr {P}\rightarrow \mathbb {Q}\) (called shifted symmetric polynomials and defined in Sect. 2) the q-brackets \(\langle f \rangle _q\) are the q-expansions of quasimodular forms [2].

Besides being a wonderful result, the Bloch–Okounkov theorem has many applications in enumerative geometry. For example, a special case of the Bloch–Okounkov theorem was discovered by Dijkgraaf and provided with a mathematically rigorous proof by Kaneko and Zagier, implying that the generating series of simple Hurwitz numbers over a torus are quasimodular [5, 7]. Also, in the computation of asymptotics of geometrical invariants, such as volumes of moduli spaces of holomorphic differentials and Siegel–Veech constants, the Bloch–Okounkov theorem is applied [3, 6].

Zagier gave a surprisingly short and elementary proof of the Bloch–Okounkov theorem [13]. A corollary of his work, which we discuss in Sect. 3, is the following proposition:

Proposition 1

There exists actions of the Lie algebra \(\mathfrak {sl}_2\) on both the algebra of shifted symmetric polynomials \(\varLambda ^*\) and the algebra of quasimodular forms \(\widetilde{M}\) such that the q-bracket \(\langle \cdot \rangle _q: \varLambda ^*\rightarrow \widetilde{M}\) is \(\mathfrak {sl}_2\)-equivariant.

The answer to the question in the title is provided by one of the operators \(\Delta \) which defines this \(\mathfrak {sl}_2\)-action on \(\varLambda ^*\). Namely letting \(\mathcal {H}=\ker \Delta |_{\varLambda ^*}\), we prove the following theorem:

Theorem 1

Let \(f\in \varLambda ^*\). Then \(\langle f \rangle _q\) is modular if and only if \(f=h+k\) with \(h\in \mathcal {H}\) and \(k\in \ker \langle \cdot \rangle _q\).

The last section of this article is devoted to describing the graded algebra \(\mathcal {H}\). We call \(\mathcal {H}\) the space of shifted symmetric harmonic polynomials, as the description of this space turns out to be very similar to the space of classical harmonic polynomials. Let \(\mathcal {P}_d\) be the space of polynomials of degree d in \(m\ge 3\) variables \(x_1,\ldots ,x_m\), let \(||x||^2=\sum _{i}x_i^2\), and recall that the space \(\mathscr {H}_d\) of degree d harmonic polynomials is given by \(\ker \sum _{i=1}^r \frac{\partial ^2}{\partial x_i^2}\). The main theorem of harmonic polynomials states that every polynomial \(P\in \mathcal {P}_d\) can uniquely be written in the form

$$\begin{aligned} P=h_0+||x||^2h_1+\ldots +||x||^{2d'}h_{d'} \end{aligned}$$
(1)

with \(h_i\in \mathscr {H}_{d-2i}\) and \(d'=\lfloor d/2\rfloor \). Define \(K\), the Kelvin transform, and \(D^\alpha \) for \(\alpha \) an m-tuple of non-negative integers by

$$\begin{aligned} f(x)\mapsto ||x||^{2-m}f\left( \frac{x}{||x||^2}\right) \quad \text {and} \quad D^\alpha = \prod _i \frac{\partial ^\alpha _i}{\partial x_i^{\alpha _i}}. \end{aligned}$$

An explicit basis for \(\mathscr {H}_d\) is given by

$$\begin{aligned} \{KD^\alpha K(1) \mid \alpha \in \mathbb {Z}_{\ge 0}^m, \textstyle \sum _i \alpha _i=d, \alpha _1\le 1\}, \end{aligned}$$

see for example [1]. We prove the following analogous results for the space of shifted symmetric polynomials:

Theorem 2

For every \(f\in \varLambda ^*_n\) there exists unique \(h_{i}\in \mathcal {H}_{n-2i}\) (\(i=0,1,\ldots , n'\) and \(n'={\lfloor \tfrac{n}{2}\rfloor }\)) such that

$$\begin{aligned} f= h_0+Q_2h_1+\ldots +Q_2^{n'}h_{n'}, \end{aligned}$$

where \(Q_2\) is an element of \(\varLambda ^*_2\) given by \(Q_2(\lambda )=|\lambda |-\frac{1}{24}\). \(\square \)

Theorem 3

The set

$$\begin{aligned} \{\mathrm {pr}\, K\, \Delta _\lambda \, K(1) \mid \lambda \in \mathscr {P}(n), \text {all parts are } \ge 3\} \end{aligned}$$

is a vector space basis of \(\mathcal {H}_n\), where \(\mathrm {pr}, K\), and \(\Delta _\lambda \) are defined by (4), Definition 4, respectively, Definition 6.

The action of \(\mathfrak {sl}_2\) given by Proposition 1 makes \(\varLambda ^*\) into an infinite-dimensional \(\mathfrak {sl}_2\)-representation for which the elements of \(\mathcal {H}\) are the lowest weight vectors. Theorem 2 is equivalent to the statement that \(\varLambda ^*\) is a direct sum of the (not necessarily irreducible) lowest weight modules

$$\begin{aligned} \displaystyle V_n=\bigoplus _{m=0}^\infty Q_2^m \mathcal {H}_n \quad \quad (n\in \mathbb {Z}). \end{aligned}$$

2 Shifted symmetric polynomials

Shifted symmetric polynomials were introduced by Okounkov and Olshanski as the following analogue of symmetric polynomials [8]. Let \(\varLambda ^*(m)\) be the space of rational polynomials in m variables \(x_1,\ldots , x_m\) which are shifted symmetric, i.e. invariant under the action of all \(\sigma \in \mathfrak {S}_m\) given by \(x_i\mapsto x_{\sigma (i)}+i-\sigma (i)\) (or more symmetrically \(x_i-i\mapsto x_{\sigma (i)}-\sigma (i)\)). Note that \(\varLambda ^*(m)\) is filtered by the degree of the polynomials. We have forgetful maps \(\varLambda ^*(m)\rightarrow \varLambda ^*({m-1})\) given by \(x_m\mapsto 0\), so that we can define the space of shifted symmetric polynomials \(\varLambda ^*\) as \(\displaystyle \varprojlim _m \varLambda ^*(m)\) in the category of filtered algebras. Considering a partition \(\lambda \) as a non-increasing sequence \((\lambda _1,\lambda _2,\ldots )\) of non-negative integers \(\lambda _i\), we can interpret \(\varLambda ^*\) as being a subspace of all functions \(\mathscr {P}\rightarrow \mathbb {Q}\).

One can find a concrete basis for this abstractly defined space by considering the generating series

$$\begin{aligned} w_\lambda (T):=\sum _{i=1}^\infty T^{\lambda _i-i+\tfrac{1}{2}} \in T^{1/2}\mathbb {Z}[T][[T^{-1}]] \end{aligned}$$
(2)

for every \(\lambda \in \mathscr {P}\) (the constant \(\tfrac{1}{2}\) turns out to be convenient for defining a grading on \(\varLambda ^*\)). As \(w_\lambda (T)\) converges for \(T>1\) and equals

$$\begin{aligned} \frac{1}{T^{1/2}-T^{-1/2}} + \sum _{i=1}^{\ell (\lambda )}\left( T^{\lambda _i-i+\tfrac{1}{2}}-T^{-i+\tfrac{1}{2}}\right) \end{aligned}$$

one can define shifted symmetric polynomials \(Q_i(\lambda )\) for \(i\ge 0\) by

$$\begin{aligned} \sum _{i=0}^\infty Q_i(\lambda ) z^{i-1} := w_\lambda (e^z) \quad \quad (0<|z|<2\pi ). \end{aligned}$$
(3)

The first few shifted symmetric polynomials \(Q_i\) are given by

$$\begin{aligned} Q_0(\lambda )=1,\quad Q_1(\lambda )=0,\quad Q_2(\lambda )=|\lambda |-\tfrac{1}{24}. \end{aligned}$$

The \(Q_i\) freely generate the algebra of shifted symmetric polynomials, i.e. \(\varLambda ^*=\mathbb {Q}[Q_2,Q_3,\ldots ]\). It is believed that \(\varLambda ^*\) is maximal in the sense that for all \(Q:\mathscr {P}\rightarrow \mathbb {Q}\) with \(Q\not \in \varLambda ^*\) it holds that \(\langle \varLambda ^*[Q]\rangle _q \not \subseteq \widetilde{M}\).

Remark 1

The space \(\varLambda ^*\) can equally well be defined in terms of the Frobenius coordinates. Given a partition with Frobenius coordinates \((a_1,\ldots , a_r,b_1,\ldots , b_r)\), where \(a_i\) and \(b_i\) are the arm and leg lengths of the cells on the main diagonal, let

$$\begin{aligned} C_\lambda =\left\{ -b_1-\tfrac{1}{2},\ldots , -b_r-\tfrac{1}{2},a_r+\tfrac{1}{2},\ldots ,a_1+\tfrac{1}{2} \right\} . \end{aligned}$$

Then

$$\begin{aligned} Q_k(\lambda ) =\beta _k + \frac{1}{(k-1)!}\sum _{c\in C_{\lambda }} {{\,\mathrm{sgn}\,}}(c)c^{k-1}, \end{aligned}$$

where \(\beta _k\) is the constant given by

$$\begin{aligned} \sum _{k\ge 0}\beta _k z^{k-1} = \frac{1}{2\sinh (z/2)} = w_\emptyset (e^z). \end{aligned}$$

We extend \(\varLambda ^*\) to an algebra where \(Q_1\not \equiv 0\). Observe that a non-increasing sequence \((\lambda _1,\lambda _2,\ldots )\) of integers corresponds to a partition precisely if it converges to 0. If, however, it converges to an integer n, Eqs. (2) and (3) still define \(Q_k(\lambda )\). In fact, in this case

$$\begin{aligned} Q_k(\lambda ) = (e^{n\varvec{\partial }})Q_k(\lambda -n) \end{aligned}$$

by [13, Proposition 1] where \(\varvec{\partial } Q_0=0\), \(\varvec{\partial } Q_k = Q_{k-1}\) for \(k\ge 1\), and \(\lambda -n=(\lambda _1-n,\lambda _2-n,\ldots )\) corresponds to a partition (i.e. converges to 0). In particular, \(Q_1(\lambda )=n\) equals the number the sequence \(\lambda \) converges to. We now define the Bloch–Okounkov ring \(\mathcal {R}\) to be \(\varLambda ^*[Q_1]\), considered as a subspace of all functions from non-increasing eventually constant sequences of integers to \(\mathbb {Q}\). It is convenient to work with \(\mathcal {R}\) instead of \(\varLambda ^*\) to define the differential operators \(\Delta \) and more generally \(\Delta _\lambda \) later. Both on \(\varLambda ^*\) and \(\mathcal {R}\), we define a weight grading by assigning to \(Q_i\) weight i. Denote the projection map by

$$\begin{aligned} \mathrm {pr}:\mathcal {R}\rightarrow \varLambda ^*. \end{aligned}$$
(4)

We extend \(\langle \cdot \rangle _q\) to \(\mathcal {R}\).

The operator \(E=\sum _{m=0}^\infty Q_m \frac{\partial }{\partial Q_{m}}\) on \(\mathcal {R}\) multiplies an element of \(\mathcal {R}\) by its weight. Moreover, we consider the differential operators

$$\begin{aligned} \varvec{\partial } = \sum _{m=0}^\infty Q_m \frac{\partial }{\partial Q_{m+1}} \quad \text {and} \quad \mathscr {D} = \sum _{k,\ell \ge 0} \left( {\begin{array}{c}k+\ell \\ k\end{array}}\right) Q_{k+\ell } \frac{\partial ^2}{\partial Q_{k+1} \partial Q_{\ell +1}}. \end{aligned}$$

Let \(\Delta =\tfrac{1}{2}(\mathscr {D}-\varvec{\partial }^2)\), i.e.

$$\begin{aligned} 2\Delta = \sum _{k,\ell \ge 0}\left( \left( {\begin{array}{c}k+\ell \\ k\end{array}}\right) Q_{k+\ell }-Q_kQ_\ell \right) \frac{\partial ^2}{\partial Q_{k+1} \partial Q_{\ell +1}}-\sum _{k\ge 0} Q_k \frac{\partial }{\partial Q_{k+2}}. \end{aligned}$$

In the following (antisymmetric) table, the entry in the row of operator A and column of operator B denotes the commutator [AB], for proofs see [13, Lemma 3].

$$\begin{aligned} \begin{array}{l|lllll} &{}\quad \Delta &{}\quad \varvec{\partial } &{}\quad E&{}\quad Q_1 &{}\quad Q_2 \\ \hline \Delta &{}\quad 0 &{}\quad 0 &{}\quad 2\Delta &{}\quad 0 &{}\quad E-Q_1\varvec{\partial }-\tfrac{1}{2} \\ \varvec{\partial } &{}\quad 0 &{}\quad 0 &{}\quad \varvec{\partial }&{}\quad 1 &{}\quad Q_1 \\ E &{}\quad -2\Delta &{}\quad -\varvec{\partial } &{}\quad 0 &{}\quad Q_1 &{}\quad 2Q_2 \\ Q_1 &{}\quad 0 &{}\quad -1 &{}\quad -Q_1 &{}\quad 0 &{}\quad 0 \\ Q_2 &{}\quad -E+Q_1\varvec{\partial }+\tfrac{1}{2} &{}\quad -Q_1 &{}\quad -2 Q_2 &{}\quad 0 &{}\quad 0 \end{array} \end{aligned}$$

Definition 1

A triple (XYH) of operators is called an \(\mathfrak {sl}_2\)-triple if

$$\begin{aligned}{}[H,X]=2X, \quad [H,Y]=-2Y, \quad [Y,X]=H. \end{aligned}$$

Let \(\hat{Q}_2:=Q_2-\tfrac{1}{2}Q_1^2\) and \(\hat{E}:=E-Q_1\varvec{\partial }-\frac{1}{2}.\) The following result follows by a direct computation using the above table:

Proposition 2

The operators \((\hat{Q}_2,\Delta ,\hat{E})\) form an \(\mathfrak {sl}_2\)-triple. \(\square \)

For later reference, we compute \([\Delta ,Q_2^n]\). This could be done inductively by noting that \([\Delta ,Q_2^n] = Q_2^{n-1}[\Delta ,Q_2]+[\Delta ,Q_2^{n-1}]Q_2\) and using the commutation relations in the above table. The proof below is a direct computation from the definition of \(\Delta \).

Lemma 1

For all \(n\in \mathbb {N}\), the following relation holds

$$\begin{aligned}{}[\Delta ,Q_2^n]=-\frac{n(n-1)}{2}Q_1^2Q_2^{n-2}-nQ_1Q_2^{n-1} \varvec{\partial }+nQ_2^{n-1}(E+n-\tfrac{3}{2}). \end{aligned}$$

Proof

Let \(f\in \mathbb {Q}[Q_1,Q_2]\), \(g\in \mathscr {R}\), and \(n\in \mathbb {N}\). Then

$$\begin{aligned} \Delta (fg)&= \Delta (f) g + \frac{\partial f}{\partial Q_2}(Eg-Q_1 \varvec{\partial } g)+f\Delta (g), \end{aligned}$$
(5)
$$\begin{aligned} \Delta (Q_2^n)&=n(n-\tfrac{3}{2})Q_2^{n-1}-\frac{n(n-1)}{2}Q_2^{n-2}Q_1^2. \end{aligned}$$
(6)

By (5) and (6), we find

$$\begin{aligned} \Delta (Q_2^ng)&= \big (n(n-\tfrac{3}{2})Q_2^{n-1}-\frac{n(n-1)}{2}Q_1^2Q_2^{n-2}\big )g\\&+\,nQ_2^{n-1}(Eg-Q_1 \varvec{\partial } g)+Q_2^{n}\Delta (g). \end{aligned}$$

\(\square \)

3 An \(\mathfrak {sl}_2\)-equivariant mapping

The space of quasimodular forms for \(\mathrm {SL}_2(\mathbb {Z})\) is given by \(\widetilde{M} =\mathbb {Q}[P,Q,R]\), where PQ, and R are the Eisenstein series of weight 2, 4, and 6, respectively (in Ramanujan’s notation). We let \(\widetilde{M}^{(\le p)}_k\) be the space of quasimodular forms of weight k and depth \(\le p\) (the depth of a quasimodular form written as a polynomial in PQ, and R is the degree of this polynomial in P). See [12, Section 5.3] or [13, Section 2] for an introduction into quasimodular forms.

The space of quasimodular forms is closed under differentiation, more precisely the operators \(D=q\frac{d}{dq}\), \(\mathfrak {d}=12\frac{\partial }{\partial P}\), and the weight operator W given by \(Wf=kf\) for \(f\in \widetilde{M}_k\) preserve \(\widetilde{M}\) and form an \(\mathfrak {sl}_2\)-triple. In order to compute the action of D in terms of the generators PQ, and R, one uses the Ramanujan identities

$$\begin{aligned} D(P)=\frac{P^2-Q}{12}, \quad D(Q)=\frac{PQ-R}{3}, \quad D(R)= \frac{PR-Q^2}{2}. \end{aligned}$$

In the context of the Bloch–Okounkov theorem, it is more natural to work with \(\hat{D} := D - \frac{P}{24}\), as for all \(f\in \varLambda ^*\) one has \(\langle Q_2 f\rangle _q = \hat{D} \langle f \rangle _q\). Moreover, \(\hat{D}\) has the property that it increases the depth of a quasimodular form by 1, in contrast to D for which \(D(1)=0\) does not have depth 1:

Lemma 2

Let \(f\in \widetilde{M}\) be of depth r. Then \(\hat{D}f\) is of depth \(r+1\).

Proof

Consider a monomial \(P^aQ^bR^c\) with \(a,b,c\in \mathbb {Z}_{\ge 0}\). By the Ramanujan identities, we find

$$\begin{aligned} D(P^aQ^bR^c) = \left( \frac{a}{12}+\frac{b}{3}+\frac{c}{2}\right) P^{a+1}Q^bR^c + O(P^{a}), \end{aligned}$$

where \(O(P^{a})\) denotes a quasimodular form of depth at most a. The lemma follows by noting that \(\frac{a}{12}+\frac{b}{3}+\frac{c}{2}-\frac{1}{24}\) is non-zero for \(a,b,c\in \mathbb {Z}\). \(\square \)

Moreover, letting \(\hat{W}=W-\frac{1}{2}\), the triple (\(\hat{D}, \mathfrak {d}, \hat{W})\) forms an \(\mathfrak {sl}_2\)-triple as well. With respect to these operators, the q-bracket becomes \(\mathfrak {sl}_2\)-equivariant. The following proposition is a detailed version of Proposition 1:

Proposition 3

(The \(\mathfrak {sl}_2\)-equivariant Bloch–Okounkov theorem) The mapping \(\langle \cdot \rangle _q: \mathcal {R} \rightarrow \widetilde{M}\) is \(\mathfrak {sl}_2\)-equivariant with respect to the \(\mathfrak {sl}_2\)-triple \((\hat{Q}_2, \Delta ,\hat{E})\) on \(\mathcal {R}\) and the \(\mathfrak {sl}_2\)-triple \((\hat{D}, \mathfrak {d}, \hat{W})\) on \(\widetilde{M}\), i.e. for all \(f\in \mathcal {R}\), one has

$$\begin{aligned} \hat{D}\langle f\rangle _q = \langle \hat{Q}_2f\rangle _q,\quad \mathfrak {d}\langle f\rangle _q=\langle \Delta f\rangle _q, \quad \hat{W}\langle f\rangle _q= \langle \hat{E}f\rangle _q. \end{aligned}$$

Proof

This follows directly from [13, Equation (37)] and the fact that for all \(f\in \mathcal {R}\) one has \(\langle Q_1 f \rangle _q=0\). \(\square \)

4 Describing the space of shifted symmetric harmonic polynomials

In this section, we study the kernel of \(\Delta \). As \([\Delta ,Q_1]=0\), we restrict ourselves without loss of generality to \(\varLambda ^*\). Note, however, that \(\Delta \) does not act on \(\varLambda ^*\) as, for example, \(\Delta (Q_3)=-\tfrac{1}{2}Q_1\). However, \(\mathrm {pr}\Delta \) does act on \(\varLambda ^*\).

Definition 2

Let

$$\begin{aligned} \mathcal {H} = \{f \in \varLambda ^* \mid \Delta f\in Q_1\mathcal {R}\}=\ker \mathrm {pr}\Delta , \end{aligned}$$

be the space of shifted symmetric harmonic polynomials.

Proposition 4

If \(f\in Q_2\varLambda ^*\) is non-zero, then \(f \not \in \mathcal {H}\).

Proof

Write \(f=Q_2^n f'\) with \(f'\in \varLambda ^*\) and \(f'\not \in Q_2\varLambda ^*\). Then

$$\begin{aligned} \mathrm {pr}\Delta (f)=Q_2^{n-1}(n(n+k-\tfrac{3}{2})f'+Q_2\mathrm {pr}\Delta f') \end{aligned}$$

by Lemma 1. As \(f'\) is not divisible by \(Q_2\), it follows that \(\mathrm {pr}\Delta (f) =0\) precisely if \(f'=0\). \(\square \)

Proposition 5

For all \(n\in \mathbb {Z}\), one has

$$\begin{aligned} \varLambda _n^* = \mathcal {H}_n \oplus Q_2 \varLambda _{n-2}^*. \end{aligned}$$

Proof

For uniqueness, suppose \(f=Q_2g+h\) and \(f=Q_2g'+h'\) with \(g,g'\in \varLambda _{n-2}^*\) and \(h,h' \in \mathcal {H}_n\). Then, \(Q_2(g-g')=h'-h\in \mathcal {H}\). By Proposition 4 we find \(g=g'\) and hence \(h=h'\).

Now, define the linear map \(T:\varLambda _n^*\rightarrow \varLambda _n^*\) by \(f\mapsto \mathrm {pr}\Delta (Q_2f).\) By Proposition 4 we find that T is injective, which by finite dimensionality of \(\varLambda _n^*\) implies that T is surjective. Hence, given \(f\in \varLambda _{n}^*\) let \(g\in \varLambda _{n-2}^*\) be such that \(T(g)=\mathrm {pr}\Delta (f) \in \varLambda _{n-2}^*\). Let \(h=f-Q_2g\). As \(f=Q_2g+h\), it suffices to show that \(h\in \mathcal {H}\). That holds true because \(\mathrm {pr}\Delta (h)=\mathrm {pr}\Delta (f)-\mathrm {pr}\Delta (Q_2g)=0\). \(\square \)

Proposition 5 implies Theorem 2 and the following corollary. Denote by p(n) the number of partitions of n.

Corollary 1

The dimension of \(\mathcal {H}_n\) equals the number of partitions of n in parts of size at least 3, i.e.

$$\begin{aligned} \dim \mathcal {H}_n = p(n)-p(n-1)-p(n-2)+p(n-3). \end{aligned}$$

Proof

Observe that \(\dim \varLambda _n^*\) equals the number of partitions of n in parts of size at least 2. Hence, \(\dim \varLambda _n^*=p(n)-p(n-1)\) and the Corollary follows from Proposition 5. \(\square \)

Proof of Theorem 1

If \(\langle f \rangle _q\) is modular, then \(\langle \Delta f \rangle _q=\mathfrak {d}\langle f \rangle _q =0\). Write \(f=\sum _{r=0}^{n'} Q_2^rh_{r}\) as in Theorem 2 with \(n'=\lfloor \tfrac{n}{2}\rfloor \). Then by Lemma 1 it follows that \(\mathrm {pr}\Delta f = \sum _{r=0}^{n'} r(n-r-\frac{3}{2})Q_2^{r-1}h_r.\) Hence,

$$\begin{aligned} \sum _{r=1}^{n'} r(n-r\tfrac{3}{2})\hat{D}^{r-1}\langle h_r\rangle _q=0. \end{aligned}$$
(7)

As \(\langle h_r\rangle _q\) is modular, either it is equal to 0 or it has depth 0. Suppose the maximum m of all \(r\ge 1\) such that \(\langle h_r\rangle _q\) is non-zero exists. Then, by Lemma 2 it follows that the left-hand side of (7) has depth \(m-1\), in particular is not equal to 0. So, \(h_1,\ldots , h_{n'}\in \ker \langle \cdot \rangle _q\). Note that \(f\in \ker \langle \cdot \rangle _q\) implies that \(Q_2f\in \ker \langle \cdot \rangle _q\). Therefore, \(k:=\sum _{r=1}^{n'} Q_2^rh_{r} \in \ker \langle \cdot \rangle _q\) and \(f=h+k\) with \(h=h_0\) harmonic.

The converse follows directly as \(\mathfrak {d}\langle h+k\rangle _q = \mathfrak {d}\langle h \rangle _q=\langle \Delta h \rangle _q = 0.\)\(\square \)

Remark 2

A description of the kernel of \(\langle \cdot \rangle _q\) is not known.

Another corollary of Proposition 5 is the notion of depth of shifted symmetric polynomials which corresponds to the depth of quasimodular forms:

Definition 3

The space \(\varLambda _k^{*(\le p)}\) of shifted symmetric polynomials of depth \(\le p\) is the space of \(f\in \varLambda _k^*\) such that one can write

$$\begin{aligned} f = \sum _{r=0}^{p} Q_2^rh_{r}, \end{aligned}$$

with \(h_r\in \mathcal {H}_{k-2r}\).

Theorem 4

If \(f\in \varLambda _k^{*(\le p)}\), then \(\langle f \rangle _q \in \widetilde{M}_k^{(\le p)}\).

Proof

Expanding f as in Definition 3 we find

$$\begin{aligned} \langle f \rangle _q = \sum _{k=0}^{p} \langle Q_2^kh_{k} \rangle _q = \sum _{k=0}^{p} \hat{D}^k\langle h_{k}\rangle _q. \end{aligned}$$

By Lemma 2, we find that the depth of \(\langle f\rangle _q\) is at most p. \(\square \)

Next, we set up notation to determine the basis of \(\mathcal {H}\) given by Theorem 3. Let \(\tilde{\mathcal {R}}=\mathcal {R}[Q_2^{-1/2}]\) and \(\tilde{\varLambda }=\varLambda ^*[Q_2^{-1/2}]\) be the formal polynomial algebras graded by assigning to \(Q_k\) weight k (note that the weights are—possibly negative—integers). Extend \(\Delta \) to \(\tilde{\varLambda }\) and observe that \(\Delta (\tilde{\varLambda })\subset \tilde{\varLambda }\). Also extend \(\mathcal {H}\) by setting

$$\begin{aligned} \tilde{\mathcal {H}}=\{f \in \tilde{\varLambda }\mid \Delta f\in Q_1\tilde{\mathcal {R}}\}=\ker \mathrm {pr}\Delta |_{\tilde{\varLambda }}. \end{aligned}$$

Definition 4

Define the partition-Kelvin transform\(K:\tilde{\varLambda }_n\rightarrow \tilde{\varLambda }_{3-n}\) by

$$\begin{aligned} K(f)=Q_2^{3/2-n}f. \end{aligned}$$

Note that \(K\) is an involution. Moreover, f is harmonic if and only if K(f) is harmonic, which follows directly from the computation

$$\begin{aligned} \Delta K(f)=Q_2^{3/2-n}\Delta f-(\tfrac{3}{2}-n)Q_1Q_2^{\tfrac{1}{2}-n}\varvec{\partial }{f}-\tfrac{1}{2}(\tfrac{3}{2}-n)(\tfrac{1}{2}-n)Q_1^2Q_2^{-\tfrac{1}{2}-n}f. \end{aligned}$$

Example 1

As \(K(1)=Q_2^{3/2}\), it follows that \(Q_2^{3/2}\in \tilde{\mathcal {H}}\).

Definition 5

Given \(\underline{i}\in \mathbb {Z}_{\ge 0}^n\), let

$$\begin{aligned} |\underline{i}|=i_1+i_2+\ldots + i_n, \quad \quad \partial _{\underline{i}} = \frac{\partial ^n}{\partial Q_{i_1+1} \partial Q_{i_2+1}\cdots \partial Q_{i_n+1}}. \end{aligned}$$

Define the nth order differential operators \(\mathscr {D}_n\) on \(\tilde{\mathcal {R}}\) by

$$\begin{aligned} \mathscr {D}_n = \sum _{\underline{i}\in \mathbb {Z}_{\ge 0}^n} \left( {\begin{array}{c}|\underline{i}|\\ i_1,i_2,\ldots ,i_n\end{array}}\right) Q_{|\underline{i}|}\partial _{\underline{i}}, \end{aligned}$$

where the coefficient is a multinomial coefficient.

This definition generalises the operators \(\varvec{\partial }\) and \(\mathscr {D}\) to higher weights: \(\mathscr {D}_1=\varvec{\partial }\), \(\mathscr {D}_2=\mathscr {D}\), and \(\mathscr {D}_n\) reduces the weight by n.

Lemma 3

The operators \(\{\mathscr {D}_n\}_{n\in \mathbb {N}}\) commute pairwise.

Proof

Set \(I=|\underline{i}|\) and \(J=|\underline{j}|\). Let \(\underline{a}^{\hat{k}}=(a_1,\ldots ,a_{k-1},a_{k+1},\ldots , a_n)\). Then

$$\begin{aligned} \begin{aligned}&\left[ \left( {\begin{array}{c}I\\ i_1,i_2,\ldots ,i_n\end{array}}\right) Q_{I}\partial _{\underline{i}}, \left( {\begin{array}{c}J\\ j_1,j_2,\ldots ,j_m\end{array}}\right) Q_{J}\partial _{\underline{j}} \right] \\&\quad = \sum _{k=1}^n \delta _{i_k,J-1}J \left( {\begin{array}{c}I\\ i_1,i_2,\ldots ,\hat{i_k},\ldots ,i_n,j_1,j_2,\ldots ,j_m\end{array}}\right) Q_I \partial _{\underline{i}^{\hat{k}}}\partial _{\underline{j}} +\\ {}&\qquad -\sum _{l=1}^m \delta _{j_l,I-1} I \left( {\begin{array}{c}J\\ i_1,i_2,\ldots ,i_n,j_1,j_2,\ldots ,\hat{j_l},\ldots ,j_m\end{array}}\right) Q_J \partial _{\underline{i}}\partial _{\underline{j}^{\hat{l}}}. \end{aligned} \end{aligned}$$
(8)

Hence, \([\mathscr {D}_n,\mathscr {D}_m]\) is a linear combination of terms of the form \(Q_{|\underline{a}|+1} \partial _{\underline{a}},\) where \( \underline{a}\in \mathbb {Z}_{\ge 0}^{n+m-1}\). We collect all terms for different vectors \(\underline{a}\) which consists of the same parts (i.e. we group all vectors \(\underline{a}\) which correspond to the same partition). Then, the coefficient of such a term equals

$$\begin{aligned}&\sum _{k=1}^n \sum _{\sigma \in S_{m+n-1}} (a_{\sigma (1)}+\ldots + a_{\sigma (m)})\left( {\begin{array}{c}|\underline{a}|+1\\ a_1,a_2,\ldots , a_{n+m-1}\end{array}}\right) \\&\quad - \sum _{l=1}^m \sum _{\sigma \in S_{m+n-1}} (a_{\sigma (1)}+\ldots + a_{\sigma (n)})\left( {\begin{array}{c}|\underline{a}|+1\\ a_1,a_2,\ldots , a_{n+m-1}\end{array}}\right) \\&\quad = (mn-mn) \sum _{\sigma \in S_{m+n-1}} a_{\sigma (1)}\left( {\begin{array}{c}|\underline{a}|+1\\ a_1,a_2,\ldots , a_{n+m-1}\end{array}}\right) =0. \end{aligned}$$

Hence, \([\mathscr {D}_n,\mathscr {D}_m]=0\). \(\square \)

It does not hold true that \([\mathscr {D}_n,Q_1]=0\) for all \(n\in \mathbb {N}\). Therefore, we introduce the following operators:

Definition 6

Let

$$\begin{aligned} \Delta _n=\sum _{i=0}^n (-1)^i \left( {\begin{array}{c}n\\ i\end{array}}\right) \mathscr {D}_{n-i} \varvec{\partial }^i . \end{aligned}$$

For \(\lambda \in \mathscr {P}\) let

$$\begin{aligned} \Delta _\lambda = \left( {\begin{array}{c}|\lambda |\\ \lambda _1,\ldots ,\lambda _{\ell (\lambda )}\end{array}}\right) \prod _{i=1}^\infty \Delta _{\lambda _i}. \end{aligned}$$

(Note that \(\Delta _0=\mathscr {D}_0=1\), so this is in fact a finite product.)

Remark 3

By Möbius inversion

$$\begin{aligned} \mathscr {D}_n=\sum _{i=0}^n \left( {\begin{array}{c}n\\ i\end{array}}\right) \Delta _{n-i}\varvec{\partial }^i. \end{aligned}$$

The first three operators are given by

$$\begin{aligned} \Delta _0=1,\quad \Delta _1=0,\quad \Delta _2=\mathscr {D}-\varvec{\partial }^2=2\Delta . \end{aligned}$$

Proposition 6

The operators \(\Delta _\lambda \) satisfy the following properties: for all partitions \(\lambda ,\lambda '\)

  1. (a)

    the order of \(\Delta _{|\lambda |}\) is \(|\lambda |;\)

  2. (b)

    \([\Delta _\lambda ,\Delta _{\lambda '}]=0;\)

  3. (c)

    \([\Delta _\lambda ,Q_1]=0\).

Proof

Property (a) follows by construction and (b) is a direct consequence of Lemma 3. For property (c), let \(f\in \tilde{\varLambda }\) be given. Then

$$\begin{aligned} \Delta _n(Q_1 f)&=\sum _{i=0}^n (-1)^i \left( {\begin{array}{c}n\\ i\end{array}}\right) \mathscr {D}_{n-i} \varvec{\partial }^i(Q_1 f) \\&=\sum _{i=0}^n (-1)^i \left( {\begin{array}{c}n\\ i\end{array}}\right) \left( (n-i)\mathscr {D}_{n-i-1}\varvec{\partial }^{i} f + Q_1\mathscr {D}_{n-i}\varvec{\partial }^{i} f + i \mathscr {D}_{n-i}\varvec{\partial }^{i-1} f\right) \\&= Q_1 \Delta _n(f)+\sum _{i=0}^n (-1)^i \left( {\begin{array}{c}n\\ i\end{array}}\right) \left( (n-i)\mathscr {D}_{n-i-1}\varvec{\partial }^{i} f + i\mathscr {D}_{n-i}\varvec{\partial }^{i-1} f\right) . \end{aligned}$$

Observe that by the identity

$$\begin{aligned} (n-i)\left( {\begin{array}{c}n\\ i\end{array}}\right) =(i+1)\left( {\begin{array}{c}n\i +1\end{array}}\right) , \end{aligned}$$

the sum in the last line is a telescoping sum, equal to zero. Hence \(\Delta _n(Q_1f)=Q_1\Delta _n(f)\) as desired. \(\square \)

In particular, the above proposition yields \([\Delta _\lambda , \Delta ]=0\) and \([\Delta _\lambda ,\mathrm {pr}]=0\).

Denote by \((x)_{n}\) the falling factorial power\((x)_n = \prod _{i=0}^{n-1} (x-i)\) and for \(\lambda \in \mathscr {P}_n\) define \(Q_\lambda =\prod _{i=1}^\infty Q_{\lambda _i}.\) Let

$$\begin{aligned} h_\lambda =\mathrm {pr}K\Delta _\lambda K(1). \end{aligned}$$

Observe that \(h_\lambda \) is harmonic, as \(\mathrm {pr}\Delta \) commutes with \(\mathrm {pr}\) and \(\Delta _\lambda \).

Proposition 7

For all \(\lambda \in \mathscr {P}_n\) there exists an \(f\in \varLambda ^*_{n-2}\) such that

$$\begin{aligned} h_\lambda = (\tfrac{3}{2})_n n! Q_\lambda + Q_2 f. \end{aligned}$$

Proof

Note that the left-hand side is an element of \(\varLambda ^*\) of which the monomials divisible by \(Q_2^i\) correspond precisely to terms in \(\Delta _\lambda \) involving precisely \(n-i\) derivatives of \(K(1)\) to \(Q_2\). Hence, as \(\Delta _\lambda \) has order n all terms not divisible by \(Q_2\) correspond to terms in \(\Delta _\lambda \) which equal \(\frac{\partial ^{n} }{\partial Q_2^{n}}\) up to a coefficient. There is only one such term in \(\Delta _{\lambda }\) with coefficient \(\left( {\begin{array}{c}|\lambda |\\ \lambda _1,\ldots ,\lambda _r\end{array}}\right) \lambda _1!\ldots \lambda _r!Q_{\lambda }\). \(\square \)

For \(f\in \mathcal {R}\), we let \(f^\vee \) be the operator where every occurrence of \(Q_i\) in f is replaced by \(\Delta _i\). We get the following unusual identity:

Corollary 2

If \(h\in \mathcal {H}_n\), then

$$\begin{aligned} h=\frac{\mathrm {pr}Kh^\vee K(1)}{n!(\tfrac{3}{2})_n}. \end{aligned}$$
(9)

Proof

By Proposition 7, we know that the statement holds true up to adding \(Q_2 f\) on the right-hand side for some \(f\in \varLambda ^*_{n-2}\). However, as both sides of (9) are harmonic and the shifted symmetric polynomial \(Q_2f\) is harmonic precisely if \(f=0\) by Proposition 4, it follows that \(f=0\) and (9) holds true. \(\square \)

Proof of Theorem 3

Let \(\mathcal {B}_n=\{h_\lambda \mid \lambda \in \mathscr {P}_n \text { all parts are } \ge 3\}\). First of all, observe that by Corollary 1 the number of elements in \(\mathcal {B}_n\) is precisely the dimension of \(\mathcal {H}_n\). Moreover, the weight of an element in \(\mathcal {B}_n\) equals \(|\lambda |=n\). By Proposition 7 it follows that the elements of \(\mathcal {B}_n\) are linearly independent harmonic shifted symmetric polynomials. \(\square \)