1 Introduction

An overpartition of a positive integer n is a partition of n in which the first occurrence of a part of each size may be overlined [10]. For example, there are 8 overpartitions of 3:

$$\begin{aligned} 3,\ \bar{3},\ 2+1,\ \bar{2}+1,\ 2+\bar{1},\ \bar{2}+\bar{1},\ 1+1+1\ \text {and}\ \bar{1}+1+1. \end{aligned}$$

Let \(\overline{p}(n)\) be the number of overpartitions of n. Then the generating function of \(\overline{p}(n)\) is

$$\begin{aligned} \sum _{n=0}^{\infty } \overline{p}(n) q^n = \frac{(-q;q)_\infty }{(q;q)_\infty }. \end{aligned}$$

Here and throughout this paper, we use the following customary q-series notation:

$$\begin{aligned}&(a;q)_n = {\left\{ \begin{array}{ll} 1, &{} \text {for }n=0,\\ (1-a)(1-aq)\cdots (1-aq^{n-1}), &{}\text {for }n>0; \end{array}\right. }\\&(a;q)_\infty = \lim _{n\rightarrow \infty } (a;q)_n;\\&\begin{bmatrix} n\\k \end{bmatrix} = {\left\{ \begin{array}{ll} \dfrac{(q;q)_n}{(q;q)_k(q;q)_{n-k}}, &{} \text {if }0\le k\le n,\\ 0, &{}\text {otherwise.} \end{array}\right. } \end{aligned}$$

Andrews and Merca [2] considered Euler’s pentagonal number theorem and proved a truncated theorem on partitions. Subsequently, Guo and Zeng [12] considered the following identity of Gauss

$$\begin{aligned} 1+2\sum _{n=1}^{\infty } (-1)^n q^{n^2} = \frac{(q;q)_\infty }{(-q;q)_\infty }, \end{aligned}$$
(1.1)

and they proved a new truncated theorem on overpartitions. Namely, for \(k\ge 1\),

$$\begin{aligned}&\frac{(-q;q)_{\infty }}{(q;q)_{\infty }} \left( 1+2\sum _{j=1}^{k} (-1)^j q^{j^2} \right) \nonumber \\&\qquad = 1+(-1)^k \sum _{n=k+1}^{\infty } \frac{(-q;q)_k (-1;q)_{n-k} q^{(k+1)n}}{(q;q)_n} \begin{bmatrix} n-1\\k-1 \end{bmatrix}. \end{aligned}$$
(1.2)

As a consequence of this result, they derived the following inequality for \(\overline{p}(n)\):

$$\begin{aligned} (-1)^k \left( \overline{p}(n) + 2 \sum _{j=1}^{k} (-1)^j \overline{p}(n-j^2) \right) \ge 0, \end{aligned}$$
(1.3)

with strict inequality if \(n\ge (k+1)^2\). Very recently, Andrews and Merca [3] provided the following revision of (1.2):

$$\begin{aligned}&\frac{(-q;q)_{\infty }}{(q;q)_{\infty }} \left( 1 + 2 \sum _{j=1}^{k} (-1)^j q^{j^2} \right) \nonumber \\&\qquad = 1+2 (-1)^k \frac{(-q;q)_k}{(q;q)_k} \sum _{j=0}^{\infty } \frac{q^{(k+1)(k+j+1)}(-q^{k+j+2};q)_{\infty }}{(1-q^{k+j+1})(q^{k+j+2};q)_{\infty }}. \end{aligned}$$
(1.4)

From this identity, they immediately deduced an interpretation of the sum in the inequality (1.3) considering \(\overline{M}_k(n)\), the number of overpartitions of n in which the first part larger than k appears at least \(k+1\) times:

$$\begin{aligned} (-1)^k \left( \overline{p}(n) + 2 \sum _{j=1}^{k} (-1)^j \overline{p}(n-j^2) \right) = \overline{M}_k(n) , \end{aligned}$$
(1.5)

for \(n,k\ge 1\). Shortly after that, Ballantine et al. [4] gave a combinatorial proof of this interpretation.

Other recent investigations on the truncated theta series can be found in several papers by Chan et al. [7], Chern [9], He et al. [13], Kolitsch [15], Kolitsch and Burnette [16], Mao [18, 19], Merca [20], Wang and Yee [22,23,24], and Yee [25].

In this paper, we consider overpartitions into odd parts and shall prove similar results. Let \(\overline{p_o}(n)\) be the number of overpartitions into odd parts. Then its generating function is

$$\begin{aligned} \sum _{n=0}^{\infty } \overline{p_o}(n) q^n = \frac{(-q;q^2)_{\infty }}{(q;q^2)_{\infty }}. \end{aligned}$$
(1.6)

This expression first appeared in the following series-product identity

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

which was given by Lebesgue [17] in 1840. More recently, the generating function of \(\overline{p_o}(n)\) appeared in the works of Bessenrodt [5], Santos and Sills [21]. Various arithmetic properties of \(\overline{p_o}(n)\) have been investigated later by Chen [8], Hirschhorn and Sellers [14].

In analogy with the truncated identities in (1.2) and (1.4), we have two symmetrical results on \(\overline{p_o}(n)\).

Theorem 1.1

For a positive integer k,

$$\begin{aligned}&\frac{(-q;q^2)_\infty }{(q;q^2)_\infty } \left( 1+2\sum _{j=1}^k (-1)^j q^{j^2} \right) \\&\qquad =1+2\sum _{j=1}^\infty (-1)^j q^{2j^2} + 2(-1)^k q^{(k+1)^2} (-q;q^2)_{\infty } \sum _{j=0}^{\infty }\frac{q^{(2k+2j+3)j}}{(q^2;q^2)_j(q;q^2)_{k+j+1}} \end{aligned}$$

and

$$\begin{aligned}&\frac{(-q;q^2)_\infty }{(q;q^2)_\infty } \left( 1+2\sum _{j=1}^k (-1)^j q^{2j^2} \right) \\&\qquad =1+2\sum _{j=1}^\infty q^{j^2} + 2(-1)^k q^{2(k+1)^2} (-q;q^2)^2_{\infty } \sum _{j=0}^{\infty }\frac{q^{2(2k+2j+3)j}}{(q^4;q^4)_j(q^2;q^4)_{k+j+1}}. \qquad \end{aligned}$$

We can deduce the following results where \(\delta _{i,j}\) is the Kronecker delta function.

Corollary 1.2

Let k and n be positive integers.

  1. (a)

    For \(n\ge (k+1)^2\),

    \((-1)^{k} \left( \overline{p_o}(n)+2 \sum \limits _{j=1}^{k} (-1)^{j} \overline{p_o}(n-j^2) - (-1)^{\left\lfloor \sqrt{n/2}\right\rfloor }\cdot 2\delta _{n,2\left\lfloor \sqrt{n/2}\right\rfloor ^2}\right) \ge 2.\)

  2. (b)

    For \(n< (k+1)^2\),

    \(\qquad \overline{p_o}(n)+2 \sum \limits _{j=1}^{k} (-1)^{j} \overline{p_o}(n-j^2) = (-1)^{\left\lfloor \sqrt{n/2}\right\rfloor }\cdot 2\delta _{n,2\left\lfloor \sqrt{n/2}\right\rfloor ^2}. \)

  3. (c)

    For \(n\ge 2(k+1)^2\),

    \(\qquad (-1)^{k} \left( \overline{p_o}(n)+2 \sum \limits _{j=1}^{k} (-1)^{j} \overline{p_o}(n-2j^2) -2\delta _{n,\left\lfloor \sqrt{n}\right\rfloor ^2}\right) \ge 2.\)

  4. (d)

    For \(n< 2(k+1)^2\),

    \(\qquad \overline{p_o}(n)+2 \sum \limits _{j=1}^{k} (-1)^{j} \overline{p_o}(n-2j^2) = 2\delta _{n,\left\lfloor \sqrt{n}\right\rfloor ^2}.\)

We remark that the last relation of this corollary provides an efficient algorithm for computing the function \(\overline{p_o}(n)\).

The rest of this paper is organized as follows. We will first prove Theorem 1.1 in Sect. 2. In Sect. 3, we will provide a combinatorial interpretation of the right-hand side of each identity in Theorem 1.1.

2 Proof of Theorem 1.1

To prove the theorem, we consider the Gauss hypergeometric series

$$\begin{aligned} {_{2}}\phi _{1}\bigg (\begin{matrix}a, b\\ c\end{matrix}\,;q,z\bigg ) = \sum _{n=0}^{\infty } \frac{(a;q)_n(b;q)_n}{(q;q)_n(c;q)_n} z^n \end{aligned}$$

and the second identity by Heine’s transformation of \({_{2}}\phi _{1}\) series [11, (III.2)], namely

$$\begin{aligned} {_{2}}\phi _{1}\bigg (\begin{matrix}a, b\\ c\end{matrix}\,;q,z\bigg ) = \frac{(c/b;q)_\infty (bz;q)_\infty }{(c;q)_\infty (z;q)_\infty } {_{2}}\phi _{1}\bigg (\begin{matrix}abz/c, b\\ bz\end{matrix}\,;q,c/b\bigg ). \end{aligned}$$
(2.1)

We first prove the first identity in Theorem 1.1. By Gauss’ identity (1.1), we can write the left-hand side as follows:

$$\begin{aligned}&\frac{(-q;q^2)_\infty }{(q;q^2)_\infty } \left( 1+2\sum _{j=1}^k (-1)^j q^{j^2} \right) \\&\quad = \frac{(q^2;q^2)_\infty }{(-q^2;q^2)_\infty } - 2\frac{(-q;q^2)_\infty }{(q;q^2)_\infty } \sum _{j=k+1}^{\infty } (-1)^j q^{j^2}\\&\quad = 1+2\sum _{j=1}^\infty (-1)^j q^{2j^2} + 2(-1)^k q^{(k+1)^2} \frac{(-q;q^2)_\infty }{(q;q^2)_\infty } \sum _{j=0}^{\infty } (-1)^j q^{j^2+2j(k+1)}\\&\quad = 1+2\sum _{j=1}^\infty (-1)^j q^{2j^2} + 2(-1)^k q^{(k+1)^2} \frac{(-q;q^2)_{\infty }}{(q;q^2)_\infty }\lim _{\tau \rightarrow 0}{_{2}}\phi _{1}\bigg (\begin{matrix}q^2, \frac{ q^{2k+3}}{\tau }\\ 0\end{matrix}\,;q^2,\tau \bigg )\\&\quad =1+2\sum _{j=1}^\infty (-1)^j q^{2j^2} \\&\quad \quad + 2(-1)^k q^{(k+1)^2} \frac{(-q;q^2)_{\infty }}{(q;q^2)_\infty } \lim _{\tau \rightarrow 0}\frac{(q^{2k+3};q^2)_\infty }{(\tau ;q^2)_\infty } \sum _{j=0}^{\infty }\frac{(-1)^j\tau ^jq^{j^2+j}(\frac{ q^{2k+3}}{\tau };q^2)_j}{(q^2;q^2)_j(q^{2k+3};q^2)_j}\\&\quad =1+2\sum _{j=1}^\infty (-1)^j q^{2j^2} + 2(-1)^k q^{(k+1)^2} \frac{(-q;q^2)_{\infty }}{(q;q^2)_{k+1}}\sum _{j=0}^{\infty }\frac{q^{2j^2+(2k+3)j}}{(q^2;q^2)_j(q^{2k+3};q^2)_j}\\&\quad =1+2\sum _{j=1}^\infty (-1)^j q^{2j^2} + 2(-1)^k q^{(k+1)^2} (-q;q^2)_{\infty } \sum _{j=0}^{\infty }\frac{q^{(2k+2j+3)j}}{(q^2;q^2)_j(q;q^2)_{k+j+1}}, \end{aligned}$$

where the fourth equality follows from (2.1).

The proof of the second identity is similar to the proof of the first one. With q replaced by \(q^2\), the Gauss identity (1.1) becomes

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

Multiplying both sides of this identity by the generating function of \(\overline{p_o}(n)\), we get

$$\begin{aligned}&\frac{(-q;q^2)_\infty }{(q;q^2)_\infty } \left( 1+2\sum _{j=1}^k (-1)^j q^{2j^2} \right) \\&\quad = \frac{(-q;-q)_\infty }{(q;-q)_\infty } - 2\frac{(-q;q^2)_\infty }{(q;q^2)_\infty } \sum _{j=k+1}^{\infty } (-1)^j q^{2j^2}\\&\quad = 1+2\sum _{j=1}^\infty q^{j^2} + 2(-1)^k q^{2(k+1)^2} \frac{(-q;q^2)_\infty }{(q;q^2)_\infty } \sum _{j=0}^{\infty } (-1)^j q^{2j^2+4j(k+1)}\\&\quad =1+2\sum _{j=1}^\infty q^{j^2} + 2(-1)^k q^{2(k+1)^2} \frac{(-q;q^2)_{\infty } (q^{4k+6};q^4)_{\infty }}{(q;q^2)_{\infty }}\\&\qquad \times \sum _{j=0}^{\infty }\frac{q^{4j^2+2(2k+3)j}}{(q^4;q^4)_j(q^{4k+6};q^4)_j} \quad {\text {by (2.1)}}\\&\quad =1+2\sum _{j=1}^\infty q^{j^2} + 2(-1)^k q^{2(k+1)^2} \frac{(-q;q^2)_{\infty } (-q^{2k+3};q^2)_{\infty }}{(q;q^2)_{k+1}}\\&\qquad \times \sum _{j=0}^{\infty }\frac{q^{4j^2+2(2k+3)j}}{(q^4;q^4)_j(q^{4k+6};q^4)_j}\\&\quad =1+2\sum _{j=1}^\infty q^{j^2} + 2(-1)^k q^{2(k+1)^2} (-q;q^2)_{\infty } \\&\qquad \times \sum _{j=0}^{\infty }\frac{q^{4j^2+2(2k+3)j}(-q^{2k+2j+3};q^2)_\infty }{(q^4;q^4)_j(q;q^2)_{k+j+1}}\\&\quad =1+2\sum _{j=1}^\infty q^{j^2} + 2(-1)^k q^{2(k+1)^2} (-q;q^2)^2_{\infty } \sum _{j=0}^{\infty }\frac{q^{2(2k+2j+3)j}}{(q^4;q^4)_j(q^2;q^4)_{k+j+1}}. \end{aligned}$$

3 Partitions Arising from Theorem 1.1

In this section, we will explain what partitions are generated by the right-hand sides of the identities in Theorem 1.1. We first recall some necessary definitions.

For a partition \(\lambda \), we denote the sum of all parts of \(\lambda \) by \(|\lambda |\). The Ferrers graph of a partition \(\lambda \) is a graphical representation of \(\lambda \) whose ith row has as many boxes as the ith part \(\lambda _i\). Such a graph is called a Ferrers graph of shape \(\lambda \).

For a positive integer k, any positive integer n can be uniquely written as \(ka+s\) with \(a\ge 0\) and \(1\leqslant s\leqslant k\). The k-modular partitions are a modification of the Ferrers graph so that n is represented by a row of a boxes with k in each of them and one box with s in it. This notion was first introduced by MacMahon [1, p. 13]. For instance, Fig. 1 shows the 2-modular Ferrers graph of the partition \(9+7+3+3\) with shape \(5+4+2+2\). Here, we put boxes with 1 in the first column for convenience.

Fig. 1
figure 1

The 2-modular Ferrers graph of \(9+7+3+3\)

Another combinatorial notion needed is m-Durfee rectangles. For a nonnegative integer m, define an m-rectangle to be a rectangle whose width minus its height is m. For a Ferrers graph of shape \(\lambda \), define the m-Durfee rectangle to be the largest m-rectangle which fits in the graph [6]. When \(m=0\), the m-Durfee rectangle becomes the Durfee square of a partition. In Fig. 1, the 2-Durfee rectangle of the partition is the rectangle of size \(2\times 4\).

For a fixed \(k\ge 1\) and any \(n\ge 0\), define \(M_{o,k}(n)\) to be the number of partitions of n into odd parts such that all odd numbers less than or equal to \(2k+1\) occur as parts at least once and the parts below the \((k+2)\)-Durfee rectangle in the 2-modular graph are strictly less than the width of the rectangle. For instance, let \(k=2\). Then the partition \(11+11+7+7+5+3+1\) is counted by \(M_{o,2}(45)\). However, the partition \(11+11+11+5+3+3+1\) is not counted by \(M_{o,2}(41)\), because its 4-Durfee rectangle is of size \(2\times 6\) and the third part of length 11 that goes below the Durfee rectangle forms a row of length 6.

Theorem 3.1

For a fixed \(k\ge 1\),

$$\begin{aligned} \sum _{n=0}^{\infty } {M_{o,k}}(n) q^n =q^{(k+1)^2} \sum _{j=0}^{\infty }\frac{q^{(2k+2j+3)j}}{(q^2;q^2)_j(q;q^2)_{k+j+1}}. \end{aligned}$$

Proof

For a partition counted by \(M_{o,k}(n)\), assume that its \((k+2)\)-Durfee rectangle is of size \(j\times (k+2+j)\). By the Durfee rectangle, the 2-modular Ferrers graph can be divided into three parts, namely the Durfee rectangle, the parts below the rectangle and the parts to the right of the rectangle. Then, the weight of the Durfee rectangle is \(j(2(k+j+2)-1)\). Also, it follows from the definition of \(M_{o,k}(n)\), the parts below the rectangle and the parts to the right of the rectangle are generated by \(q^{(k+1)^2}/(q;q^2)_{k+j+1}\) and \(1/(q^2;q^2)_j\), respectively. Here, \(q^{(k+1)^2}\) accounts for all the odd numbers between 1 and \(2k+1\). Therefore, we can see that the summand on the right-hand side in the statement generates partitions counted by \(M_{o,k}(n)\) whose \((k+2)\)-Durfee rectangle is of size \(j\times (k+2+j)\). \(\square \)

Corollary 3.2

For \(k\ge 1\) and \(n\ge (k+1)^2\),

$$\begin{aligned}&(-1)^{k} \left( \overline{p_o}(n)+2 \sum _{j=1}^{k} (-1)^{j} \overline{p_o}(n-j^2)- (-1)^{\left\lfloor \sqrt{n/2}\right\rfloor }\cdot 2\delta _{n,2\left\lfloor \sqrt{n/2}\right\rfloor ^2}\right) \\&\quad = 2\overline{M_{o,k}}(n), \end{aligned}$$

where \(\overline{M_{o,k}}(n)\) counts overpartitions of n into odd parts in which the non-overlined parts form a partition counted by \(M_{o,k}(n-a)\), a is the sum of overlined parts, and

$$\begin{aligned} (-1)^{k} \left( \overline{p_o}(n)+2 \sum _{j=1}^{k} (-1)^{j} \overline{p_o}(n-2j^2) -2\delta _{n,\left\lfloor \sqrt{n}\right\rfloor ^2}\right) = 2 N_{o,k}(n), \end{aligned}$$

where \({N_{o,k}}(n)\) counts triples \((\lambda , \mu , \nu )\) such that \(\lambda \) and \(\mu \) are partitions into distinct odd parts and \(\nu \) is a partition counted by \(M_{o,k}\big ((n-|\lambda |-|\mu |)/2\big )\).

Proof

The statements easily follow from Theorems 1.1 and 3.1, so we omit the details. \(\square \)