1 Introduction

A partition of n is a non-increasing sequence of positive integers: \((\lambda _1,\lambda _2, \lambda _3, \ldots , \lambda _s)\) such that \(\sum \nolimits _{i = 1}^{s}\lambda _i = n\). The summands \(\lambda _i\)’s are called parts and the length of a partition is the total number of parts (counting multiplicity). Instead of the ‘vector notation’ , we sometimes use the multiplicity notation \((\mu _1^{m_1},\mu _2^{m_2}, \mu _3^{m_3}, \ldots , \mu _\ell ^{m_\ell })\) in which \(m_i \) denotes the multiplicity of the part \(\mu _i\) and \(\mu _1> \mu _2> \cdots > \mu _{\ell }\). If \(m_i = 1\) for all i, we have a partition into distinct parts.

The union of two partitions \(\lambda \) and \(\beta \), denoted by \(\lambda \cup \beta \), is simply the multiset union where \(\lambda \) and \(\beta \) are treated as multisets. For instance, if \(\lambda = (9^3, 7^2, 1^3)\) and \(\beta = (7^4, 5^3, 4, 1^3)\), then \(\lambda \cup \beta = (9^3, 7^6, 5^3, 4, 1^6)\).

For a partition \(\lambda = (\mu _1^{m_1},\mu _2^{m_2}, \mu _3^{m_3}, \ldots , \mu _\ell ^{m_\ell })\), the conjugate of \(\lambda \) is denoted by \(\lambda ^{\prime }\) and it is given by

$$\begin{aligned} \lambda ^{\prime } = \left( \left( \sum \limits _{i = 1}^{r} m_i \right) ^{\mu _{\ell }}, \left( \sum \limits _{i = 1}^{\ell -1} m_i \right) ^{\mu _{\ell - 1} - \mu _{\ell }}, \ldots , m_{1}^{\mu _{1} - \mu _{2}}\right) .\end{aligned}$$

We shall use upper case letters for sets and lower case for counting functions. If A(n) denotes the set of partitions of n with a certain property, then a(n) denotes the cardinality of A(n), i.e., \(a(n) = |A(n)|\). An element of A(n) shall be referred to as an a(n)-partition.

We shall use D(n) to denote the set of partitions of n into distinct parts and so by our notation above, \(d(n) = |D(n)|\). For instance, \(d(5) = 3\) and the d(5)-partitions are (5), (4, 1) and (3, 2). Let \(d_{e}(n)\) (resp. \(d_{o}(n)\)) be the number of d(n)-partitions with even (resp. odd) length. Legendre [14] proved that

