Abstract
Motivated by work of Ramanujan, Freeman Dyson defined the rank of an integer partition to be its largest part minus its number of parts. If $N(m,n)$ denotes the number of partitions of $n$ with rank $m$, then it turns out that \[ R(w;q):=1+\!\sum_{n=1}^{\infty}\sum_{m=-\infty}^{\infty} \!\!\! N(m,n)w^mq^n \! =\! 1+\!\sum_{n=1}^{\infty}\!\frac{q^{n^2}} {\prod_{j=1}^{n}(1\!-\!(w\!+\!w^{-1})q^j\!+ q^{2j})}. \] We show that if $\zeta\neq 1$ is a root of unity, then $R(\zeta;q)$ is essentially the holomorphic part of a weight $1/2$ weak Maass form on a subgroup of $\operatorname{SL}_2(\mathbb Z)$. For integers $0\leq r\lt t$, we use this result to determine the modularity of the generating function for $N(r,t;n)$, the number of partitions of $n$ whose rank is congruent to $r\pmod t$. We extend the modularity above to construct an infinite family of vector valued weight $1/2$ forms for the full modular group $\operatorname{SL}_2(\mathbb Z)$, a result which is of independent interest.