1 Introduction

A partition of a positive integer n is a finite weakly decreasing sequence of positive integers whose sum is n. Usually the number of partitions of n is denoted by p(n) and is called Euler’s partition function. For example, the partitions of 6 are:

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

Thus \(p(6)=11\). It is convenient to define \(p(0) = 1\) and, \(p(n) = 0\) for negative n.

The partition function is considered one of the most difficult number-theoretic functions. In order to understand certain aspects of partitions, Euler introduced the idea of a generating function of a sequence [1]. Euler showed that the generating function of the partition function p(n), can be expressed as an elegant infinite product:

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

where we assume that q is a complex number with \(|q| < 1\) and utilize the standard q-Pochhammer symbol

$$\begin{aligned} (a;q)_\infty =\prod _{n=0}^\infty (1-a\,q^{n}). \end{aligned}$$

The expansion starts as:

$$\begin{aligned} \frac{1}{(q;q)_\infty }=1+q+2\,q^2+3\,q^3+5\,q^4+7\,q^5+11\,q^6+15\,q^7+\cdots . \end{aligned}$$
(1)

In this paper, all identities involving infinite products may be understood in the sense of formal power series in q. Many identities of the form

$$\begin{aligned} \text {infinite series} = \text {infinite product} \end{aligned}$$

arise in number theory, analysis, combinatorics and the theory of integer partitions. Playing with series and products, Euler discovered the pentagonal number theorem

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

which is the very first theorem that is of this type. In other words,

$$\begin{aligned} (1-q)(1-q^2)(1-q^3)\cdots =\sum _{k=0}^\infty (-1)^{\lceil k/2 \rceil }\,q^{\omega _k}, \end{aligned}$$

where the exponents

$$\begin{aligned} \omega _k=\frac{1}{2}\bigg \lceil \frac{k}{2} \bigg \rceil \bigg \lceil \frac{3k+1}{2} \bigg \rceil \end{aligned}$$

are called generalized pentagonal numbers. Euler used this identity to derive the well known linear recurrence for the partition function p(n):

$$\begin{aligned} \sum _{k=0}^\infty (-1)^{\lceil k/2 \rceil }\,p\big (n-\omega _k\big ) = \delta _{n,0}, \end{aligned}$$

where \(\delta _{i,j}\) is Kronecker’s delta.

In 2014, Merca [2, Corollary 10] used Euler’s results and showed that the generalized pentagonal numbers

$$\begin{aligned} \{\omega _n\}_{n\geqslant 0} = \{0,\, 1,\, 2,\, 5,\, 7,\, 12,\, 15,\, 22,\, 26,\, 35,\, 40,\, 51,\, 57,\, 70,\, 77,\, 92,\, 100,\, 117,\,\ldots \} \end{aligned}$$

can be used to compute an isolated value of p(n) without recursion:

$$\begin{aligned} p(n)=\sum _{t_1 \omega _1+t_2\omega _2+\cdots +t_n\omega _n=n} (-1)^{t_3+t_4+t_7+t_8+\cdots } \left( {\begin{array}{c}t_1+t_2+\cdots +t_n\\ t_1,t_2,\ldots ,t_n\end{array}}\right) . \end{aligned}$$
(3)

Taking into account that

$$\begin{aligned} \left( {\begin{array}{c}t_1+t_2+\cdots +t_n\\ t_1,t_2,\ldots ,t_n\end{array}}\right) =\left( {\begin{array}{c}t_1\\ t_1\end{array}}\right) \left( {\begin{array}{c}t_1+t_2\\ t_2\end{array}}\right) \left( {\begin{array}{c}t_1+t_2+t_3\\ t_3\end{array}}\right) \cdots \left( {\begin{array}{c}t_1+t_2+\cdots +t_n\\ t_n\end{array}}\right) , \end{aligned}$$

the Eq. (3) can be written in terms of binomial coefficients as follows

$$\begin{aligned} p(n)=\sum _{t_1 \omega _1+t_2\omega _2+\cdots +t_n\omega _n=n} (-1)^{t_3+t_4+t_7+t_8+\cdots } \left( {\begin{array}{c}a_2\\ t_2\end{array}}\right) \left( {\begin{array}{c}a_3\\ t_3\end{array}}\right) \cdots \left( {\begin{array}{c}a_n\\ t_n\end{array}}\right) , \end{aligned}$$
(4)

where \(a_k=t_1+t_2+\cdots +t_k\). The sum in the right-hand side of this equation runs over the partitions of n into generalized pentagonal numbers and all terms are non-zero and involves the multiplicity of the parts greater than 1.

For example, the partitions of 6 into parts which are generalized pentagonal numbers are:

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

So, according to (4), we can write

$$\begin{aligned} p(6)=-\left( {\begin{array}{c}2\\ 1\end{array}}\right) +\left( {\begin{array}{c}3\\ 3\end{array}}\right) +\left( {\begin{array}{c}4\\ 2\end{array}}\right) +\left( {\begin{array}{c}5\\ 1\end{array}}\right) +1 = -2+1+6+5+1 = 11. \end{aligned}$$

Upon reflection, one expects that there might be similar decompositions of p(n) in terms of binomial coefficients where all terms are positive. In the sequel we will need a notion of the p-adic valuation of an integer, where p is a prime number. The p-adic valuation of an integer n, denoted by \(\nu _p(n)\), is just the highest power of p dividing n, i.e.,

$$\begin{aligned} \nu _p(n):= \max \{k \in {\mathbb {N}}: p^k | n\}. \end{aligned}$$

We also make standard convention that \(\nu _p(0) = \infty \). In this paper, we are interested in the case \(p=2\). With this notation, our main theorem may by stated as follows.

Theorem 1

Let n be a positive integer. Then

$$\begin{aligned} p(n)=\sum _{\begin{array}{c} t_1+2t_2+\cdots +nt_n=n\\ t_k\leqslant 1+\nu _2(k) \end{array}} \left( {\begin{array}{c}2+\nu _2(1)\\ t_2\end{array}}\right) \left( {\begin{array}{c}2+\nu _2(2)\\ t_4\end{array}}\right) \cdots \left( {\begin{array}{c}2+\nu _2(\lfloor n/2 \rfloor )\\ t_{2\lfloor n/2 \rfloor }\end{array}}\right) . \end{aligned}$$

The sum in the right-hand side of the equation given by Theorem  1 runs over the partitions of n in which each part k has the multiplicity at most \(1+\nu _2(k)\). We see that the number of partitions of n can be expressed in terms of binomial coefficients considering only the multiplicity of the even parts.

For example, the partitions of 6 in which each part k has the multiplicity at most \(1+\nu _2(k)\) are:

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

According to Theorem 1, we can write