$$\begin{aligned} d_{e}(n) - d_{o}(n) = {\left\{ \begin{array}{ll} (-1)^{j}, &{} \text {if} \quad n = j(3j \pm 1)/2, j \ge 0;\\ 0,&{} \text {otherwise}. \end{array}\right. } \end{aligned}$$
(1.1)

a result that later became known as Legendre’s theorem. Note that (1.1) is also known as the pentagonal number theorem because the numbers \(j(3j\pm 1)/2, j\in \mathbb {Z}\) are the generalized pentagonal numbers. In fact, the numbers appearing in all our theorems in this paper are generalized polygonal numbers (or multiples thereof).

An interesting bijective proof of (1.1) was given by Franklin (see [5]). For related work in partition theory, see [1, 8,9,10, 15,16,17].

Fine [11] studied partitions without gaps. A partition without gaps whose parts are in the set A is one in which every part is in A and every positive integer that is less than the largest part appears as a part. For instance, for \(A = \{1 + 2j: j = 0, 1,2, 3, \ldots \}\), we can talk about partitions into odd parts without gaps. We shall also use the terminology gap-free partitions to mean partitions without gaps. If the set A is not explicitly stated, we assume that \(A = \{1,2,3,4,5, \ldots \}\).

Motivated by Fine’s work on partitions into odd parts without gaps and an observation that partitions without gaps are in one-to-one correspondence with partitions into distinct parts, George Andrews [3] introduced partitions with initial repetitions. His definition is given as follows:

Definition 1.1

A partition of n with initial k-repetitions is one in which either

  1. (a)

    every part appears at most \(k - 1\) times or

  2. (b)

    there is some part j which appears at least k times and every positive integer less than j appears at least k times as a part.

For example, the partition \( (10^2, 7, 4^{3}, 3^{3},2^{5}, 1^{4})\) is a partition with initial 3-repetitions.

Among several results, in the same paper [3], Andrews was able to show that if \(f_{e}(m,n)\) (rep. \(f_{o}(m,n)\)) denotes the number of partitions of n with initial 2-repetitions with m different parts and an even (resp. odd) number of distinct parts, then

$$\begin{aligned} f_{e}(m,n) - f_{o}(m,n) = {\left\{ \begin{array}{ll} (-1)^{j}, &{} \text {if} \quad m = j, n = j(j + 1)/2, j \ge 0;\\ 0,&{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Statements of the type (1.1) are called Legendre theorems or identities of Euler pentagonal type.

In this paper, we find Legendre theorems associated with partitions with initial repetitions. Our first consideration is Andrews’ partitions with initial 2-repetitions. We look at subsets of these partitions in Sect. 2 and derive an interesting identity. In Sect. 3, we find several Legendre theorems. Consequently, these theorems provide partition-theoretic interpretations of the following identities of Rogers–Ramanujan type due to Slater [18]:

$$\begin{aligned}{} & {} \prod \limits _{n = 1}^{\infty } (1-q^{n}) \sum \limits _{n = 0}^{\infty } \frac{q^{n(n+1)}}{(q^{2};q^{2})_{n}} = \prod \limits _{n = 1}^{\infty }( 1 - q^{4n})(1 - q^{4n-1})(1 - q^{4n - 3}) \end{aligned}$$
(1.2)
$$\begin{aligned}{} & {} \prod \limits _{n = 1}^{\infty } (1-q^{2n}) \sum \limits _{n = 0}^{\infty } \frac{q^{n(2n+1)}}{(q;q)_{2n+1}} = \prod \limits _{n = 1}^{\infty }( 1 - q^{4n})(1 + q^{4n-1})(1 + q^{4n - 3}) \end{aligned}$$
(1.3)
$$\begin{aligned}{} & {} \prod \limits _{n = 1}^{\infty } (1-q^{n}) \sum \limits _{n = 0}^{\infty } \frac{q^{n(n+1)}}{(q;q)_{n}} = \prod \limits _{n = 1}^{\infty }( 1 - q^{5n})(1 - q^{5n-1})(1 - q^{5n - 4}) \end{aligned}$$
(1.4)
$$\begin{aligned}{} & {} \prod \limits _{n = 1}^{\infty } (1-q^{2n}) \sum \limits _{n = 0}^{\infty } \frac{q^{2n(n+1)}}{(q;q)_{2n+1}} = \prod \limits _{n = 1}^{\infty }( 1 - q^{8n})(1 + q^{8n-1})(1 + q^{8n - 7}) \end{aligned}$$
(1.5)
$$\begin{aligned}{} & {} \prod \limits _{n = 1}^{\infty } (1-q^{4n}) \sum \limits _{n = 0}^{\infty } \frac{q^{4n^{2}}(q;q^{2})_{2n}}{(q^{4};q^{4})_{2n}} \nonumber \\{} & {} \quad = \prod \limits _{n = 1}^{\infty }( 1 - q^{12n})(1 - q^{12n-5})(1 - q^{12n-7}) \end{aligned}$$
(1.6)
$$\begin{aligned}{} & {} \prod \limits _{n = 1}^{\infty } (1-q^{4n}) \sum \limits _{n = 0}^{\infty } \frac{q^{4n(n+1)}(q;q^{2})_{2n+1}}{(q^{4};q^{4})_{2n+1}} \nonumber \\{} & {} \quad = \prod \limits _{n = 1}^{\infty }( 1 - q^{12n})(1 - q^{12n-1})(1 - q^{12n-11}) \end{aligned}$$
(1.7)
$$\begin{aligned}{} & {} \prod \limits _{n = 1}^{\infty } (1-q^{4n}) \sum \limits _{n = 0}^{\infty } \frac{q^{4n(n+1)}(-q;q^{2})_{2n+1}}{(q^{4};q^{4})_{2n+1}}\nonumber \\{} & {} \quad = \prod \limits _{n = 1}^{\infty }( 1 - q^{12n})(1 + q^{12n-1})(1 + q^{12n-11}) \end{aligned}$$
(1.8)
$$\begin{aligned}{} & {} \prod \limits _{n = 1}^{\infty } \frac{(1-q^{2n})}{(1+q^{2n-1})} \sum \limits _{n = 0}^{\infty } \frac{q^{n(n+2)}(-q;q^{2})_{n+1}(-q^{2};q^{4})_{n}}{(q^{2};q^{2})_{2n+1}} \nonumber \\{} & {} \quad = \prod \limits _{n = 1}^{\infty }( 1 - q^{16n})(1 - q^{16n-4})(1 + q^{16n-12}) \end{aligned}$$
(1.9)

Throughout our discussion, we assume that \(|q|<1\) and some of the tools that we use include the following identities:

$$\begin{aligned} \sum \limits _{n = -\infty }^{\infty }z^{n}q^{n(n+1)/2} = \prod \limits _{n = 1}^{\infty }( 1 - q^{n})(1 + zq^{n})(1 + z^{-1}q^{n - 1}) \end{aligned}$$
(1.10)

where \(z \ne 0\) and

$$\begin{aligned} \sum _{n = -\infty }^{\infty }(-1)^{n}q^{n^2} = \prod _{n = 1}^{\infty }\frac{1 - q^{n}}{1 + q^{n}}. \end{aligned}$$
(1.11)

For reference, see Theorem 11 of [6] and Corollary 2.10 of [5].

2 On Andrews’ Partitions with 2-Initial Repetitions

We first record the following result.

Lemma 2.1

For \(|q|< 1\), the following factorizations hold:

$$\begin{aligned} \sum _{n = 1}^{\infty }\frac{q^{2n^{2} - n}}{(q;q)_{2n - 1}}= & {} (-q;q)_{\infty } \sum _{n = 1}^{\infty }(-1)^{n+1}q^{n^{2}}, \end{aligned}$$
(2.1)
$$\begin{aligned} \sum _{n = 0}^{\infty }\frac{q^{2n^{2} + n}}{(q;q)_{2n}}= & {} (-q;q)_{\infty } \sum _{n = 0}^{\infty }(-1)^{n}q^{n^{2}}. \end{aligned}$$
(2.2)

Proof

Since \(d(n) = d_{e}(n) - d_{o}(n) + 2d_{o}(n)\), we have

$$\begin{aligned}\sum _{n = 0}^{\infty }d(n)q^{n} = \sum _{n = 0}^{\infty }(d_{e}(n) - d_{o}(n))q^{n} + 2\sum _{n = 0}^{\infty }d_{o}(n)q^{n}. \end{aligned}$$
$$\begin{aligned} 2\sum _{n = 0}^{\infty }d_{o}(n)q^{n}&= (-q;q)_{\infty } - \sum _{n = 0}^{\infty }(d_{e}(n) - d_{o}(n))q^{n}\\&= (-q;q)_{\infty } - (q; q)_{\infty }\\&= (-q;q)_{\infty }\left( 1 - \frac{(q;q)_{\infty }}{(-q;q)_{\infty }}\right) \\&= (-q;q)_{\infty }\left( 1 - \sum _{n = -\infty }^{\infty }(-1)^{n}q^{n^{2}}\right) \,\,(\text {by}\,\,((1.11)))\\&= 2(-q;q)_{\infty }\sum _{n = 1}^{\infty }(-1)^{n+1}q^{n^{2}}. \end{aligned}$$

Thus, it is not difficult to see that

$$\begin{aligned}\sum _{n = 0}^{\infty }d_{o}(n)q^{n} = \sum _{n = 1}^{\infty }\frac{q^{n(2n - 1)}}{ (q;q)_{2n - 1}} \end{aligned}$$

from which (2.1) follows. For (2.2), we have

$$\begin{aligned} \sum _{n = 0}^{\infty }d_{e}(n)q^{n}&= \sum _{n = 0}^{\infty }d(n)q^{n} - \sum _{n = 0}^{\infty }d_{o}(n)q^{n}\\&= (-q;q)_{\infty } + (-q;q)_{\infty }\sum _{n = 1}^{\infty }(-1)^{n}q^{n^{2}}\,\,(\text {by}\,\,((2.1)))\\&= (-q;q)_{\infty }\sum _{n = 0}^{\infty }(-1)^{n}q^{n^{2}}. \end{aligned}$$

It can easily be shown that

$$\begin{aligned} \sum _{n = 0}^{\infty }d_{e}(n)q^{n} = \sum _{n = 0}^{\infty }\frac{q^{n(2n + 1)}}{(q;q)_{2n}} \end{aligned}$$

and so (2.2) follows. \(\square \)

We prove the following theorem.

Theorem 2.1

Let \(b^{e}(n)\) be the number of partitions of n with initial 2-repetitions in which either all parts are distinct or the largest repeated part is even. Similarly, let \(b^{o}(n)\) denote the number of partitions of n with initial 2-repetitions in which at least one part is repeated and the largest repeated part is odd. Then,

$$\begin{aligned}b^{e}(n) - b^{o}(n) = {\left\{ \begin{array}{ll} 1, &{} \text {if}\quad n=\frac{j(j+1)}{2}; \\ 0\, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Proof

Note that

$$\begin{aligned} \sum _{n = 0}^{\infty }b^{e}(n)q^{n}&= \prod _{j = 1}^{\infty }(1 + q^{j}) + \sum _{m = 1}^{\infty }\frac{q^{2(1 + 2 + 3 + \cdots + 2m)}}{(q;q)_{2m}} \prod _{j = 2m + 1}^{\infty }(1 + q^{j}) \\&= \sum _{m = 0}^{\infty }\frac{q^{2(1 + 2 + 3 + \cdots + 2m)}}{(q;q)_{2m}} \prod _{j = 2m + 1}^{\infty }(1 + q^{j}) \\&= \sum _{m = 0}^{\infty }\frac{q^{2m(2m + 1)}}{(q;q)_{2m}} \prod _{j = 2m + 1}^{\infty }\frac{(1 - q^{2j})}{(1 - q^{j})} \\&= \sum _{m = 0}^{\infty }\frac{q^{2m(2m + 1)}}{(q;q)_{2m} (q^{2m + 1};q)_{\infty }} \prod _{j = 2m + 1}^{\infty }(1 - q^{2j}) \\&= \frac{1}{(q;q)_{\infty }}\sum _{m = 0}^{\infty }q^{2m(2m + 1)} \frac{\prod _{j = 1}^{\infty }(1 - q^{2j})}{\prod _{j = 1}^{2m} (1 - q^{2j})}\\&= \frac{(q^{2};q^{2})_{\infty }}{(q;q)_{\infty }}\sum _{m = 0}^{\infty }\frac{q^{2m(2m + 1)}}{(q^{2};q^{2})_{2m}} \end{aligned}$$

and

$$\begin{aligned} \sum \limits _{n = 0}^{\infty }b^{o}(n)q^{n}&= \sum \limits _{m = 1}^{\infty }\frac{q^{2(1 + 2 + 3 + \cdots + 2m - 1})}{(q;q)_{2m - 1}} \prod _{j = 2m}^{\infty }(1 + q^{j}) \\&= \sum _{m = 1}^{\infty }\frac{q^{2(1 + 2 + 3 + \cdots + 2m - 1)}}{(q;q)_{2m - 1}} \prod _{j = 2m}^{\infty }\frac{1 - q^{2j}}{1 - q^{j}} \\&= \sum _{m = 1}^{\infty }\frac{q^{2m(2m -1)}}{(q;q)_{2m - 1} (q^{2m};q)_{\infty }} \prod _{j = 2m}^{\infty }(1 - q^{2j}) \\&= \frac{1}{{(q;q)_{\infty }}} \sum _{m = 1}^{\infty } q^{2m(2m -1)} \frac{ \prod _{j = 1}^{\infty }(1 - q^{2j}) }{ \prod _{j = 1}^{2m - 1}(1 - q^{2j})}\\&= \frac{(q^{2};q^{2})_{\infty }}{(q;q)_{\infty }}\sum _{m = 1}^{\infty }\frac{q^{2m(2m -1)}}{(q^{2};q^{2})_{2m - 1}}. \end{aligned}$$

Thus

$$\begin{aligned}&\sum \limits _{n = 0}^{\infty }(b^{e}(n) - b^{o}(n))q^{n}\\ {}&\quad = \frac{(q^{2};q^{2})_{\infty }}{(q;q)_{\infty }}\left( \sum _{n = 0}^{\infty }\frac{q^{2n(2n + 1)}}{(q^{2};q^{2})_{2n}} - \sum _{n = 1}^{\infty }\frac{q^{2n(2n - 1)}}{(q^{2};q^{2})_{2n - 1}}\right) \\&\quad = \frac{(q^{4};q^{4})_{\infty }}{(q;q)_{\infty }}\left( \sum _{n = 0}^{\infty }(-1)^{n}q^{2n^{2}} - \sum _{n = 1}^{\infty }(-1)^{n + 1}q^{2n^{2}} \right) \\&\qquad \left( \text {by}\,\,((2.1))\,\,\text {and}\,\, ((2.2))\,\, \text {with} q \text {replaced by} q^2\right) \\&\quad = \frac{(q^{4};q^{4})_{\infty }}{(q;q)_{\infty }}\left( \sum _{n = -\infty }^{\infty }(-1)^{n}q^{2n^{2}} \right) \\&\quad = \frac{(q^{4};q^{4})_{\infty }}{(q;q)_{\infty }} \frac{(q^{2};q^{2})_{\infty }}{(-q^{2};q^{2})_{\infty }}\,\,(\text {by}\,\, ((1.11))\,\,\text {with} q \text {replaced by} q^2)\\&\quad =\frac{(q^{4};q^{4})_{\infty } (-q;q)_{\infty } }{(-q^{2};q^{2})_{\infty }}\\&\quad = (q^{4};q^{4})_{\infty }(-q;q^{4})_{\infty }(-q^{3};q^{4})_{\infty }\\&\quad = \sum _{n = -\infty }^{\infty }q^{2n^2 + n} \,\, (\text {by}\,\, ((1.10))\,\,\text {with} q \text {replaced by} q^4 \text {and} z \text {replaced by} q^{-1})\\&\quad = \sum _{n = 0}^{\infty }q^{n(n+1)/2}. \end{aligned}$$

For the last equality, see Equation (1.4.9) of [12]. \(\square \)

3 Combinatorial Proof of Theorem 2.1

Let B(n) be the set of partitions of n with initial 2-repetitions. If \(\lambda \in B(n)\), write \(\lambda =\alpha \cup \beta \) with \(\alpha \) a distinct partition and \(\beta \) a partition whose parts have even multiplicity. Then, \(\beta \) is gap-free and \(\beta '\) (the conjugate of \(\beta \)) is a distinct partition with even parts. The goal is to prove that

$$\begin{aligned} |\{\lambda =\alpha \cup \beta \in B(n):&\ \ell (\beta ') \text { even}\}|- |\{\lambda =\alpha \cup \beta \in B(n): \ell (\beta ') \text { odd}\}|\\ {}&={\left\{ \begin{array}{ll}1, &{} \text { if } n=\frac{j(j+1)}{2}\\ 0 &{} \text { otherwise. }\end{array}\right. } \end{aligned}$$

We further write \(\alpha = (\alpha ^o, \alpha ^e)\), where \(\alpha ^o\) (respectively \(\alpha ^e\)) consists of the odd (respectively even) parts of \(\alpha \).

Since \((\alpha ^e, \beta )\) is a pair of distinct partitions with even parts, by doubling all parts in partitions in the proof of [7, Proposition 2], one proves that

$$\begin{aligned} |\{\lambda&=\alpha ^o\cup \alpha ^e\cup \beta \in B(n): \ell (\beta ') \text { even}\}|- |\{\lambda =\alpha ^o\cup \alpha ^e\cup \beta \in B(n): \ell (\beta ') \text { odd}\}|\\ {}&=|\{\lambda =\alpha ^o\cup \gamma \in C(n): \ell (\gamma ) \text { even}\}|- |\{\lambda =\alpha ^o\cup \gamma \in C(n): \ell (\gamma ) \text { odd}\}|, \end{aligned}$$

where C(n) is the set of partitions \(\mu =\alpha ^o\cup \gamma \) of n with \(\alpha ^o\) a partition into distinct odd pats and \(\gamma \) a partition into parts divisible by 4.

This shows combinatorially that

$$\begin{aligned}\sum _{n=0}^\infty (b^e(n)-b^o(n))q^n=(q^4;q^4)_\infty (-q;q^2)_\infty = (q^4;q^4)_\infty (-q;q^4)_\infty (-q^3;q^4)_\infty .\end{aligned}$$

To finish the combinatorial proof, one uses a combinatorial proof of the Jacobi triple product. For example, one can use the proof in [13]. Note that [13] gives a combinatorial proof for

$$\begin{aligned}(q^4;q^4)_\infty (q;q^4)_\infty (q^3;q^4)_\infty =\sum _{n=0}^\infty (-1)^{T_n}q^{T_n},\end{aligned}$$

where \(T_n=n(n+1)/2\), but the parity of the number of odd parts in a partition is determined by the parity of the size.

4 Related Partition Functions

In this section, we explore various partition functions for partitions with initial repetitions. We give several Legendre theorems and as a result, partition-theoretic interpretation of equations (1.2), (1.3), (1.4), (1.5), (1.6), (1.7), (1.8) and (1.9) are established.

Let \(c_{1}(n)\) denote the number of partitions of n in which either

  1. (a)

    all parts are distinct, the only odd part that may appear is 1 and even parts are at least 8 and divisible by 4 or

  2. (b)

    the largest repeated even part 2j appears exactly 4 times, all positive even integers \(< 2j\) appear exactly 4 times, even parts \( > 2j\) are at least \(8j + 8\), distinct and divisible by 4, odd parts are distinct and at most \(4j + 1\).

Let \(c_{1,e}(n)\) (resp. \(c_{1,o}(n)\)) denote the number of \(c_{1}(n)\)-partitions in which the number of distinct even parts is even ( resp. odd). Then, we have

Theorem 4.1

For all \(n\ge 0\),

$$\begin{aligned} c_{1,e}(n) - c_{1,o}(n) = {\left\{ \begin{array}{ll} 1, &{} \text {if} n = j(6j + 5), j\in \mathbb {Z};\\ 0, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Proof

Since

$$\begin{aligned} \sum \limits _{n = 0}^{\infty }c_{1}(n)q^{n} = \sum _{n = 0}^{\infty }q^{4(2 + 4 + 6 + \cdots + 2n)}(-q;q^{2})_{2n + 1}(-q^{8n+8};q^{4})_{\infty },\end{aligned}$$

we must have

$$\begin{aligned} \sum \limits _{n = 0}^{\infty }(c_{1,e}(n) - c_{1,o}(n)) q^{n}&= \sum _{n = 0}^{\infty }q^{4(2 + 4 + 6 + \cdots + 2n)}(-q;q^{2})_{2n + 1}(q^{8n+8};q^{4})_{\infty } \\&= \sum _{n = 0}^{\infty }q^{4n(n + 1)}(-q;q^{2})_{2n + 1}(q^{4(2n+2)};q^{4})_{\infty } \\&= \sum _{n = 0}^{\infty }q^{4n(n + 1)}(-q;q^{2})_{2n + 1}\frac{(q^{4};q^{4})_{\infty }}{ (q^{4};q^{4})_{2n + 1}}\\&= (q^{4};q^{4})_{\infty }\sum _{n = 0}^{\infty }(-q;q^{2})_{2n + 1} \frac{q^{4n(n + 1)}}{(q^{4};q^{4})_{2n + 1}} \\&= \prod _{n = 1}^{\infty }(1 + q^{12n - 11})(1 + q^{12n - 1})(1 - q^{12n})\,\,\,\,\,(\text {by}\,\,\,\, ((1.8))) \\&= \sum _{n = -\infty }^{\infty }q^{n(6n + 5)} \,\,\,\,\,\,(\text {by} \,\,\,\,((1.10))) .\\ \end{aligned}$$

\(\square \)

Let \(c_{2}(n)\) be the number of partitions of n in which either

  1. (a)

    even parts are distinct and 1 is the only odd part that may appear or

  2. (b)

    there exists \(j \ge 1\) such that an even part 2j appears twice, all positive integers \(<2j\) appear twice, any even part \(> 2j\) is distinct and the largest odd part is at most \(2j+1\).

Furthermore, let \(c_{2,e}(n)\) (resp. \(c_{2,o}(n)\)) be the number of \(c_{2}(n)\)-partitions with an even (resp. odd) number of distinct even parts. Then, we have the following.

Theorem 4.2

For all \(n\ge 0\),

$$\begin{aligned}c_{2,e}(n) - c_{2,o}(n)= {\left\{ \begin{array}{ll} 1, &{} n = 4j^2 + 3j, j \in \mathbb {Z}; \\ 0, &{}\text {otherwise}. \end{array}\right. } \end{aligned}$$

Since

$$\begin{aligned} \sum _{n = 0}^{\infty }c_{2}(n)q^{n}&= \frac{ (-q^{2};q^{2})_{\infty }}{1 - q} + \sum _{n = 1}^{\infty }\frac{q^{2 + 2 + 4 + 4 + 6 + 6 + \cdots + 2n + 2n} }{(1 - q)(1 - q^{3})\ldots (1 - q^{2n+1})}(-q^{2n + 2};q^{2})_{\infty }\\&= \sum _{n = 0}^{\infty }\frac{q^{2 + 2 + 4 + 4 + 6 + 6 + \cdots + 2n + 2n} }{(1 - q)(1 - q^{3})\ldots (1 - q^{2n+1})}(-q^{2n + 2};q^{2})_{\infty }, \end{aligned}$$

we have

$$\begin{aligned} \sum _{n = 0}^{\infty }(c_{2,e}(n) - c_{2,o}(n))q^{n}&= \sum _{n = 0}^{\infty } \dfrac{q^{2n(n+1)}(q^{2n+2};q^{2})_{\infty }}{(q;q^{2})_{n+1}} \\&= \sum _{n = 0}^{\infty } \dfrac{q^{2n(n+1)}(q^{2};q^{2})_{\infty }}{(q;q^{2})_{n+1}(q^{2};q^{2})_{n}} \\&= (q^{2};q^{2})_{\infty } \sum _{n = 0}^{\infty } \dfrac{q^{2n(n+1)}}{(q;q^{2})_{n+1}(q^{2};q^{2})_{n}} \\&= (q^{2};q^{2})_{\infty } \sum _{n = 0}^{\infty } \dfrac{q^{2n(n+1)}}{(q;q)_{2n+1}} \,\,\,(\text {by}\,\,\,\, ((1.5)))\\&= \prod _{n=1}^{\infty } \left( 1 + q^{8n-1}\right) \left( 1 + q^{8n-7}\right) \left( 1-q^{8n}\right) \\&= \sum _{n = -\infty }^{\infty } q^{4n^{2}+3n}. \end{aligned}$$

Example 4.1

Consider \(n=10\).

The \(c_{2}(10)\)-partitions are:

$$\begin{aligned}{} & {} (10), (8,2), (8,1^{2}), (6,4), (6,2^{2}), (6,2,1^{2}), (6,1^{4}), \\{} & {} (4,2^{2},1^{2}), (4,2,1^{4}), (4,1^{6}), (3^{2},2^{2}), (3,2^{2},1^{3}),\\{} & {} (2^{2},1^{6}), (2,1^{8}), (1^{10}) \end{aligned}$$

From the above, note that \(c_{2,e}(10)\)-partitions are:

$$\begin{aligned} (8,2), (6,4), (6,2,1^{2}), (4,2,1^4), (3^{2},2^{2}), (3,2^{2},1^{3}),(2^{2},1^{6}), (1^{10}) \end{aligned}$$

and \(c_{2,o}(10)\)-partitions are: \((10), (8,1^{2}), (6,2^2), (6,1^{4}), (4,2^2,1^2), (4,1^{6}), (2,1^{8})\). Thus,

$$\begin{aligned} c_{2,e}(10) - c_{2,o}(10) = 1. \end{aligned}$$

This agrees with the theorem because the only integer solution to \(4j^2 + 3j = 10\) is \(j = -2\)

Let \(c_{3}(n)\) denote the number of partitions of n in which the largest odd part \(2j + 1 (j\ge 0)\) occurs at least j times, even parts are distinct and greater than \(2j + 1\).

Note that \(c_{3}(n)\)-partitions are a subset of the set of partitions of n with odd parts below even parts. Partitions with parts separated by parity have received quite a bit of attention lately, see [2, 4].

Let \(c_{3,e}(n)\) (resp. \(c_{3,o}(n)\)) be the number of \(c_{3}(n)\)-partitions with an even (resp. odd) number of even parts. Then,

Theorem 4.3

For all \(n\ge 0\),

$$\begin{aligned}c_{3,e}(n) - c_{3,o}(n) = {\left\{ \begin{array}{ll} 1, &{} n = 2j^2 + j, j \in \mathbb {Z}; \\ 0, &{}\text {otherwise}. \end{array}\right. } \end{aligned}$$

Proof

We have

$$\begin{aligned} \sum _{n = 0}^{\infty }c_{3}(n)q^{n}&= \sum _{n = 0}^{\infty }\frac{q^{\overbrace{(2n + 1) + (2n + 1) + (2n+ 1) + \cdots + (2n + 1)}^{n\mathrm \, times}}}{(1 - q)(1 - q^{3})\ldots (1 - q^{2n+1})}(-q^{2n + 2};q^{2})_{\infty } \end{aligned}$$

and thus,

$$\begin{aligned}&\sum _{n = 0}^{\infty }(c_{3,e}(n) - c_{3,o}(n))q^{n}\\&\quad = \sum _{n = 0}^{\infty }\frac{q^{\overbrace{(2n + 1) + (2n + 1) + (2n+ 1) + \cdots + (2n + 1)}^{n\mathrm \, times}}}{(1 - q)(1 - q^{3})\ldots (1 - q^{2n+1})}(q^{2n + 2};q^{2})_{\infty } \\&\quad = \sum _{n = 0}^{\infty } \dfrac{q^{n(2n+1)}(q^{2n+2};q^{2})_{\infty }}{(q;q^{2})_{n+1}} \\&\quad = \sum _{n = 0}^{\infty } \dfrac{q^{n(2n+1)}(q^{2};q^{2})_{\infty }}{(q;q^{2})_{n+1}(q^{2};q^{2})_{n}} \\&\quad = (q^{2};q^{2})_{\infty } \sum _{n = 0}^{\infty } \dfrac{q^{n(2n+1)}}{(q;q)_{2n+1}} \\&\quad = \prod _{n = 1}^{\infty }(1 + q^{4n - 1})(1 + q^{4n - 3})(1 - q^{4n}) \,\,\,(\text {by}\,\,\,\, ((1.3))) \\&\quad = \sum _{n = -\infty }^{\infty } q^{2n^{2} + n}. \end{aligned}$$

\(\square \)

Let \(c_{4}(n)\) be the number of partitions of n in which either

  1. (a)

    all parts are distinct or

  2. (b)

    the largest repeated part j appears twice, all positive integers less than j appear twice. Note that parts greater than j are distinct.

Similar to the previous formulations, let \(c_{4,e}(n)\) (resp.\(c_{4,o}(n)\)) be the number of \(c_{4}(n)\)-partitions with an even (resp. odd) number of distinct parts.

Theorem 4.4

For all \(n\ge 0\),

$$\begin{aligned}c_{4,e}(n) - c_{4,o}(n)= {\left\{ \begin{array}{ll} (-1)^{j}, &{} n = (5j^2 + 3j)/2, j \in \mathbb {Z}; \\ 0, &{}\text {otherwise}. \end{array}\right. } \end{aligned}$$

Proof

Clearly,

$$\begin{aligned} \sum _{n = 0}^{\infty } c_{4}(n)q^{n} = \sum _{n = 0}^{\infty } q^{1 + 1 + 2 + 2 + 3 + 3 + \cdots + n + n}(-q^{n+1};q)_{\infty } = \sum _{n = 0}^{\infty } q^{n(n + 1)}(-q^{n+1};q)_{\infty } \end{aligned}$$

so that

$$\begin{aligned} \sum _{n = 0}^{\infty }(c_{4,e}(n) - c_{4,o}(n))q^{n}&= \sum _{n = 0}^{\infty } q^{n(n+1)}(q^{n+1};q)_{\infty } \\&= \sum _{n = 0}^{\infty } \dfrac{q^{n(n+1)}(q;q)_{\infty }}{(q;q)_{n}} \\&= \prod _{n=1}^{\infty } \left( 1-q^{5n-1}\right) \left( 1-q^{5n-4}\right) \left( 1-q^{5n}\right) \,\,\,(\text {by}\,\,\,\, ((1.4))) \\&= \sum _{n = -\infty }^{\infty } (-1)^{n} q^{\frac{5n^{2}+3n}{2}}. \end{aligned}$$

\(\square \)

Example 4.2

Consider \(n=7\).

The \(c_{4}(7)\)-partitions are:

$$\begin{aligned} (7), (6,1), (5,2), (5,1^{2}), (4,3), (4,2,1), (3,2,1^{2}).\end{aligned}$$

\(c_{4,e}(7)\)-partitions are:

$$\begin{aligned} (6,1), (5,2), (4,3), (3,2,1^{2})\end{aligned}$$

and the \(c_{4,o}(7)\)-partitions are:

$$\begin{aligned}(7), (5,1^{2}), (4,2,1).\end{aligned}$$

Thus, \(c_{4,e}(7) - c_{4,o}(7) = 1\). Indeed, this verifies the theorem as \(7 = [5(-2)^2 + 3(-2)]/2\). Note that \(j = -2\) is the only integer solution to the equation \(7 = (5j^2 + 3j)/2\).

Let \(c_{5}(n)\) be the number of partitions of n in which either

  1. (a)

    all parts are distinct or

  2. (b)

    there exists \(j \ge 1\) such that all odd positive integers \(\le j\) appear twice or thrice and other odd parts are distinct, all even positive integers \(\le j\) appear twice, even parts \(>2j\) are distinct and no even integer in the interval (j, 2j] appears.

Let \(c_{5,e}(n)\) (resp. \(c_{5,o}(n)\)) denote the number of \(c_{5}(n)\)-partitions with an even (resp. odd) number of distinct even parts. Then,

$$\begin{aligned} \sum _{n = 0}^{\infty } c_{5}(n)q^{n}&= \sum _{n = 0}^{\infty } q^{1 + 1 + 2 + 2 + \cdots n + n}(-q^{2n+2};q^{2})_{\infty }(-q;q^{2})_{\infty } \\&= \sum _{n = 0}^{\infty } q^{n(n+1)}(-q^{2n+2};q^{2})_{\infty }(-q;q^{2})_{\infty } \end{aligned}$$

and

$$\begin{aligned} \sum _{n = 0}^{\infty }(c_{5,e}(n) - c_{5,o}(n)) q^{n} = \sum _{n = 0}^{\infty } q^{n(n+1)}(q^{2n+2};q^{2})_{\infty }(-q;q^{2})_{\infty }. \end{aligned}$$

Observe that

$$\begin{aligned} \sum _{n = 0}^{\infty }(c_{5,e}(n) - c_{5,o}(n)) (-q)^{n}&= \sum _{n = 0}^{\infty } (-q)^{n(n+1)}((-q)^{2n+2};q^{2})_{\infty }(-(-q);(-q)^{2})_{\infty }\\&= (q;q^{2})_{\infty } \sum _{n = 0}^{\infty } q^{n(n+1)}(q^{2n+2};q^{2})_{\infty } \\&= (q;q^{2})_{\infty } \sum _{n = 0}^{\infty } \dfrac{q^{n(n+1)}(q^{2};q^{2})_{\infty }}{(q^{2};q^{2})_{n}} \\&= (q;q)_{\infty } \sum _{n = 0}^{\infty } \dfrac{q^{n(n+1)}}{(q^{2};q^{2})_{n}} \\&= \prod _{n=1}^{\infty } \left( 1-q^{4n-1}\right) \left( 1-q^{4n-3}\right) \left( 1-q^{4n}\right) \,\,\,(\text {by}\,\,\,\, ((1.2))) \\&= \sum _{n = -\infty }^{\infty }(-1)^{n} q^{2n^{2}+n}. \end{aligned}$$

We have the following result.

Theorem 4.5

For all \(n\ge 0\),

$$\begin{aligned} c_{5,e}(n) - c_{5,o}(n) = {\left\{ \begin{array}{ll} 1, &{} n = 2j^{2}+ j, j \in \mathbb {Z};\\ 0, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Let \(c_{6}(n)\) be the number of partitions of n in which either

  1. (a)

    all parts are even, distinct and divisible by 4 or

  2. (b)

    the largest repeated part is \(2j - 1\) (for some \(j \ge 1\)) and appears exactly 4 times or 5 times, all positive odd integers \(< 2j - 1\) appear 4 times or 5 times, any other odd part is distinct and is at most \(4j - 1\) in part size, even parts are \(\ge 8j + 4\), distinct and divisible by 4.

Let \(c_{6,e}(n)\) (resp. \(c_{6,o}(n)\)) denote the number of \(c_{6}(n)\)-partitions with an even (resp. odd) number of distinct even parts. Then,

$$\begin{aligned} \sum _{n = 0}^{\infty } c_{6}(n)q^{n} = \sum _{n = 0}^{\infty } q^{4(1 + 3 + 5 + \cdots + 2n - 1)}(-q^{8n+4};q^{4})_{\infty }(-q;q^{2})_{2n}\end{aligned}$$

so that

$$\begin{aligned} \sum _{n = 0}^{\infty } (c_{6,e}(n) - c_{6,o}(n))q^{n} = \sum _{n = 0}^{\infty } q^{4n^{2}}(q^{8n+4};q^{4})_{\infty }(-q;q^{2})_{2n}\end{aligned}$$

which implies

$$\begin{aligned}&\sum _{n = 0}^{\infty }(-1)^{n} (c_{6,e}(n) - c_{6,o}(n))q^{n}\\ {}&\quad = \sum _{n = 0}^{\infty } q^{4n^{2}}(q^{8n+4};q^{4})_{\infty }(q;q^{2})_{2n} \\&\quad = \sum _{n = 0}^{\infty } \dfrac{q^{4n^{2}}(q^{4};q^{4})_{\infty }(q;q^{2})_{2n}}{(q^{4};q^{4})_{2n}} \\&\quad = (q^{4};q^{4})_{\infty } \sum _{n = 0}^{\infty } \dfrac{q^{4n^{2}}(q;q^{2})_{2n}}{(q^{4};q^{4})_{2n}} \\&\quad = \prod _{n=1}^{\infty } \left( 1-q^{12n-5}\right) \left( 1-q^{12n-7}\right) \left( 1-q^{12n}\right) \,\,\,(\text {by}\,\,\,\, ((1.6))) \\&\quad = \sum _{n = -\infty }^{\infty } (-1)^{n}q^{6n^{2}+n}. \end{aligned}$$

Hence, we have

Theorem 4.6

For all \(n\ge 0\),

$$\begin{aligned} c_{6,e}(n) - c_{6,o}(n) = {\left\{ \begin{array}{ll} 1, &{} n = 6j^{2}+ j, j \in \mathbb {Z};\\ 0, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Let \(c_{7}(n)\) denote the number of partitions of n in which either

  1. (a)

    the smallest odd part, if it appears, is at least 3 and even parts are distinct and at least 4 or

  2. (b)

    there exists \(j \ge 1\) such that j appears three or four times if \(j \equiv 2 \pmod {4}\) and appears exactly three times if \(j \not \equiv 2 \pmod {4}\), all positive integers \(i < j\) appear exactly twice or thrice if \(i \equiv 2 \pmod {4}\) and appear exactly twice if \(i \not \equiv 2 \pmod {4}\), an even part greater than j but less than 4j is distinct and congruent to \( 2 \pmod {4}\), any other even part is \(\ge 4j + 4\) and distinct, odd parts \(> j\) are at least \(2j + 3\).

Let \(c_{7,e}(n)\) (resp. \(c_{7,o}(n)\)) be the number of \(c_{7}(n)\)-partitions in which the number of distinct even parts if (a) holds is even (resp. odd) or the number of distinct even parts that are \(\ge 4j+4\) (where j is the largest repeated part with the property that every integer less than j is repeated) is even (resp. odd) if (b) holds. Clearly,

$$\begin{aligned} \sum _{n = 0}^{\infty } c_{7}(n)q^{n}&= \frac{(-q^{4};q^{2})_{\infty }}{(q^{3};q^{2})_\infty }\\ {}&\quad + \sum _{n = 1}^{\infty } \dfrac{q^{1 + 1 + 2 + 2 + \cdots + n - 1 + n - 1 + n + n + n}(-q^{2};q^{4})_{n}(-q^{4n+4};q^{2})_{\infty }}{(q^{2n+3};q^{2})_{\infty }} \\&= \sum _{n = 0}^{\infty } \dfrac{q^{n(n+2)}(-q^{2};q^{4})_{n}(-q^{4n+4};q^{2})_{\infty }}{(q^{2n+3};q^{2})_{\infty }} \end{aligned}$$

and thus

$$\begin{aligned} \sum _{n = 0}^{\infty }( c_{7,e}(n) - c_{7,o}(n) )q^{n}&= \sum _{n = 0}^{\infty } \dfrac{q^{n(n+2)}(-q^{2};q^{4})_{n}(q^{4n+4};q^{2})_{\infty }}{(q^{2n+3};q^{2})_{\infty }}\\&= \sum _{n = 0}^{\infty } \dfrac{q^{n(n+2)}(-q^{2};q^{4})_{n}(q;q^{2})_{n+1}(q^{2};q^{2})_{\infty }}{(q;q^{2})_{\infty }(q^{2};q^{2})_{2n+1}} \\&= \dfrac{(q^{2};q^{2})_{\infty }}{(q;q^{2})_{\infty }} \sum _{n = 0}^{\infty } \dfrac{q^{n(n+2)}(-q^{2};q^{4})_{n}(q;q^{2})_{n+1}}{(q^{2};q^{2})_{2n+1}} \\&= \prod _{n=1}^{\infty } \left( 1-q^{16n-4}\right) \left( 1-q^{16n-12}\right) \left( 1-q^{16n}\right) \,\,\,(\text {by}\,\,\,\, ((1.9))) \\&= \sum _{n = -\infty }^{\infty } (-1)^{n}q^{8n^{2}+4n}. \end{aligned}$$

This leads to the theorem below.

Theorem 4.7

For all \(n\ge 0\),

$$\begin{aligned}c_{7,e}(n) - c_{7,o}(n) = {\left\{ \begin{array}{ll} (-1)^{j}, &{} n = 8j^2 + 4j, j \in \mathbb {Z}; \\ 0, &{}\text {otherwise}. \end{array}\right. } \end{aligned}$$

From the theorem, it can be observed that, if \(n\ne 8j^2 + 4j\) for all j, then \(c_{7,e}(n) - c_{7,o}(n) = 0\) so that

$$\begin{aligned} c_{7}(n) \equiv c_{7,e}(n) - c_{7,o}(n) \equiv 0 \pmod {2}. \end{aligned}$$

We record this result below.

Corollary 4.1

If n is not four times a triangular number, then \(c_{7}(n) \equiv 0 \pmod {2}\).

Let \(c_{8}(n)\) be the number of partitions of n in which either

  1. (a)

    even parts are distinct, greater than 6 and divisible by 4 and the only odd part that may appear is 1 and is distinct. or

  2. (b)

    the largest repeated part is 2j (for some \(j \ge 1\)) and appears exactly 4 times, all positive even integers \(< 2j\) appear four times, any even part \(> 2j\) is at least \(8j + 8\), distinct and divisible by 4, odd parts are distinct and are at most \(4j +1\) in part size.

Let \(c_{8,e}(n)\) (resp. \(c_{8,o}(n)\)) denote the number of \(c_{8}(n)\)-partitions with an even (resp. odd) number of distinct even parts. Then,

$$\begin{aligned} \sum _{n = 0}^{\infty } c_{8}(n)q^{n} = \sum _{n = 0}^{\infty } q^{4(2 + 4 + 6 + \cdots + 2n)}(-q^{8n+8};q^{4})_{\infty }(-q;q^{2})_{2n + 1}\end{aligned}$$

so that

$$\begin{aligned} \sum _{n = 0}^{\infty } (c_{8,e}(n) - c_{8,o}(n))q^{n} = \sum _{n = 0}^{\infty } q^{4n(n + 1)}(q^{8n+8};q^{4})_{\infty }(-q;q^{2})_{2n + 1}\end{aligned}$$

which implies

$$\begin{aligned}&\sum _{n = 0}^{\infty } (-1)^{n}(c_{8,e}(n) - c_{8,o}(n))q^{n} \\ {}&\quad = \sum _{n = 0}^{\infty } q^{4n(n+1)}(q^{8n+8};q^{4})_{\infty }(q;q^{2})_{2n+1}\\&\quad = \sum _{n = 0}^{\infty } \dfrac{q^{4n(n+1)}(q^{4};q^{4})_{\infty }(q;q^{2})_{2n+1}}{(q^{4};q^{4})_{2n+1}} \\&\quad = (q^{4};q^{4})_{\infty } \sum _{n = 0}^{\infty } \dfrac{q^{4n(n+1)}(q;q^{2})_{2n+1}}{(q^{4};q^{4})_{2n+1}} \\&\quad = \prod _{n=1}^{\infty } \left( 1-q^{12n-1}\right) \left( 1-q^{12n-11}\right) \left( 1-q^{12n}\right) \,\,\,(\text {by}\,\,\,\, ((1.7)))\\&\quad = \sum _{n = -\infty }^{\infty } (-1)^{n}q^{6n^{2}+5n}. \end{aligned}$$

Hence, we have

Theorem 4.8

For all \(n\ge 0\),

$$\begin{aligned} c_{8,e}(n) - c_{8,o}(n) = {\left\{ \begin{array}{ll} 1, &{} n = 6j^{2}+ 5j, j \in \mathbb {Z};\\ 0, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Example 4.3

Consider \(n=39\).

The \(c_{8}(39)\)-partitions are

$$\begin{aligned} (28,3,2^{4}), (9,5,4^{4},2^{4},1), (7,5,4^{4},3,2^{4}). \end{aligned}$$

\(c_{8,e}(39)\)-partitions are

$$\begin{aligned} (9,5,4^{4},2^{4},1), (7,5,4^{4},3,2^{4}) \end{aligned}$$

and the \(c_{8,o}(39)\)-partitions are

$$\begin{aligned}(28,3,2^{4}). \end{aligned}$$

Thus, \(c_{8,e}(39) - c_{8,o}(39) = 1\). Indeed, this verifies the theorem as \(39 = 6(-3)^2 + 5(-3)\) and \(39 -3 = 36\). Note that \(j = -3\) is the only integer solution to the equation \(6j^2 + 5j = 39\).