A quadratic-residue dichotomy for two partition functions modulo 3
Let $f_{0,1,4}(n)$ denote the number of partitions of $n$ into parts congruent to 0, 1 or 4 modulo 5 with each part used at most twice, and let $f_{0,2,3}(n)$ be defined analogously for parts congruent to 0, 2 or 3 modulo 5. We prove that for every prime $p \equiv 3 \pmod 4$ there are explicit non-negative integers $a(p)$ and $b(p)$, determined by $20a(p) \equiv -9$ and $20b(p) \equiv -1 \pmod{p^2}$, such that $f_{0,1,4}(p^2m + a(p))$ and $f_{0,2,3}(p^2m + b(p))$ are congruent modulo 3 to $f_{0,1,4}(m)$ and $f_{0,2,3}(m)$ when $p \equiv \pm 1 \pmod 5$, and to $f_{0,2,3}(m)$ and $f_{0,1,4}(m)$ when $p \equiv \pm 2 \pmod 5$. By quadratic reciprocity the two functions are preserved exactly when 5 is a quadratic residue modulo $p$, and interchanged otherwise. The smallest cases are $f_{0,1,4}(9m) \equiv f_{0,2,3}(m)$ and $f_{0,2,3}(9m+4) \equiv f_{0,1,4}(m)$. The proof reduces each generating function modulo 3 to the square of a Rogers-Ramanujan-type theta function by means of $(1-x)^{\ell} \equiv 1-x^{\ell} \pmod{\ell}$ and the Jacobi triple product, and then dissects the resulting binary quadratic form using the fact that $-1$ is a quadratic non-residue modulo $p$. As corollaries we obtain, for each such $p$, a congruence with exceptions on a progression of modulus $p$, and an infinite family of self-similarity congruences on progressions of modulus $p^{dn}$ with $d = 2$ or $d = 4$ and constants $9(p^{dn}-1)/20$ and $(p^{dn}-1)/20$.