$$\begin{aligned} p(6)&= \left( {\begin{array}{c}2+\nu _2(3)\\ 1\end{array}}\right) +1+\left( {\begin{array}{c}2+\nu _2(2)\\ 1\end{array}}\right) \left( {\begin{array}{c}2+\nu _2(1)\\ 1\end{array}}\right) +\left( {\begin{array}{c}2+\nu _2(1)\\ 1\end{array}}\right) \\&=\left( {\begin{array}{c}2\\ 1\end{array}}\right) +1+\left( {\begin{array}{c}3\\ 1\end{array}}\right) \left( {\begin{array}{c}2\\ 1\end{array}}\right) +\left( {\begin{array}{c}2\\ 1\end{array}}\right) \\&=2+1+6+2 = 11. \end{aligned}$$

There is a more general result, where our Theorem 1 is a special case. For any positive integer m, we denote by \(P^{(m)}(n)\) the number of m-tuples of partitions of non-negative integers \(n_1,n_2,\ldots ,n_m\) where \(n_1+n_2+\cdots +n_m=n\). It is clear that \(p(n)=P^{(1)}(n)\) and

$$\begin{aligned} P^{(m)}(n) = \sum _{n_1+n_2+\cdots +n_m=n} p(n_1)\,p(n_2)\,\cdots \,p(n_m). \end{aligned}$$

For \(r\in \{-1,0,1\}\), we define the \(P^{(m,r)}(n)\) and \(\nu ^{(m,r)}(n)\) as follows:

$$\begin{aligned} P^{(m,r)}(n) = {\left\{ \begin{array}{ll} P^{(m)}(n), &{} \text {for }r=0, \\ P^{(m)}(n)-P^{(m)}(n-1), &{} \text {for }r=-1,\\ \sum \limits _{k=0}^n P^{(m)}(k), &{} \text {for }r=1, \end{array}\right. } \end{aligned}$$
(5)

and

$$\begin{aligned} \nu ^{(m,r)}(n)={\left\{ \begin{array}{ll} m\cdot \nu _2(2n)+r, &{} \text {for }n=2^k, k=0,1,2,\ldots ,\\ m\cdot \nu _2(2n), &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

We have the following result.

Theorem 2

For \(m\geqslant 1\), \(r\in \{-1,0,1\}\) and \(n\geqslant 0\),

$$\begin{aligned} P^{(m,r)}(n) = \sum _{\begin{array}{c} t_1+2t_2+\cdots +nt_n=n\\ t_k\leqslant \nu ^{(m,r)}(k) \end{array}} \left( {\begin{array}{c}\nu ^{(m,r)}(1)\\ t_1\end{array}}\right) \left( {\begin{array}{c}\nu ^{(m,r)}(2)\\ t_2\end{array}}\right) \cdots \left( {\begin{array}{c}\nu ^{(m,r)}(n)\\ t_n\end{array}}\right) . \end{aligned}$$

Theorem 1 is the case \(m=1\) and \(r=0\) of Theorem 2. The case \(r=0\) of Theorem 2 reads as follows.

Corollary 3

Let m be a positive integer. For \(n\geqslant 0\),

$$\begin{aligned} \sum _{t_1+t_2+\cdots +t_m=n} p(t_1)p(t_2)\cdots p(t_m) = \sum _{\begin{array}{c} t_1+2t_2+\cdots +nt_n=n\\ t_k\leqslant m\,\nu _2(2k) \end{array}} \left( {\begin{array}{c}m\,\nu _2(2)\\ t_1\end{array}}\right) \left( {\begin{array}{c}m\,\nu _2(4)\\ t_2\end{array}}\right) \cdots \left( {\begin{array}{c}m\,\nu _2(2n)\\ t_n\end{array}}\right) . \end{aligned}$$

The case \(m=2\) of Corollary 3 provides the following identity.

Corollary 4

For \(n\geqslant 0\),

$$\begin{aligned} \sum _{k=0}^n p(k)p(n-k) = \sum _{\begin{array}{c} t_1+2t_2+\cdots +nt_n=n\\ t_k\leqslant 2\,\nu _2(2k) \end{array}} \left( {\begin{array}{c}2\,\nu _2(2)\\ t_1\end{array}}\right) \left( {\begin{array}{c}2\,\nu _2(4)\\ t_2\end{array}}\right) \cdots \left( {\begin{array}{c}2\,\nu _2(2n)\\ t_n\end{array}}\right) . \end{aligned}$$

For example, the partitions of six in which each part k has the multiplicity at most \(2\,\nu _2(2k)\) are:

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

The case \(n=6\) of Corollary 4, reads as follows

$$\begin{aligned}&\sum _{k=0}^6 p(k)\,p(6-k) \\&\quad =\left( {\begin{array}{c}2\,\nu _2(12)\\ 1\end{array}}\right) +\left( {\begin{array}{c}2\,\nu _2(10)\\ 1\end{array}}\right) \left( {\begin{array}{c}2\,\nu _2(2)\\ 1\end{array}}\right) +\left( {\begin{array}{c}2\,\nu _2(8)\\ 1\end{array}}\right) \left( {\begin{array}{c}2\,\nu _2(4)\\ 1\end{array}}\right) +\left( {\begin{array}{c}2\,\nu _2(8)\\ 1\end{array}}\right) \left( {\begin{array}{c}2\,\nu _2(2)\\ 2\end{array}}\right) \\&\qquad +\left( {\begin{array}{c}2\,\nu _2(6)\\ 2\end{array}}\right) +\left( {\begin{array}{c}2\,\nu _2(6)\\ 1\end{array}}\right) \left( {\begin{array}{c}2\,\nu _2(4)\\ 1\end{array}}\right) \left( {\begin{array}{c}2\,\nu _2(2)\\ 1\end{array}}\right) +\left( {\begin{array}{c}2\,\nu _2(4)\\ 3\end{array}}\right) +\left( {\begin{array}{c}2\,\nu _2(4)\\ 2\end{array}}\right) \left( {\begin{array}{c}2\,\nu _2(2)\\ 2\end{array}}\right) \\&\quad =\left( {\begin{array}{c}4\\ 1\end{array}}\right) +\left( {\begin{array}{c}2\\ 1\end{array}}\right) \left( {\begin{array}{c}2\\ 1\end{array}}\right) +\left( {\begin{array}{c}6\\ 1\end{array}}\right) \left( {\begin{array}{c}4\\ 1\end{array}}\right) +\left( {\begin{array}{c}6\\ 1\end{array}}\right) \left( {\begin{array}{c}2\\ 2\end{array}}\right) +\left( {\begin{array}{c}2\\ 2\end{array}}\right) +\left( {\begin{array}{c}2\\ 1\end{array}}\right) \left( {\begin{array}{c}4\\ 1\end{array}}\right) \left( {\begin{array}{c}2\\ 1\end{array}}\right) +\left( {\begin{array}{c}4\\ 3\end{array}}\right) +\left( {\begin{array}{c}4\\ 2\end{array}}\right) \left( {\begin{array}{c}2\\ 2\end{array}}\right) \\&\quad = 4+4+24+6+1+16+4+6 = 65. \end{aligned}$$

On the other hand, according to the expansion (1) we can write:

$$\begin{aligned} \sum _{k=0}^6 p(k)\,p(6-k)&= 1\cdot 11+1\cdot 7+2\cdot 5 + 3\cdot 3+5\cdot 2+7\cdot 1+11\cdot 1\\&=11+7+10+9+10+7+11=65. \end{aligned}$$

By Corollary 4, we easily deduce the following congruence identity.

Corollary 5

For \(n\geqslant 0\),

$$\begin{aligned} \sum _{\begin{array}{c} t_1+2t_2+\cdots +nt_n=n\\ t_k\leqslant 2\,\nu _2(2k) \end{array}} \left( {\begin{array}{c}2\,\nu _2(2)\\ t_1\end{array}}\right) \left( {\begin{array}{c}2\,\nu _2(4)\\ t_2\end{array}}\right) \cdots \left( {\begin{array}{c}2\,\nu _2(2n)\\ t_n\end{array}}\right) \equiv p\left( \frac{n}{2}\right) \pmod 2, \end{aligned}$$

where \(p(x)=0\) if x is not a positive integer.

The remainder of the paper is organized as follows. In Sect. 2, we provide an analytic proof of Theorem 2. In Sect. 3, we present connections between divisors and \(\nu _2(n)\). In Sect. 4, we introduce the notion of 2-adic color partition and provide a new combinatorial interpretation for Euler partition function p(n). In Sect. 5, we remark some connections between partitions and the game of m-Modular Nim with two heaps. In the last section, we provide two infinite families of linear inequalities as combinatorial interpretation of two open problems related to the positivity of two truncated theta series.

2 Proof of Theorem 2

Elementary techniques in the theory of partitions [3] give the following generating function:

$$\begin{aligned} \sum _{n=0}^\infty P^{(m,r)}(n)\,q^n = \frac{1}{(1-q)^r\,(q;q)^m_\infty },\qquad |q|<1. \end{aligned}$$
(6)

In order to prove our theorem, we consider the identity

$$\begin{aligned} 1=(1-q)\prod _{k=0}^\infty (1+q^{2^k}),\qquad |q|<1, \end{aligned}$$

which can be rewritten as

$$\begin{aligned} \frac{1}{1-q} = \prod _{k=0}^\infty (1+q^{2^k}),\qquad |q|<1. \end{aligned}$$
(7)

In addition, by (7), with q replaced by \(q^n\), we obtain

$$\begin{aligned} \frac{1}{1-q^n} = \prod _{k=0}^\infty (1+q^{2^k\cdot n}),\qquad |q|<1. \end{aligned}$$
(8)

For \(|q|<1\), considering (8), the generating function of \(P^{(m,r)}(n)\) can be rewritten as follows:

$$\begin{aligned} \sum _{n=0}^\infty P^{(m,r)}(n)\,q^n&= \frac{1}{(1-q)^r}\prod _{n=1}^\infty \frac{1}{(1- q^n)^{m}}\nonumber \\&= \prod _{k=0}^\infty (1+q^{2^k})^r \cdot \prod _{n=1}^\infty \prod _{k=0}^\infty (1+q^{2^k\cdot n})^{m} \nonumber \\&= \prod _{n=1}^\infty (1+q^n)^{\nu ^{(m,r)}(n)} \nonumber \\&= \prod _{n=1}^\infty \left( \sum _{j=0}^{\nu ^{(m,r)}(n)} \left( {\begin{array}{c}\nu ^{(m,r)}(n)\\ j\end{array}}\right) q^{j\cdot n}\right) \nonumber \\&= \sum _{n=0}^\infty q^n \sum _{t_1+2t_2+\cdots +nt_n=n} \prod _{j=1}^{n} \left( {\begin{array}{c}\nu ^{(m,r)}(j)\\ t_j\end{array}}\right) , \end{aligned}$$
(9)

where we have invoked Cauchy multiplication of power series.

3 Connections between divisors and \(\nu _2(n)\)

This section is inspired by the following well known connection between partitions and divisors

$$\begin{aligned} p(n)=\frac{1}{n} \sum _{k=1}^n \sigma _1(k)\,p(n-k), \end{aligned}$$

where, for a real or complex number z, the sum of positive divisors function \(\sigma _z(n)\) is defined as the sum of the zth powers of the positive divisors of n, i.e.,

$$\begin{aligned} \sigma _z(n)=\sum _{d|n} d^z. \end{aligned}$$

It is well known that the generating function of \(\sigma _z(n)\) is given by the following Lambert series:

$$\begin{aligned} \sum _{n=1}^\infty \sigma _z(n)\,q^n = \sum _{n=1}^\infty \frac{n^z\,q^n}{1-q^n},\qquad |q|<1. \end{aligned}$$

We remark the following result.

Theorem 6

Let n be a positive integer. Then

$$\begin{aligned} \sigma _1(n) = \sum _{d|n} (-1)^{1+n/d}d\,\nu _2(2d). \end{aligned}$$

Proof

The logarithmic differentiation of the generating functions of p(n) can be written as:

$$\begin{aligned} \frac{\partial }{\partial q } \ln \prod _{n=1}^\infty \frac{1}{1-q^n }&= \sum _{n=1}^\infty \frac{\partial }{\partial q } \ln \frac{1}{1-q^n} = \sum _{n=1}^\infty \frac{n \,q^{n-1}}{1-q^n} = \sum _{n=1}^\infty \sigma _1(n)\,q^{n-1}. \end{aligned}$$

and

$$\begin{aligned} \frac{\partial }{\partial q } \ln \prod _{n=1}^\infty (1+q^n)^{\nu _2(2n)}&= \sum _{n=1}^\infty \frac{\partial }{\partial q } \ln (1+q^n)^{\nu _2(2n)} = \sum _{n=1}^\infty \frac{n\, \nu _2(2n) \,q^{n-1}}{1+q^n} \nonumber \\&= \sum _{n=1}^\infty q^{n-1} \sum _{d|n} (-1)^{1+n/d} d\,\nu _2(2d). \end{aligned}$$

This concludes the proof. \(\square \)

For example, the case \(n=12\) of Theorem 6 reads as follows:

$$\begin{aligned} \sigma _1(12)&= - \nu _2(2) -2\,\nu _2(4)-3\,\nu _2(6)+4\,\nu _2(8)-6\,\nu _2(12)+12\,\nu _2(24)\\&=-1-4-3+12-12+36=28. \end{aligned}$$

Indeed, the divisors of 12 are 1, 2, 3, 4, 6 and 12.

We remark the following consequence of Theorem 6.

Corollary 7

Let n be a positive integer. The sum of the even divisors of n can be expressed in terms of \(\nu _2(n)\) as

$$\begin{aligned} \sum _{\begin{array}{c} d|n\\ d\text { even} \end{array}} (-1)^{1+n/d}d\,\nu _2(d). \end{aligned}$$

Proof

We can write

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

Thus we deduce that

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

This concludes the proof. \(\square \)

For example, the case \(n=12\) of Corollary 7 reads as follows:

$$\begin{aligned} -2\,\nu _2(2)+4\,\nu _2(4)-6\,\nu _2(6)+12\,\nu _2(12)=-2+8-6+24=24 \end{aligned}$$

Indeed, the even divisors of 12 are 2, 4, 6 and 12.

4 A new combinatorial interpretation

In this section, we consider \(\nu _2(n)\) in order to introduce the notion of 2-adic color partition of a non-negative integer. This notion allows us to obtain a new combinatorial interpretation for Euler’s partition function p(n).

Definition 1

An 2-adic color partition of a positive integer m is a partition in which a part of size n can come in \(\nu _2(2n)\) different colors denoted by subscripts: \(n_1, n_2, \ldots ,n_{\nu _2(2n)}\). The parts satisfy the order:

$$\begin{aligned} 1_1<2_1<2_2<3_1<4_1<4_2<4_3<5_1<6_1<6_2<7_1<8_1<8_2<8_3<8_4<\ldots \end{aligned}$$

We denote by \(Q_2(m)\) the number of 2-adic color partitions of m into distinct parts. For convenience, we define \(Q_2(0)=1\). For example, there are eleven 2-adic color partitions into distinct parts of 6:

$$\begin{aligned}&(6_2),\ (6_1),\ (5_1,1_1),\ (4_3,2_2),\ (4_3,2_1),\ (4_2,2_2),\ (4_2,2_1), \nonumber \\&(4_1,2_2),\ (4_1,2_1),\ (3_1,2_2,1_1),\ (3_1,2_1,1_1). \end{aligned}$$
(10)

Elementary techniques in the theory of partitions [3] give the following generating function:

$$\begin{aligned} \sum _{n=0}^\infty Q_2(n)\,q^n = \prod _{n=1}^\infty (1+q^n)^{\nu _2(2n)},\qquad |q|<1. \end{aligned}$$

On the other hand, by (9) with \(m=1\) and \(r=0\), we obtain a new expression of the generating function of p(n):

$$\begin{aligned} \sum _{n=0}^\infty p(n)\,q^n = \prod _{n=1}^\infty (1+q^n)^{\nu _2(2n)},\qquad |q|<1. \end{aligned}$$
(11)

In this way, we deduce the following result for which we provide a bijective proof.

Theorem 8

The number of partitions of n equals the number of 2-adic color partitions of n into distinct parts.

Proof

A famous theorem of Euler asserts that there are as many partitions of n into distinct parts as there are partitions into odd parts, i.e.,

$$\begin{aligned} (-q;q)_\infty = \frac{1}{(q;q^2)_\infty },\qquad |q|<1. \end{aligned}$$
(12)

The even parts in partitions of n into distinct parts play an important role in the Glaisher bijective proof of this result.

In an 2-adic color partition, the odd parts appear into a single color (because \(\nu _2\big (2(2k+1)\big )=1\)). This fact allows us to assign the even parts the same role as in the Glaisher bijective proof of (12).

Denote by \({\mathcal {P}}_n\) the set of partitions of n and by \({\mathcal {Q}}_n\) the set of 2-adic color partitions of n with distinct parts. We define a bijection \(\varphi : {\mathcal {P}}_{n}\rightarrow {\mathcal {Q}}_n\) as follows.

Start with \(\lambda \in {\mathcal {P}}_{n}\). We assign the color 1 to all parts of \(\lambda \). We replace two parts of size k and color 1 by a single part \((2^1k)_{2}\). Then we replace two parts of size \(2^1k\) and color 2 by a single part \((2^2k)_{3}\). We continue the process and at each step j we replace two parts of size \(2^{j-1}k\) and color j by a single part \((2^jk)_{j+1}\) (part of size \(2^jk\) and color \(j+1\)). The process ends when all the parts are distinct and obtain a partition \(\mu \in {\mathcal {Q}}_n\).

To determine the inverse \(\varphi ^{-1}\), start with \(\mu \in {\mathcal {Q}}_n\). For each even part \(k_j\) with \(j>1\), we replace \(k_j\) by two parts \((k/2)_{j-1}\). We continue the process until there are no parts \(k_j\) with \(j>1\) to obtain a partition \(\lambda \in {\mathcal {P}}_{n}\). Then, \(\varphi ^{-1}(\mu )=\lambda \). \(\square \)

5 A connection to m-Modular Nim with two heaps

An impartial combinatorial game is a two-player game where both players have the same moves available at each and every point in the game and a complete set of information about the game and the potential moves. This implies that no randomness such as rolling dice can exist. In normal play, the first player unable to move is declared the loser. A position is called a terminal position if no moves may be made from it. In general, impartial combinatorial games are analyzed using the notion of P-positions and N-positions. This system of notation allows for games to be solved from the bottom up. A P-position is a position from which the previous player will win given perfect play. All terminal positions are P-positions. An N-position is a position from which the next player will win given perfect play.

Nim is the most fundamental impartial combinatorial game. It is one of the earliest take-away games and is testament to the complexity that can arise from simple rules. In the game of Nim, each position consists of a set of heaps of tokens. In a move, a player must remove a positive number of tokens from a single heap.

Tanya Khovanova and Karan Sarkar [4] introduced a natural extension to Nim which involves loosening the restrictions on Nim moves with conditions based on modular congruence. They called this extension m-Modular Nim.

In the game of m-Modular Nim, each position consists of a set of heaps of tokens, like in Nim. There are two types of moves:

  • Remove a positive number of tokens from a single heap.

  • Remove km tokens total from one or more heaps, where k is a positive integer.

We are interested in the m-Modular Nim with two heaps. In this case, we denote by \(N_m\) the number of P-positions in m-Modular Nim. The sequence

$$\begin{aligned} (N_m)_{m\geqslant 1}=(1,\, 3,\, 3,\, 8,\, 5,\, 9,\, 7,\, 20,\, 9,\, 15,\, 11,\, 24,\, 13,\, 21,\, 15,\, 48,\, 17,\, 27,\, 19,\,\ldots ) \end{aligned}$$

is known and can be seen in the On-Line Encyclopedia of Integer Sequence [5, A267092]. According to [4, Corollary 7], we have

$$\begin{aligned} N_m=m\left( 1+\frac{\nu _2(m)}{2}\right) . \end{aligned}$$
(13)

It is clear that our results can be expressed in terms of \(N_m\). For example, we remark the following version of Theorem  1

Corollary 9

For \(n\geqslant 0\),

$$\begin{aligned} p(n) = \sum _{\begin{array}{c} t_1+2t_2+\cdots +nt_n=n\\ t_k<2N_k/k \end{array}} \left( {\begin{array}{c}2N_1\\ t_2\end{array}}\right) \left( {\begin{array}{c}N_2\\ t_4\end{array}}\right) \cdots \left( {\begin{array}{c}2N_{\lfloor n/2 \rfloor }/\lfloor n/2 \rfloor \\ t_{2\lfloor n/2 \rfloor }\end{array}}\right) . \end{aligned}$$

In this context, we denote by \(p_{\nu }(n)\) the number of partitions of n with \(t_j\leqslant \nu _2(2j)\), for each \(j\in \{1,2,\ldots ,n\}\). It is clear that the restriction \(t_j\leqslant \nu _2(2j)\) is equivalent to \(t_j<2N_j/j\). The generating function for \(p_{\nu }(n)\) is given by

$$\begin{aligned} \sum _{n=0}^\infty p_{\nu }(n)\,q^n&= \prod _{n=1}^\infty (1+q^n+q^{2n}+\cdots +q^{\nu _2(2n)\,n})\nonumber \\&=\prod _{n=1}^\infty \frac{1-q^{n\,\nu _2(4n)}}{1-q^n}\nonumber \\&=\frac{1}{(q;q)_\infty }\prod _{n=1}^\infty (1-q^{2N_n}). \end{aligned}$$
(14)

Also we consider the set \({\mathcal {N}}\) defined as

$$\begin{aligned} {\mathcal {N}} = \{N_n \,|\, n\in {\mathbb {N}}\}. \end{aligned}$$

The first elements of the set \({\mathcal {N}}\) in ascending order are:

$$\begin{aligned} {\mathcal {N}} = \{1, 3, 5, 7, 8, 9, 11, 13, 15, 17, 19, 20, 21, 23, 24, 25, \ldots \}. \end{aligned}$$

For any \(n\in {\mathbb {N}}\), we denote by \({\mathcal {D}}_{\nu }(n)\) the set of partitions of n into distinct parts of size \(k\in {\mathcal {N}}\) such that:

  • the parts of size congruent to 3 modulo 6 can come in two colors;

  • the parts of size not congruent to 3 modulo 6 can come in one color;

  • two parts which have the same size but different colors are distinct.

For \(r\in \{0,1\}\), we define \(Q_{\nu ,r}(n)\) the number of partitions from \({\mathcal {D}}_{\nu }(n)\) which have a number of parts congruent to r modulo 2. It is clear that

$$\begin{aligned} Q_{\nu ,0}(n)+Q_{\nu ,1}(n)=|{\mathcal {D}}_{\nu }(n)|. \end{aligned}$$

For example, \(Q_{\nu ,0}(15)=2\) because the partitions in question are:

$$\begin{aligned} (8_1,7_1),\ (8_1,3_2,3_1,1_1) \end{aligned}$$

and \(Q_{\nu ,1}(15)=10\) because the partitions in question are:

$$\begin{aligned}&(15_2),\ (15_1),\ (11_1,3_2,1_1),\ (11_1,3_1,1_1),\ (9_2,5_1,1_1),\ (9_1,5_1,1_1),\\&(9_2,3_2,3_1),\ (9_1,3_2,3_1),\ (7_1,5_1,3_2),\ (7_1,5_1,3_1). \end{aligned}$$

In certain conditions, \(p_{\nu }(n)\) satisfies Euler’s pentagonal number recurrence.

Theorem 10

For \(n\geqslant 0\),

$$\begin{aligned} \sum _{k=-\infty }^\infty (-1)^k\,p_{\nu }\big (n-k(3k-1)/2\big )= {\left\{ \begin{array}{ll} 0,&{} \text {for }n \text {odd},\\ Q_{\nu ,0}(n/2)-Q_{\nu ,1}(n/2),&{} \text {for }n \text { even.} \end{array}\right. } \end{aligned}$$

Proof

Take into consideration the relation (13), for any positive integer n, we easily deduce that

$$\begin{aligned} N_{n} \equiv 0 \pmod 2\qquad \text {if and only if}\qquad n\equiv 0 \pmod 4 \end{aligned}$$

and

$$\begin{aligned} N_{2n-1} = 2n-1. \end{aligned}$$

In addition, we have

$$\begin{aligned} N_{4n-2}=3(2n-1)=N_{6n-3}. \end{aligned}$$

Thus, elementary techniques in the theory of partitions [3] give the following generating function:

$$\begin{aligned} \sum _{n=0}^\infty \big (Q_{\nu ,0}(n)-Q_{\nu ,1}(n)\big )\,q^n = \prod _{n=1}^\infty (1-q^{N_n}). \end{aligned}$$

Considering (2) and (14), we can write:

$$\begin{aligned}&\sum _{n=0}^\infty q^n \sum _{k=-\infty }^\infty (-1)^k\,p_{\nu }\big (n-k(3k-1)/2\big )\\&\qquad = (q;q)_\infty \sum _{n=0}^\infty p_{\nu }(n)\,q^n\\&\qquad = \prod _{n=1}^\infty (1-q^{2N_n}) \\&\qquad = \sum _{n=0}^\infty \big (Q_{\nu ,0}(n)-Q_{\nu ,1}(n)\big )\,q^{2n}. \end{aligned}$$

This concludes the proof. \(\square \)

Related to Theorem 10, we remark the following parity result.

Theorem 11

For \(n\equiv \{2,3\} \pmod 4\),

$$\begin{aligned} Q_{\nu ,0}(n)-Q_{\nu ,1}(n) \equiv 0\pmod 2. \end{aligned}$$

Proof

The generating function for \(Q_{\nu ,0}(n)-Q_{\nu ,1}(n)\) can be written as:

$$\begin{aligned}&\sum _{n=0}^\infty \big ( Q_{\nu ,0}(n)-Q_{\nu ,1}(n)\big )\,q^n \\&\qquad = \prod _{n=1}^\infty (1-q^{\frac{n}{2} \, \nu _2(2^2n)})\\&\qquad = \prod _{n=1}^\infty (1-q^{\frac{2n-1}{2}\,\nu _2(2^2(2n-1))})(1-q^{n\,\nu _2(2^3n)})\\&\qquad = \prod _{n=1}^\infty (1-q^{2n-1})(1-q^{n\,\nu _2(2^3n)})\\&\qquad = (q;q^2)_\infty \prod _{n=1}^\infty (1-q^{3(2n-1)})(1-q^{2n\,\nu _2(2^4n)})\\&\qquad = (q;q^2)_\infty (q^3;q^{6})_\infty \prod _{n=1}^\infty (1-q^{8(2n-1)})(1-q^{2^2n\,\nu _2(2^5n)})\\&\qquad = (q;q^2)_\infty (q^3;q^{6})_\infty (q^{8};q^{16})_\infty \prod _{n=1}^\infty (1-q^{20(2n-1)})(1-q^{2^3n\,\nu _2(2^6n)}) \\&\qquad = \cdots =\prod _{n=2}^\infty \big (q^{2^{n-3}n} ;q^{2^{n-2}n}\big )_\infty . \end{aligned}$$

Thus we deduce that

$$\begin{aligned} \sum _{n=0}^\infty \big ( Q_{\nu ,0}(n)-Q_{\nu ,1}(n)\big )\,q^n&= \left( \sum _{n=0}^\infty a(n)\,q^n \right) \left( \sum _{n=0}^\infty b(n)\,q^{4n} \right) \\&= \sum _{n=0}^\infty q^n \sum _{k=0}^{\lfloor n/4 \rfloor } b_k\,a_{n-4k}, \end{aligned}$$

where

$$\begin{aligned} \sum _{n=0}^\infty a(n)\,q^n = (q;q^2)_\infty \,(q^3;q^6)_\infty \end{aligned}$$

and

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

According to Theorems 12 and 13, for \(n\equiv \{2,3\}\pmod 4\) we have \(a(n) \equiv 0\pmod 2\). This concludes the proof. \(\square \)

6 Two Ramanujan–Kolberg type identities

Let a(n) be the sequence of integers considered in the proof of Theorem 11, i.e.,

$$\begin{aligned} \sum _{n=0}^\infty a(n)\,q^n = (q;q^2)_\infty \,(q^3;q^6)_\infty = \frac{(q;q)_\infty \,(q^3;q^3)_\infty }{(q^2;q^2)_\infty \,(q^6;q^6)_\infty }. \end{aligned}$$
(15)

We remark that (15) is McKay-Thompson series of class 36e for the Monster group [6, 7]. In this section, we investigate the parity of a(n). For brevity, \(f_a^b\) is defined by

$$\begin{aligned} f_a^b = (q^a;q^a)_\infty ^b. \end{aligned}$$

Theorem 12

For \(|q|<1\),

$$\begin{aligned} \sum _{n=0}^\infty a(4n+2)\,q^n&=2q \frac{f_1\,f_4\,f_6^8\,f_{24}^2}{f_2^6\,f_3^2\,f_{12}^4} +6q^2 \frac{f_1^2\,f_{4}^4\,f_6^2\,f_{24}^4}{f_2^6\,f_3\,f_8^2\,f_{12}^3} \\&\quad +8q^3\frac{f_1\,f_4\,f_6^5\,f_{24}^5}{f_2^5\,f_3^2\,f_8\,f_{12}^4} +8q^5\frac{f_1\,f_4\,f_6^2\,f_{24}^{8}}{f_2^4\,f_3^2\,f_8^2\,f_{12}^4}. \end{aligned}$$

Proof

Presently, such identity can be proven with computer algebra programs employing Radu’s Ramanujan–Kolberg algorithm [8]. We utilize the Mathematica package RaduRK developed by Nicolas Smoot [9], known for its user-friendly convenience. This package requires 4ti2, a software package for algebraic, geometric and combinatorial problems on linear spaces. We prepare it for application by following the installation instructions provided in [9] and then activate it in a Mathematica session using the following command:

$$\begin{aligned} {\texttt {<<RaduRK\text {`}}} \end{aligned}$$

Prior to executing the program, it is essential to establish the values of the two global key variables, q and t:

$$\begin{aligned} {\texttt {\{SetVar1[q],SetVar2[t]\}}} \end{aligned}$$

The algorithmic proof of our identity is achieved by executing the procedure call:

$$\begin{aligned} \texttt {RK[24,6,\{1,-1,1,-1\},4,2]} \end{aligned}$$

The package developed by Smoot provides the proof in the format:

$$\begin{aligned}&\begin{array}{c|c} \texttt {N:} &{} 24 \\ \hline \{\texttt {M,}(\texttt {r}_\delta )_{\delta |\texttt {M}}\}{} \texttt {:} &{} \{6,\{1,-1,1,-1\}\} \\ \hline \texttt {m:} &{} 4 \\ \hline \texttt {P}_{\texttt {m,r}}(\texttt {j})\texttt {:} &{} \{2\} \\ \hline \\ \texttt {f}_\texttt {1}(\texttt {q})\texttt {:} &{} \dfrac{(q^2;q^2)_\infty ^4 (q^3;q^3)_\infty ^2 (q^{8};q^{8})_\infty ^{2} (q^{12};q^{12})_\infty ^4}{q^5\, (q;q)_\infty (q^4;q^4)_\infty (q^6;q^6)_\infty ^2 (q^{24};q^{24})_\infty ^8} \\ \hline \\ \texttt {t:} &{} \dfrac{(q^6;q^6)_\infty ^3 (q^8;q^8)_\infty }{q^2\, (q^2;q^2)_\infty (q^{24};q^{24})_\infty ^3} \\ \hline \\ \texttt {AB:} &{} \big \{1,\dfrac{(q^6;q^6)_\infty ^3 (q^8;q^8)_\infty }{q^2\, (q^2;q^2)_\infty (q^{24};q^{24})_\infty ^3} + \dfrac{(q;q)_\infty (q^3;q^3)_\infty (q^{12};q^{12})_\infty (q^4;q^4)_\infty ^3 }{q^3\, (q^2;q^2)_\infty ^2 (q^{24};q^{24})_\infty ^4}\big \} \\ \hline \{\texttt {p}_\texttt {g}(\texttt {t})\texttt {:g}\in \texttt {AB}\}{} \texttt {:} &{} \left\{ 8+2 t+2t^2,6\right\} \\ \hline \texttt {Common Factor:} &{} 2 \\ \end{array} \end{aligned}$$

In accordance with [10], the output can be interpreted as follows:

  • The first parameter in the procedure call \(\texttt {RK[24,6,\{1,-1,1,-1\},4,2]}\) involves setting \(N = 24\), which fixes the space of modular functions the program will work with:

    $$\begin{aligned} M(\Gamma _0(N)):= \text {the algebra of modular functions for } \Gamma _0(N). \end{aligned}$$

    To explore the definitions of notions such as \(\Gamma _0(N)\) or \(M(\Gamma _0(N))\) and gain a comprehensive understanding of Radu’s Ramanujan–Kolberg algorithm, please refer to [11].

  • The assignment \(\{M,(r_\delta )_{\delta |M}\} = \{6,(1,-1, 1,-1)\}\) comes from the second and third entry of the procedure call \(\texttt {RK[24,6,\{1,-1,1,-1\},4,2]}\). This involves specifying \(M = 6\) and \((r_\delta )_{\delta |6} = (r_1, r_2, r_3, r_4) = (1, -1, 1,-1)\) such that

    $$\begin{aligned} \sum _{n=0}^\infty a(n)\, q^n = \prod _{\delta | \texttt {M}} (q^\delta ;q^\delta )_\infty ^{r_\delta } = \frac{(q;q)_\infty (q^3;q^3)_\infty }{(q^2;q^2)_\infty (q^6;q^6)_\infty }. \end{aligned}$$

    In the output expression \(P_{m,r}(j)\) the abbreviation \(r:= (r_\delta )_{\delta |M}\) is used; i.e., here \(r =(1,-1,1,-1)\).

  • The last two parameters in the procedure call \(\texttt {RK[24,6,\{1,-1,1,-1\},4,2]}\) correspond to the assignment \(m = 4\) and \(j = 2\). This indicates our focus on the generating function

    $$\begin{aligned} \sum _{n=0}^\infty a(mn+j) = \sum _{n=0}^\infty a(4n+2). \end{aligned}$$

    The parameters m and j are employed in the output expression \(P_{m,r}(j)\); specifically, in this instance, it can be expressed as \(P_{4,r}(2)\), where \(r = (1, -1, 1, -1)\).

  • The output \(P_{m,r}(j) = P_{4,(1,-1,1,-1)}(2) = \{2\}\) means that there exists an infinite product

    $$\begin{aligned} f_1(q)=\frac{(q^2;q^2)_\infty ^4 (q^3;q^3)_\infty ^2 (q^{8};q^{8})_\infty ^{2} (q^{12};q^{12})_\infty ^4}{q^5\, (q;q)_\infty (q^4;q^4)_\infty (q^6;q^6)_\infty ^2 (q^{24};q^{24})_\infty ^8} \end{aligned}$$

    such that

    $$\begin{aligned} f_1(q)\sum _{n=0}^\infty a(4n+2)\,q^n \in M(\Gamma _0(N)),\quad \text {with}\quad N=24. \end{aligned}$$
  • The output

    $$\begin{aligned}&t=\frac{(q^6;q^6)_\infty ^3 (q^8;q^8)_\infty }{q^2\, (q^2;q^2)_\infty (q^{24};q^{24})_\infty ^3},\nonumber \\&AB\!=\!\big \{1,\dfrac{(q^6;q^6)_\infty ^3 (q^8;q^8)_\infty }{q^2\, (q^2;q^2)_\infty (q^{24};q^{24})_\infty ^3} \!+\! \dfrac{(q;q)_\infty (q^3;q^3)_\infty (q^{12};q^{12})_\infty (q^4;q^4)_\infty ^3 }{q^3\, (q^2;q^2)_\infty ^2 (q^{24};q^{24})_\infty ^4}\big \},\nonumber \\&\{p_g(t):g\in AB\} = \left\{ 8+2 t+2t^2,6\right\} \end{aligned}$$
    (16)

    provides a solution to the following objective: find a modular function \(t \in M(\Gamma _0(N))\) and polynomials \(p_g(t)\) such that

    $$\begin{aligned} f_1(q)\sum _{n=0}^\infty a(4n+2)\,q^n = \sum _{g\in AB} p_g(t)\cdot g. \end{aligned}$$
    (17)

    Generally, the elements of the finite set AB form a \({\mathbb {C}}[t]\)-module basis of \(M(\Gamma _0(N))\), resp. of a large subspace of \(M(\Gamma _0(N))\). The elements g belonging to the set AB are \({\mathbb {C}}\)-linear combinations of modular functions in \(M(\Gamma _0(N))\) which are representable in infinite product form such as \(f_1(q)\) and t. In our case, the program delivers (16), which means

    $$\begin{aligned}&\frac{f_2^4\, f_3^2\, f_8^{2}\, f_{12}^4}{q^5 f_1 f_4 f_{24}^8} \sum _{n=0}^\infty a(4n+2)\,q^n\\&\quad = 8+2 \frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3} +2 \left( \frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3} \right) ^2 + 6 \left( \frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3} + \frac{f_1\, f_3\, f_4^3\, f_{12} }{q^3 f_2^2 f_{24}^4} \right) \\&\quad = 8+8 \frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3} +6 \frac{f_1\, f_3\, f_4^3\, f_{12} }{q^3 f_2^2 f_{24}^4} +2 \left( \frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3} \right) ^2. \end{aligned}$$

    This yields our identity on rearrangement.

\(\square \)

Theorem 13

For \(|q|<1\),

$$\begin{aligned} \sum _{n=0}^\infty a(4n+3)\,q^n&=-2 \frac{f_3^2\,f_4^5\,f_{24}^3}{f_1\,f_2\,f_6\,f_8^3\,f_{12}^4} +2q^2 \frac{f_3^2\,f_4^5\,f_{24}^6}{f_1\,f_6^4\,f_8^4\,f_{12}^4} \\&\quad -8q^3\frac{f_2^1\,f_3\,f_4^2\,f_{24}^7}{f_1^2\,f_6^1\,f_8^3\,f_{12}^5} +8q^5\frac{f_2^2\,f_3^1\,f_4^2\,f_{24}^{10}}{f_1^2\,f_6^4\,f_8^4\,f_{12}^5}. \end{aligned}$$

Proof

For the algorithmic proof of our identity, we again use Smoot’s package with

$$\begin{aligned} \texttt {RK[24,6,\{1,-1,1,-1\},4,3]} \end{aligned}$$

The package developed by Smoot provides the proof in the format:

$$\begin{aligned}&\begin{array}{c|c} \texttt {N:} &{} 24 \\ \hline \{\texttt {M,}(\texttt {r}_\delta )_{\delta |\texttt {M}}\}{} \texttt {:} &{} \{6,\{1,-1,1,-1\}\} \\ \hline \texttt {m:} &{} 4 \\ \hline \texttt {P}_{\texttt {m,r}}(\texttt {j})\texttt {:} &{} \{3\} \\ \hline \\ \texttt {f}_\texttt {1}(\texttt {q})\texttt {:} &{} \dfrac{(q;q)_\infty ^2 (q^6;q^6)_\infty ^4 (q^{8};q^{8})_\infty ^4 (q^{12};q^{12})_\infty ^5}{q^5\, (q^2;q^2)_\infty ^2 (q^3;q^3)_\infty (q^4;q^4)_\infty ^2 (q^{24};q^{24})_\infty ^{10}} \\ \hline \\ \texttt {t:} &{} \dfrac{(q^6;q^6)_\infty ^3 (q^8;q^8)_\infty }{q^2\, (q^2;q^2)_\infty (q^{24};q^{24})_\infty ^3} \\ \hline \\ \texttt {AB:} &{} \big \{1,\dfrac{(q^6;q^6)_\infty ^3 (q^8;q^8)_\infty }{q^2\, (q^2;q^2)_\infty (q^{24};q^{24})_\infty ^3} + \dfrac{(q;q)_\infty (q^3;q^3)_\infty (q^{12};q^{12})_\infty (q^4;q^4)_\infty ^3 }{q^3\, (q^2;q^2)_\infty ^2 (q^{24};q^{24})_\infty ^4}\big \} \\ \hline \{\texttt {p}_\texttt {g}(\texttt {t})\texttt {:g}\in \texttt {AB}\}{} \texttt {:} &{} \left\{ 8-10 t+2t^2,2-2t\right\} \\ \hline \texttt {Common Factor:} &{} 2 \\ \end{array} \end{aligned}$$

The interpretation of the output is quite similar to the interpretation in the previous theorem. So we omit the details. In this case, the program gives

$$\begin{aligned}&\frac{f_1^2\, f_6^4\, f_8^4\, f_{12}^{5}}{q^5 f_2^2\, f_3\, f_4^2\, f_{24}^{10}} \sum _{n=0}^\infty a(4n+3)\,q^n\\&\quad = 8-10 \frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3} +2 \left( \frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3} \right) ^2\\&\qquad + \left( \frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3} + \frac{f_1\, f_3\, f_4^3\, f_{12} }{q^3 f_2^2 f_{24}^4} \right) \left( 2-2\frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3} \right) \\&\quad =8-8 \frac{f_6^3\, f_8}{q^2\, f_2\, f_{24}^3}+2 \frac{f_1\, f_3\, f_4^3\, f_{12} }{q^3 f_2^2 f_{24}^4} -2\frac{f_1\,f_3\,f_4^3\,f_6^3\,f_8\,f_{12}}{q^5\, f_2^3\, f_{24}^7}, \end{aligned}$$

which yields our identity on rearrangement. \(\square \)

7 Concluding remarks and open problems

To study the truncated series arising from Euler’s pentagonal number theorem, Andrews and Merca [12] introduced the partition function \(M_k(n)\), which counts the number of partitions of n wherein k is the least integer that is not a part and there are more parts \(>k\) than there are \(<k\). For instance, we have \(M_3(18) = 3\) because the three partitions in question are

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

For every \(k \geqslant 1\), Andrews and Merca proved that \(M_k(n)\) is the coefficient of \(q^n\) in the series

$$\begin{aligned} (-1)^{k} \left( 1-\frac{1}{(q;q)_\infty } \sum _{n=1-k}^k (-1)^n\,q^{n(3n-1)/2}\right) . \end{aligned}$$

There is a substantial amount of numerical evidence to state the following conjecture.

Conjecture 14

For \(k\geqslant 1\), all the coefficients of the series

$$\begin{aligned} (-1)^{k} \left( 1-\frac{1}{(q;q)_\infty } \sum _{n=1-k}^k (-1)^n\,q^{n(3n-1)/2}\right) \prod _{n=1}^\infty (1-q^{2N_n}) \end{aligned}$$

are non-negative. The coefficient of \(q^n\) is positive if and only if \(n\geqslant k(3k+1)/2\).

An infinite family of linear inequalities involving the partition function \(p_\nu (n)\) can be derive as a combinatorial interpretation of Conjecture 14, if we take into account the generating functions of \(p_\nu (n)\) and \(Q_{\nu ,0}(n)-Q_{\nu ,1}(n)\).

Theorem 15

Assuming Conjecture 14, let k be a positive integer.

  1. 1.

    For n odd, we have

    $$\begin{aligned} (-1)^{k-1} \sum _{j=1-k}^k (-1)^j\, p_\nu \big (n-j(3j-1)/2 \big ) \geqslant 0, \end{aligned}$$

    with strict inequality if and only if \(n\geqslant k(3k+1)/2\).

  2. 2.

    For n even, we have

    $$\begin{aligned} (-1)^{k}\left( Q_{\nu ,0}(n/2)-Q_{\nu ,1}(n/2)- \sum _{j=1-k}^k (-1)^j\, p_\nu \big (n-j(3j-1)/2 \big ) \right) \geqslant 0, \end{aligned}$$

    with strict inequality if and only if \(n\geqslant k(3k+1)/2\).

Inspired by the work of Andrews and Merca, researchers have extensively examined truncations of the theta series in recent years. Studies in this area have been carried out by Ballantine, Merca, Passary, and Yee [13], Chan, Ho, and Mao [14], Chern [15], Guo and Zeng [16], Mao [17], Merca and Yee [18], Wang and Yee [19], Xia, Yee, and Zhao [20], Yao [21], and Yee [22]. More recently, Xia and Zhao [23] introduced a new truncated version of Euler’s pentagonal number theorem and defined \({\widetilde{P}}_k(n)\) to be the number of partitions of n in which every part \(\leqslant k\) appears at least once and the first part larger that k appears at least \(k + 1\) times. For example, \({\widetilde{P}}_2(17)=9\), and the partitions in question are:

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

For every \(k \geqslant 1\), Xia and Zao [23] proved that \({\widetilde{P}}_k(n)\) is the coefficient of \(q^n\) in the series

$$\begin{aligned} (-1)^{k-1} \left( 1-\frac{1}{(q;q)_\infty } \sum _{n=-k}^k (-1)^k\,q^{n(3n-1)/2}\right) . \end{aligned}$$

In analogy with Conjecture 14, we remark the following conjecture.

Conjecture 16

For \(k\geqslant 1\), all the coefficients of the series

$$\begin{aligned} (-1)^{k-1} \left( 1-\frac{1}{(q;q)_\infty } \sum _{n=-k}^k (-1)^k\,q^{n(3n-1)/2}\right) \prod _{n=1}^\infty (1-q^{2N_n}) \end{aligned}$$

are non-negative. The coefficient of \(q^n\) is positive if and only if \(n\geqslant (k+1)(3k+2)/2\).

The combinatorial interpretation of this conjecture reads as follow.

Theorem 17

Assuming Conjecture 16, let k be a positive integer.

  1. 1.

    For n odd, we have

    $$\begin{aligned} (-1)^{k} \sum _{j=-k}^k (-1)^j\, p_\nu \big (n-j(3j-1)/2 \big ) \geqslant 0, \end{aligned}$$

    with strict inequality if and only if \(n\geqslant (k+1)(3k+2)/2\).

  2. 2.

    For n even, we have

    $$\begin{aligned} (-1)^{k-1}\left( Q_{\nu ,0}(n/2)-Q_{\nu ,1}(n/2)- \sum _{j=-k}^k (-1)^j\, p_\nu \big (n-j(3j-1)/2 \big ) \right) \geqslant 0, \end{aligned}$$

    with strict inequality if and only if \(n\geqslant (k+1)(3k+2)/2\).