1 Introduction

For a complex number z, the sum of positive divisors functions \(\sigma _z^\pm (n)\) and \(\widetilde{\sigma }_z^{\pm }(n)\) are defined as the sum of the zth powers of the positive divisors of n as follows:

$$\begin{aligned}&\sigma _z^\pm (n) :=\sum _{d|n} (\pm 1)^{d+1} d^z, \\&\widetilde{\sigma }_{z}^{+}(n) := \sum _{d|n}(-1)^{n/d+1}\,d^z,\\&\widetilde{\sigma }_{z}^{-}(n) := \sum _{d|n}(-1)^{n/d+d}\,d^z. \end{aligned}$$

The origin of the functions \(\sigma _z^-(n)\) and \(\widetilde{\sigma }_{z}^{\pm }(n)\) goes back to Glaisher [6, 7]. In his paper [6], Glaisher defined seven quantities depending on the positive divisors of n and studied the relation among them. For example, the functions \(\sigma _z^-(n)\) and \(\widetilde{\sigma }_{z}^{+}(n)\) can be expressed in terms of \(\sigma _z^+(n)\) as follows [6]:

$$\begin{aligned}&\sigma _z^-(n) = \sigma _z^+(n)-2^{z+1}\,\sigma _z^+(n/2),\\&\widetilde{\sigma }_{z}^{+}(n) = \sigma _z^+(n)-2\,\sigma _z^+(n/2), \end{aligned}$$

where \(\sigma _z^+(n)=0\) when n is not a positive integer.

In elementary multiplicative number theory it is well known that one can compute \(\sigma _z^+(n)\) without having to write down all the positive divisors of n. To do this, one can use a formula which is obtained by summing a geometric series. This formula implies knowing the factorization of n. If we write

$$\begin{aligned} n=\prod _{i=1}^{\omega (n)} p_i^{e_i}, \end{aligned}$$

where \(\omega (n)\) is the number of distinct prime factors of n, \(p_i\) is the ith prime factor, and \(e_i\) is the maximum power of \(p_i\) by which n is divisible, then we have

$$\begin{aligned} \sigma _{z}^+(n)=\prod _{i=1}^{\omega (n)}\left( 1+p_i^z+p_i^{2z}+\cdots +p_i^{e_iz}\right) . \end{aligned}$$

A composition of a positive integer n is a sequence \(\lambda =(\lambda _1,\lambda _2,\ldots ,\lambda _k)\) of positive integers whose sum is n, i.e.,

$$\begin{aligned} n=\lambda _1+\lambda _2+\cdots +\lambda _k. \end{aligned}$$
(1)

The positive integers in the sequence are called parts [2]. When the order of integers \(\lambda _i\) does not matter, the representation (1) is known as an integer partition and can be rewritten as

$$\begin{aligned} n=t_1+2t_2+\cdots +nt_n, \end{aligned}$$

where each positive integer i appears \(t_i\) times in the partition. As usual, we denote by p(n) the number of integer partitions of n, i.e.,

$$\begin{aligned} p(n):= \sum _{t_1+2t_2+\cdots +nt_n=n} 1. \end{aligned}$$

For consistency, a partition of n will be written with the summands in nonincreasing order. For example, the following are the partitions of 5:

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

so \(p(5)=7\). For convenience, we define \(p(0)=1\).

It is well-known (cf. [8, p. 231]) that logarithmic differentiation of the generating function for p(n),

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

yields

$$\begin{aligned} \sum _{n=1}^\infty n\,p(n)\, q^n = \frac{1}{(q;q)_\infty } \sum _{n=1}^\infty \frac{n\, q^n}{1-q^n}= \frac{1}{(q;q)_\infty } \sum _{n=1}^\infty \sigma _1^+(n)\, q^n. \end{aligned}$$

This in turn via the Euler’s pentagonal number theorem

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

gives a way to evaluate \(\sigma _1^+(n)\) that does not involve knowing the divisors of n:

$$\begin{aligned} \sigma _1^+(n)=\sum _{j=-\infty }^\infty (-1)^j\, \big (n-j(3j-1)/2\big )\, p\big (n-j(3j-1)/2\big ). \end{aligned}$$
(5)

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

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

Because the infinite product \((a;q)_{\infty }\) diverges when \(a\ne 0\) and \(|q| \geqslant 1\), whenever \((a;q)_{\infty }\) appears in a formula, we shall assume \(|q| < 1\).

Upon reflection, one expects that there might be an infinite family of decompositions of \(\sigma _z^{\pm }(n)\) where (5) is a very special case.

Theorem 1.1

Let z be a complex number. For any positive integers m and n,

$$\begin{aligned} \sigma _z^{\pm }(n) = \sum _{j=-\infty }^\infty (-1)^j\, a_{m,z}^{\pm }\big (m\,n-j(3j-1)/2\big ), \end{aligned}$$

where

$$\begin{aligned} a_{m,z}^\pm (n):=\sum _{t_1+2t_2+\cdots +nt_n=n} (t_m\pm 2^z\,t_{2m}+{3^z\,}t_{3m}\pm \cdots ). \end{aligned}$$

If \(n\not \equiv 0\pmod m\), then the number \(a_{m,z}^\pm (n)\) satisfies Euler’s recurrence relation for the partition function p(n),

$$\begin{aligned} \sum _{j=-\infty }^\infty (-1)^j\, a_{m,z}^{\pm }\big (n-j(3j-1)/2\big ) = 0. \end{aligned}$$

Clearly, \(m^z\cdot a_{m,z}^+(n)\) is the sum of the zth powers of the parts \(\equiv 0\pmod m\) in all the partitions of n, while \(m^z\cdot a_{m,z}^-(n)\) is the difference between the sum of the zth powers of the parts \(\equiv m\pmod {2m}\) and the sum of the zth powers of the parts \(\equiv 0\pmod {2m}\) in all the partitions of n.

In analogy to Theorem 1.1, we have the following result involving \(\widetilde{\sigma }_z^{\pm }(n)\).

Theorem 1.2

Let z be a complex number. For any positive integers m and n,

$$\begin{aligned} \widetilde{\sigma }_z^{\pm }(n) = \sum _{j=-\infty }^\infty (-1)^j\, \widetilde{a}_{m,z}^{\pm }\big (m\,n-j(3j-1)/2\big ), \end{aligned}$$

where

$$\begin{aligned} \widetilde{a}_{m,z}^{\pm }(n):= a_{m,z}^{\pm }(n) - 2\,a_{2m,z}^{\pm }(n). \end{aligned}$$

If \(n\not \equiv 0\pmod m\), then the number \(\widetilde{a}_{m,z}^{\pm }(n)\) satisfies Euler’s recurrence relation for the partition function p(n),

$$\begin{aligned} \sum _{j=-\infty }^\infty (-1)^j\, \widetilde{a}_{m,z}^{\pm }\big (n-j(3j-1)/2\big ) = 0. \end{aligned}$$

When n is odd, we have \(\sigma _{z}^{+}(n)=\sigma _{z}^{-}(n)=\widetilde{\sigma }_{z}^{+}(n)=\widetilde{\sigma }_{z}^{-}(n)\). In this case Theorems 1.1 and 1.2 provide four infinite families of decompositions of \(\sum _{d|n} d^z\). For example, the cases \(z=1\), \(n=3\) and \(m=1,2,3\) of Theorem 1.1 read as follows:

$$\begin{aligned} 1+3&= a_{1,1}^+(3) - a_{1,1}^+(2) - a_{1,1}^+(1) = 9-4-1 = 4\\&= {a_{2,1}^+(6)} - {a_{2,1}^+(5)} - {a_{2,1}^+(4)} = 15-6-5 = 4\\&= {a_{3,1}^+(9)} - {a_{3,1}^+(8)} - {a_{3,1}^+(7)} + {a_{3,1}^+(4)} = 24-13-8+1 = 4 \end{aligned}$$

and

$$\begin{aligned} 1+3&= a_{1,1}^-(3) - a_{1,1}^-(2) - a_{1,1}^-(1) = 5-0-1 = 4\\&= {a_{2,1}^-(6)} - {a_{2,1}^-(5)} - {a_{2,1}^-(4)} = 7-2-1 = 4\\&= {a_{3,1}^-(9)} - {a_{3,1}^-(8)} - {a_{3,1}^-(7)} + {a_{3,1}^-(4)} = 12-5-4+1 = 4. \end{aligned}$$

The cases \(z=1\), \(n=3\) and \(m=1,2,3\) of Theorem 1.2 read as follows:

$$\begin{aligned} 1+3&= \widetilde{a}_{1,1}^{+}(3) - \widetilde{a}_{1,1}^{+}(2) - \widetilde{a}_{1,1}^{+}(1) = 7-2-1 = 4\\&= \widetilde{a}_{2,1}^{+}(6) - \widetilde{a}_{2,1}^{+}(5) - \widetilde{a}_{2,1}^{+}(4) = 11-4-3 = 4\\&= \widetilde{a}_{3,1}^{+}(9) - \widetilde{a}_{3,1}^{+}(8) - \widetilde{a}_{3,1}^{+}(7) + \widetilde{a}_{3,1}^{+}(4) = 18-9-6+1 = 4 \end{aligned}$$

and

$$\begin{aligned} 1+3&= \widetilde{a}_{1,1}^{-}(3) - \widetilde{a}_{1,1}^{-}(2) -\widetilde{a}_{1,1}^{-}(1) = 3-(-2)-1 = 4\\&= \widetilde{a}_{2,1}^{-}(6) - \widetilde{a}_{2,1}^{-}(5) - \widetilde{a}_{2,1}^{-}(4) = 3-0-(-1) = 4\\&= \widetilde{a}_{3,1}^{-}(9) - \widetilde{a}_{3,1}^{-}(8) - \widetilde{a}_{3,1}^{-}(7) + \widetilde{a}_{3,1}^{-}(4) = 6-1-2+1 = 4. \end{aligned}$$

As can be seen, \(a_{m,z}^{\pm }(n)\) is a sum over the partitions of n which contain at least one part congruent to 0 modulo m. In this context, the following result introduces new interpretations for \(a_{m,z}^{\pm }(n)\).

Theorem 1.3

Let z be a complex number. For any positive integers m and n, we have:

$$\begin{aligned}&a_{m,z}^{\pm }(n) = \sum _{t_1+2t_2+\cdots +nt_n=n} \left( \left\lfloor \frac{t_1}{m} \right\rfloor \pm 2^z\left\lfloor \frac{t_2}{m} \right\rfloor +\cdots +(\pm 1)^{n+1}\, n^z \left\lfloor \frac{t_n}{m} \right\rfloor \right) \end{aligned}$$

and

$$\begin{aligned}&a_{m,z}^{\pm }(n) = \sum _{t_1+2t_2+\cdots +nt_n=n} \left( \left\lfloor \frac{t_1}{m} \right\rfloor \pm 2^z\left\lfloor \frac{t_1}{2m} \right\rfloor +\cdots +(\pm 1)^{n+1}\, n^z \left\lfloor \frac{t_1}{n\,m} \right\rfloor \right) . \end{aligned}$$

In the first equation of Theorem 1.3, \(a_{m,z}^{\pm }(n)\) is a sum over the partitions of n which contain at least one part with multiplicity greater than or equal to m. In the second equation of Theorem 1.3, \(a_{m,z}^{\pm }(n)\) is a sum over the partitions of n in which the multiplicity of 1 is greater than or equal to m. By the second equation, we easily deduce that \(a_{m,z}^{\pm }(n)\) can be written as a sum over all the partitions of \(n-m\).

Corollary 1.4

Let z be a complex number. For any positive integers m and n,

$$\begin{aligned} \quad a_{m,z}^{\pm }(n) = \sum _{t_1+2t_2+\cdots +kt_{k}=k} \sum _{j=1}^{1+\lfloor t_1/m \rfloor } (\pm 1)^{j+1}\, j^z \left\lfloor \frac{m+t_1}{j\,m} \right\rfloor , \end{aligned}$$

where \(k=n-m\).

For example, by (2) we see that \(2\,a_{2,1}^+(5)\), the sum of the even parts in all the partitions of 5, is

$$\begin{aligned} 4+2+2+2+2=12. \end{aligned}$$

According to Corollary 1.4, we can compute \(a_{2,1}^+(5)\) considering the multiplicity of 1 in all the partitions of 3:

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

We can write:

$$\begin{aligned} a_{2,1}^+(5)&= \left\lfloor \frac{2+0}{2} \right\rfloor + \left\lfloor \frac{2+1}{2} \right\rfloor + \left( \left\lfloor \frac{2+3}{2} \right\rfloor + 2\left\lfloor \frac{2+3}{4} \right\rfloor \right) = 6. \end{aligned}$$

For a non-negative integer n we denote by \(n_2\) the residue of n modulo 2. Let t be a non-negative integer and let m be a positive integer. It is not difficult to prove that

$$\begin{aligned} \left\lfloor \frac{t}{m} \right\rfloor -2\left\lfloor \frac{t}{2m}\right\rfloor = \left\lfloor \frac{t}{m} \right\rfloor _2. \end{aligned}$$

By Theorem 1.3, we easily derive the following interpretations for \(\widetilde{a}_{m,z}^{\pm }(n)\).

Corollary 1.5

Let z be a complex number and let n be a positive integer. Then

$$\begin{aligned}&\widetilde{a}_{m,z}^{\pm }(n) = \sum _{t_1+2t_2+\cdots +nt_n=n} \left( \left\lfloor \frac{t_1}{m} \right\rfloor _2 \pm 2^z\left\lfloor \frac{t_2}{m} \right\rfloor _2 +\cdots +(\pm 1)^{n+1}\, n^z \left\lfloor \frac{t_n}{m} \right\rfloor _2 \right) \end{aligned}$$

and

$$\begin{aligned}&\widetilde{a}_{m,z}^{\pm }(n) = \sum _{t_1+2t_2+\cdots +nt_n=n} \left( \left\lfloor \frac{t_1}{m} \right\rfloor _2 \pm 2^z\left\lfloor \frac{t_1}{2m} \right\rfloor _2 +\cdots +(\pm 1)^{n+1}\, n^z \left\lfloor \frac{t_1}{n\,m} \right\rfloor _2\right) . \end{aligned}$$

In analogy to Corollary 1.4, we have the following result.

Corollary 1.6

Let z be a complex number. For any positive integers m and n,

$$\begin{aligned} \widetilde{a}_{m,z}^{\pm }(n) = \sum _{t_1+2t_2+\cdots +kt_{k}=k} \sum _{j=1}^{1+\lfloor t_1/m \rfloor } (\pm 1)^{j+1}\, j^z \left\lfloor \frac{m+t_1}{j\,m} \right\rfloor _2, \end{aligned}$$

where \(k=n-m\).

Definition 1

Let z be a complex number. For two positive integers m and n, we define:

  1. 1.

    \(a_{m,z,e}^+(n)\) to be the sum of the zth powers of parts \(\equiv 0 \pmod m\) in all the partitions of n with an even number of parts \(\equiv 0 \pmod m\);

  2. 2.

    \(a_{m,z,o}^+(n)\) to be the sum of the zth powers of parts \(\equiv 0 \pmod m\) in all the partitions of n with an odd number of parts \(\equiv 0 \pmod m\);

  3. 3.

    \(a_{m,z,e}^-(n)\) to be the difference between the sum of the zth powers of parts \(\equiv m\pmod {2m}\) and the sum of the zth powers of parts \(\equiv 0\pmod {2m}\) in all the partitions of n with an even number of parts \(\equiv 0\pmod {m}\);

  4. 4.

    \(a_{m,z,o}^-(n)\) to be the difference between the sum of the zth powers of parts \(\equiv m\pmod {2m}\) and the sum of the zth powers of parts \(\equiv 0\pmod {2m}\) in all the partitions of n with an odd number of parts \(\equiv 0\pmod {m}\);

  5. 5.

    \(b_{m,z}^\pm (n):= a_{m,z,e}^\pm (n) - a_{m,z,o}^\pm (n)\).

It is clear that

$$\begin{aligned} a_{m,z}^\pm (n)= a_{m,z,e}^\pm (n) + a_{m,z,o}^\pm (n) \end{aligned}$$

and

$$\begin{aligned} b_{m,z}^\pm (n) = \sum _{t_1+2t_2+\cdots +nt_n=n} (-1)^{t_m+t_{2m}+t_{3m}+\cdots }\, (t_m\pm 2^zt_{2m}+3^zt_{3m}\pm \cdots ). \end{aligned}$$

In analogy to Theorem 1.3, we remark the following interpretation for \(b_{m,z}^\pm (n)\).

Theorem 1.7

Let z be a complex number and let m and n be positive integers. Then

$$\begin{aligned} b_{m,z}^\pm (n) = \sum _{t_1+2t_2+\cdots +nt_n=n} (-1)^{\left\lfloor \frac{t_1}{m} \right\rfloor +\cdots +\left\lfloor \frac{t_n}{m} \right\rfloor } \left( \left\lfloor \frac{t_1}{m} \right\rfloor +\cdots +(\pm 1)^{n+1} n^z \left\lfloor \frac{t_n}{m} \right\rfloor \right) . \end{aligned}$$

The following result shows that the partition function \(b_{m,z}^\pm (n)\) is closely related to \(\widetilde{a}_{m,z}^{\pm }(n)\).

Theorem 1.8

Let z be a complex number and let m and n be positive integers. Then

$$\begin{aligned} b_{m,z}^\pm (n) = \sum _{k=-\infty }^\infty (-1)^{k+1}\,\widetilde{a}_{m,z}^{\pm }\left( n-m\,k^2 \right) . \end{aligned}$$

The remainder of the paper is organized as follows. In Sect. 2, we will prove Theorems 1.1 and 1.2. Theorems 1.3, 1.7 and 1.8 will be proved in Sects. 46. Our proof of these theorems relies on generating functions. Combinatorial proofs of these theorems would be very interesting. In the last section, we will present a collection of Ramanujan-type congruences for \(a_{m,1}^+(n)\) and seven congruence identities involving Euler’s partition function p(n). These were experimentally discovered and remain open problems.

2 Proof of Theorems 1.1 and 1.2

It is well known that the generating functions for \(\sigma _z^{\pm }(n)\) and \(\widetilde{\sigma }_z^{\pm }(n)\) are given by

$$\begin{aligned} \sum _{n=0}^\infty \sigma _z^{\pm }(n)\,q^n = \sum _{n=1}^\infty (\pm 1)^{n+1}\,\frac{n^z\,q^n}{1- q^n} \end{aligned}$$
(6)

and

$$\begin{aligned} \sum _{n=0}^\infty \widetilde{\sigma }_z^{\pm }(n)\,q^n = \sum _{n=1}^\infty (\pm 1)^{n+1}\,\frac{n^z\,q^n}{1+q^n}. \end{aligned}$$
(7)

More details can be found in [6, 7]. To obtain the generating functions for \(a_{m,z}^\pm (n)\) and \(\widetilde{a}_{m,z}^{\pm }(n)\), we can write:

$$\begin{aligned} \sum _{n=0}^\infty a_{m,z}^\pm (n)\,q^n&= \sum _{n=0}^\infty q^n \sum _{t_1+2t_2+\cdots +nt_n=n} (t_{m}\pm 2^z\,t_{2m}+3^z\,t_{3m}\pm \cdots ) \nonumber \\&= \sum _{i=1}^\infty \sum _{t_1,t_2,t_3,\ldots \geqslant 0} (\pm 1)^{i+1}\,i^z\,t_{im}\, q^{t_1+2t_2+3t_3+\cdots } \nonumber \\&= \sum _{i=1}^\infty \left( \prod _{\begin{array}{c} j=1\\ j\ne im \end{array}}^\infty \sum _{t_{j}\geqslant 0} q^{j\, t_{j}} \right) \sum _{t_{im} \geqslant 0} (\pm 1)^{i+1}\,i^z\,t_{im}\, q^{im\,t_{im}} \nonumber \\&= \sum _{i=1}^\infty \left( \prod _{\begin{array}{c} j=1\\ j\ne im \end{array}}^\infty \frac{1}{1-q^{j}} \right) \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{(1- q^{im})^2} \nonumber \\&= \frac{1}{(q;q)_\infty } \sum _{i=1}^\infty \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{1-q^{im}} \end{aligned}$$
(8)

and

$$\begin{aligned} \sum _{n=0}^\infty \widetilde{a}_{m,z}^{\pm }(n)\,q^n&= \sum _{n=0}^\infty a_{m,z}^{\pm }(n)\,q^n - 2\sum _{n=0}^\infty a_{2m,z}^{\pm }(n)\,q^n \nonumber \\&= \frac{1}{(q;q)_\infty } \sum _{i=1}^\infty (\pm 1)^{i+1}\,i^z \left( \frac{q^{im}}{1-q^{im}} - \frac{2\,q^{2im}}{1-q^{2im}} \right) \nonumber \\&= \frac{1}{(q;q)_\infty } \sum _{i=1}^\infty (\pm 1)^{i+1}\,i^z \frac{q^{im}}{1+q^{im}}. \end{aligned}$$
(9)

By (6) and (7), with q replaced by \(q^m\), we have:

$$\begin{aligned} \sum _{n=0}^\infty \sigma _z^{\pm }(n)\,q^{mn}&= \sum _{n=1}^\infty (\pm 1)^{n+1}\,\frac{n^z\,q^{mn}}{1- q^{mn}} \nonumber \\&= (q;q)_\infty \sum _{n=0}^\infty a_{m,z}^\pm (n)\,q^n \\&= \left( \sum _{n=-\infty }^\infty (-1)^n\, q^{n(3n-1)/2}\right) \left( \sum _{n=0}^\infty a_{m,z}^\pm (n)\,q^n \right) \end{aligned}$$

and

$$\begin{aligned} \sum _{n=0}^\infty \widetilde{\sigma }_z^{\pm }(n)\,q^{mn}&= \sum _{n=1}^\infty (\pm 1)^{n+1}\,\frac{n^z\,q^{mn}}{1+ q^{mn}} \nonumber \\&= (q;q)_\infty \sum _{n=0}^\infty \widetilde{a}_{m,z}^{\pm }(n)\,q^n \\&= \left( \sum _{n=-\infty }^\infty (-1)^n\, q^{n(3n-1)/2}\right) \left( \sum _{n=0}^\infty \widetilde{a}_{m,z}^{\pm }(n)\,q^n \right) , \end{aligned}$$

where we have invoked (8), (9) and Euler’s pentagonal number theorem (4). The proof follows easily considering Cauchy’s multiplication of two power series.

3 Truncated forms of Theorems 1.1 and 1.2

While investigating a truncated form of Euler’s pentagonal number theorem (4), Andrews and Merca [3] introduced the partition function \(M_k(n)\), which counts the number of partitions of n where k is the least positive integer that is not a part and there are more parts \(>k\) than there are parts \(<k\). For example, we have \(M_3(18)=3\) because the three partitions in question are

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

Recently, Xia and Zhao [9] introduced a new truncated version of Euler’s pentagonal number theorem (4) 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}$$

We consider the partition functions \(M_k(n)\) and \(\widetilde{P}_k(n)\) in order to show that Theorems 1.1 and 1.2 are limiting cases of more general results.

Theorem 3.1

Let z be a complex number. For any positive integers k, m and n, we have:

$$\begin{aligned} \sigma _{z}^{\pm }\left( \frac{n}{m} \right) - \sum \limits _{j=1-k}^k (-1)^j\, a_{m,z}^{\pm }\big (n-j(3j-1)/2\big ) = (-1)^k \sum \limits _{j=1}^{\lfloor n/m \rfloor } \sigma _{z}^{\pm }(j)\, M_k(n-jm) \end{aligned}$$

and

$$\begin{aligned} \sigma _{z}^{\pm }\left( \frac{n}{m} \right) - \sum \limits _{j=-k}^k (-1)^j\, a_{m,z}^{\pm }\big (n-j(3j-1)/2\big ) = (-1)^{k-1} \sum \limits _{j=1}^{\lfloor n/m \rfloor } \sigma _{z}^{\pm }(j)\, \widetilde{P}_k(n-jm), \end{aligned}$$

where \(\sigma _{z}^{\pm }(x)=0\) when x is not a positive integer.

Proof

In [3], Andrews and Merca considered Euler’s pentagonal number theorem (4) and they proved the following truncated form: For any \(k\geqslant 1\),

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

where

$$\begin{aligned} \begin{bmatrix} n\\ k \end{bmatrix} = {\left\{ \begin{array}{ll} \dfrac{(q;q)_n}{(q;q)_k(q;q)_{n-k}}, &{} \quad \text {if}\,0\leqslant k\leqslant n,\\ 0, &{}\quad \text {otherwise.} \end{array}\right. } \end{aligned}$$

We note that the series on the right hand side of (10) is the generating function for \(M_k(n)\), i.e.,

$$\begin{aligned} \sum _{n=0}^\infty M_k(n)\, q^n = \sum _{n=k}^\infty \frac{q^{{k\atopwithdelims ()2}+(k+1)n}}{(q;q)_n} \begin{bmatrix} n-1\\ k-1 \end{bmatrix}. \end{aligned}$$
(11)

Multiplying both sides of (10) by

$$\begin{aligned} \sum _{n=1}^\infty \frac{(\pm 1)^{n+1}\,n^z\,q^{mn}}{1-q^{mn}} = \sum _{n=1}^\infty \sigma _{z}^{\pm }(n)\, q^{mn}, \end{aligned}$$
(12)

we obtain

$$\begin{aligned}&\left( \sum _{n=1}^\infty a_{m,z}^{\pm }(n)\, q^n \right) \left( \sum _{n=1-k}^k (-1)^n\, q^{n(3n-1)/2} \right) - \sum _{n=1}^\infty \sigma _{z}^{\pm }(n)\, q^{mn} \\&\qquad = (-1)^{k-1} \left( \sum _{n=1}^\infty \sigma _{z}^{\pm }(n)\, q^{mn} \right) \left( \sum _{n=0}^\infty M_k(n)\, q^n\right) \end{aligned}$$

The proof of the first identity follows easily considering Cauchy’s multiplication of two power series.

The proof of the second identity is quite similar to the proof of the first identity. In [9], Xia and Zhao considered Euler’s pentagonal number theorem (4) and proved the following truncated form:

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

Multiplying both sides of (13) by (12), we obtain

$$\begin{aligned}&\left( \sum _{n=1}^\infty a_{m,z}^{\pm }(n)\, q^n \right) \left( \sum _{n=-k}^{k} (-1)^{n}\, q^{n(3n-1)/2}\right) -\sum _{n=0}^\infty \sigma _{z}^\pm (n)\,q^{mn} \\&\qquad = (-1)^{k} \left( \sum _{n=0}^\infty \sigma _{z}^\pm (n)\,q^{mn} \right) \left( \sum _{n=0}^\infty \widetilde{P}_k(n)\,q^n\right) , \end{aligned}$$

where we have invoked the generating function for \(\widetilde{P}_k(n)\) [9],

$$\begin{aligned} \sum _{n=0}^\infty \widetilde{P}_k(n)\, q^n = \frac{q^{k(k+1)/2}}{(q;q)_k} \sum _{n=0}^\infty \frac{q^{(n+k+1)(k+1)}}{(q^{n+k+1};q)_\infty }. \end{aligned}$$
(14)

The proof of the second identity follows easily considering Cauchy’s multiplication of two power series. \(\square \)

Two infinite families of linear inequalities involving \(a_{m,z}^+(n)\) can be easily obtained as an immediate consequence of Theorem 3.1 when z is a real number.

Corollary 3.2

Let z be a real number. For any positive integers k, m and n, we have:

$$\begin{aligned} (-1)^k\left( \sigma _{z}^{+}\left( \frac{n}{m} \right) - \sum \limits _{j=1-k}^k (-1)^j\, a_{m,z}^{+}\big (n-j(3j-1)/2\big ) \right) \geqslant 0 \end{aligned}$$

and

$$\begin{aligned} (-1)^{k}\left( \sigma _{z}^{+}\left( \frac{n}{m} \right) - \sum \limits _{j=-k}^k (-1)^j\, a_{m,z}^{+}\big (n-j(3j-1)/2\big ) \right) \leqslant 0, \end{aligned}$$

where \(\sigma _{z}^{+}(x)=0\) when x is not a positive integer.

As a consequence of this corollary, we remark the following infinite family of double inequalities.

Corollary 3.3

Let z be a real number. For any positive integers k, m and n, we have:

$$\begin{aligned}&(-1)^k \sum \limits _{j=1-k}^k (-1)^j\, a_{m,z}^{+}\big (m\,n-j(3j-1)/2\big ) \leqslant (-1)^k \, \sigma _{z}^{+}\left( n\right) \\&\qquad \qquad \leqslant (-1)^k \sum \limits _{j=-k}^k (-1)^j\, a_{m,z}^{+}\big (m\,n-j(3j-1)/2\big ). \end{aligned}$$

In analogy to Theorem 3.1 and Corollary 3.2, we have the following results involving \(\widetilde{\alpha }_{m,z}^{\pm }(n)\).

Theorem 3.4

Let z be a complex number. For any positive integers k, m and n, we have:

$$\begin{aligned} \widetilde{\sigma }_{z}^{\pm }\left( \frac{n}{m} \right) - \sum \limits _{j=1-k}^k (-1)^j\, \widetilde{a}_{m,z}^{\pm }\big (n-j(3j-1)/2\big ) = (-1)^k \sum \limits _{j=1}^{\lfloor n/m \rfloor } \widetilde{\sigma }_{z}^{\pm }(j)\, M_k(n-jm) \end{aligned}$$

and

$$\begin{aligned} \widetilde{\sigma }_{z}^{\pm }\left( \frac{n}{m} \right) - \sum \limits _{j=-k}^k (-1)^j\, \widetilde{a}_{m,z}^{\pm }\big (n-j(3j-1)/2\big ) = (-1)^{k-1} \sum \limits _{j=1}^{\lfloor n/m \rfloor } \widetilde{\sigma }_{z}^{\pm }(j)\, \widetilde{P}_k(n-jm), \end{aligned}$$

where \(\widetilde{\sigma }_{z}^{\pm }(x)=0\) when x is not a positive integer.

Proof

The proof is quite similar to the proof of Theorem 3.1, so we omit the details. \(\square \)

Corollary 3.5

Let z be a real number. For any positive integers k, m and n, we have:

$$\begin{aligned} (-1)^k\left( \widetilde{\sigma }_{z}^{+}\left( \frac{n}{m} \right) - \sum \limits _{j=1-k}^k (-1)^j\, \widetilde{a}_{m,z}^{+}\big (n-j(3j-1)/2\big ) \right) \geqslant 0 \end{aligned}$$

and

$$\begin{aligned} (-1)^{k}\left( \widetilde{\sigma }_{z}^{+}\left( \frac{n}{m} \right) - \sum \limits _{j=-k}^k (-1)^j\, \widetilde{a}_{m,z}^{+}\big (n-j(3j-1)/2\big ) \right) \leqslant 0, \end{aligned}$$

where \(\widetilde{\sigma }_{z}^{+}(x)=0\) when x is not a positive integer.

As a consequence of this corollary, we remark the following infinite family of double inequalities.

Corollary 3.6

Let z be a real number. For any positive integers k, m and n, we have:

$$\begin{aligned}&(-1)^k \sum \limits _{j=1-k}^k (-1)^j\, \widetilde{a}_{m,z}^{+}\big (m\,n-j(3j-1)/2\big ) \leqslant (-1)^k \, \widetilde{\sigma }_{z}^{+}\left( n\right) \\&\qquad \qquad \leqslant (-1)^k \sum \limits _{j=-k}^k (-1)^j\, \widetilde{a}_{m,z}^{+}\big (m\,n-j(3j-1)/2\big ). \end{aligned}$$

4 Proof of Theorems 1.3

By (8), we see that the expression of the generating function for the left-hand side of our identity is

$$\begin{aligned} LHS&= \sum _{n=0}^\infty q^n \sum _{t_1+2t_2+\cdots +nt_n=n} (t_{m}\pm 2^zt_{2m}+3^zt_{3m}\pm \cdots )\\&= \frac{1}{(q;q)_\infty } \sum _{i=1}^\infty \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{1-q^{im}}. \end{aligned}$$

To obtain the generating function for the right-hand side of the first identity, we can write:

$$\begin{aligned} RHS_1&=\sum _{n=0}^\infty q^n \sum _{t_1+2t_2+\cdots +nt_n=n} \left( \left\lfloor \frac{t_1}{m} \right\rfloor \pm 2^z\left\lfloor \frac{t_2}{m} \right\rfloor +\cdots +(\pm 1)^{n+1}\, n^z\left\lfloor \frac{t_n}{m} \right\rfloor \right) \\&= \sum _{i=1}^\infty \sum _{t_1,t_2,t_3,\ldots \geqslant 0} (\pm 1)^{i+1}\,i^z \left\lfloor \frac{t_i}{m} \right\rfloor q^{t_1+2t_2+3t_3+\cdots }\\&= \sum _{i=1}^\infty \left( \prod _{\begin{array}{c} j=1\\ j\ne i \end{array}}^\infty \sum _{t_j\geqslant 0} q^{jt_j} \right) \sum _{t_i\geqslant 0} (\pm 1)^{i+1}\,i^z \left\lfloor \frac{t_i}{m} \right\rfloor q^{it_i}. \end{aligned}$$

Considering that

$$\begin{aligned} \sum _{t_i\geqslant 0} \left\lfloor \frac{t_i}{m} \right\rfloor q^{it_i}&= \sum _{t_i\geqslant 0} t_i (q^{i(m\,t_i+0)}+q^{i(m\,t_i+1)}+\cdots +q^{i(m\,t_i+m-1)})\\&= (1+q^i+q^{2i}+\cdots +q^{i(m-1)}) \sum _{t_i\geqslant 0} t_i\,q^{mt_i}\\&= \frac{1-q^{im}}{1-q^i} \frac{q^{im}}{(1-q^{im})^2}\\&= \frac{q^{im}}{(1-q^i)(1-q^{im})}, \end{aligned}$$

we obtain

$$\begin{aligned}&RHS_1 = \frac{1}{(q;q)_\infty } \sum _{i=1}^\infty (1-q^i) \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{(1-q^i)(1-q^{im})} = \frac{1}{(q;q)_\infty } \sum _{i=1}^\infty \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{1-q^{im}} \end{aligned}$$

and the first identity is proved.

To obtain the generating function for the right-hand side of the second identity, we can write:

$$\begin{aligned} RHS_2&=\sum _{n=0}^\infty q^n \sum _{t_1+2t_2+\cdots +nt_n=n} \left( \left\lfloor \frac{t_1}{m} \right\rfloor \pm 2^z\left\lfloor \frac{t_1}{2m} \right\rfloor +\cdots +(\pm 1)^{n+1}\, n^z\left\lfloor \frac{t_1}{n\,m} \right\rfloor \right) \\&= \sum _{i=1}^\infty \sum _{t_1,t_2,t_3,\ldots \geqslant 0} (\pm 1)^{i+1}\,i^z \left\lfloor \frac{t_1}{i\,m} \right\rfloor q^{t_1+2t_2+3t_3+\cdots }\\&= \sum _{i=1}^\infty \left( \prod _{j=2}^\infty \sum _{t_j\geqslant 0} q^{jt_j} \right) \sum _{t_1\geqslant 0} (\pm 1)^{i+1}\,i^z \left\lfloor \frac{t_1}{i\,m} \right\rfloor q^{t_1}\\&= \frac{1-q}{(q;q)_\infty } \sum _{i=1}^\infty (\pm 1)^{i+1}\,i^z \sum _{t_1\geqslant 0} \left\lfloor \frac{t_1}{i\,m} \right\rfloor q^{t_1}\\&= \frac{1-q}{(q;q)_\infty } \sum _{i=1}^\infty (\pm 1)^{i+1}\,i^z \sum _{t_1\geqslant 0} \sum _{r=0}^{im-1} t_1\,q^{imt_1+r}\\&= \frac{1-q}{(q;q)_\infty } \sum _{i=1}^\infty (\pm 1)^{i+1}\,i^z \left( \sum _{r=0}^{im-1} q^r \right) \left( \sum _{t_1\geqslant 0} t_1\,q^{imt_1} \right) \\&= \frac{1-q}{(q;q)_\infty } \sum _{i=1}^\infty (\pm 1)^{i+1}\,i^z \frac{1-q^{im}}{1-q} \frac{q^{im}}{(1-q^{im})^2} \\&= \frac{1}{(q;q)_\infty } \sum _{i=1}^\infty \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{1-q^{im}}. \end{aligned}$$

This concludes the proof.

5 Proof of Theorem 1.7

The generating function for the left-hand side of our identity is given by

$$\begin{aligned} LHS&=\sum _{n=0}^\infty q^n \sum _{t_1+2t_2+\cdots +nt_n=n} (-1)^{t_m+t_{2m}+t_{3m}+\cdots } (t_{m}\pm 2^zt_{2m}+3^zt_{3m}\pm \cdots ) \nonumber \\&= \sum _{i=1}^\infty \sum _{t_1,t_2,t_3,\ldots \geqslant 0} (\pm 1)^{i+1}\,i^z\,t_{im}\,(-1)^{t_m+t_{2m}+t_{3m}+\cdots }\, q^{t_1+2t_2+3t_3+\cdots } \nonumber \\&= \sum _{i=1}^\infty \left( \prod _{j=1}^\infty \frac{\sum \limits _{t_j\geqslant 0} q^{j\,t_j}}{\sum \limits _{t_{jm}\geqslant 0} q^{jm\,t_{jm}}} \right) \left( \prod _{\begin{array}{c} j=1\\ j\ne i \end{array}}^\infty \sum _{t_{jm}\geqslant 0} (-1)^{t_{jm}}\,q^{jm\,t_{jm}} \right) \nonumber \\&\quad \times \sum _{t_{im}\geqslant 0} (\pm 1)^{i+1}\,i^z\, t_{im}\,(-1)^{t_{im}} q^{im\,t_{im}} \nonumber \\&= \sum _{i=1}^\infty \left( \prod _{j=1}^\infty \frac{1-q^{jm}}{1-q^j} \right) \left( \prod _{\begin{array}{c} j=1\\ j\ne i \end{array}}^\infty \frac{1}{1+q^{jm}} \right) \frac{-(\pm 1)^{i+1}\,i^z\,q^{im}}{(1+q^{im})^2} \nonumber \\&= \frac{-(q^m;q^m)_\infty }{(q;q)_\infty \,(-q^m;q^m)_\infty } \sum _{i=1}^\infty (1+q^{im}) \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{(1+q^{im})^2} \nonumber \\&= \frac{-(q^m;q^m)_\infty }{(q;q)_\infty \,(-q^m;q^m)_\infty } \sum _{i=1}^\infty \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{1+q^{im}}. \end{aligned}$$
(15)

In a similar way, we obtain the generating function for the right-hand side of our identity:

$$\begin{aligned} RHS&= \sum _{n=0}^\infty q^n \sum _{t_1+2t_2+\cdots +nt_n=n} (-1)^{\left\lfloor \frac{t_1}{m} \right\rfloor + \left\lfloor \frac{t_2}{m} \right\rfloor +\cdots +\left\lfloor \frac{t_n}{m} \right\rfloor } \sum _{i=1}^n (\pm 1)^{i+1}\,i^z \left\lfloor \frac{t_i}{m} \right\rfloor \\&= \sum _{i=1}^\infty \sum _{t_1,t_2,t_3,\ldots \geqslant 0} (\pm 1)^{i+1}\,i^z\, (-1)^{\left\lfloor \frac{t_1}{m} \right\rfloor + \left\lfloor \frac{t_2}{m} \right\rfloor +\left\lfloor \frac{t_3}{m} \right\rfloor +\cdots } \left\lfloor \frac{t_i}{m} \right\rfloor q^{t_1+2t_2+3t_3+\cdots }\\&= \sum _{i=1}^\infty \left( \prod _{\begin{array}{c} j=1\\ j\ne i \end{array}}^\infty \sum _{t_j\geqslant 0} (-1)^{\left\lfloor \frac{t_j}{m} \right\rfloor }\,q^{jt_j} \right) \sum _{t_i\geqslant 0} (\pm 1)^{i+1}\,i^z\, (-1)^{\left\lfloor \frac{t_i}{m} \right\rfloor } \left\lfloor \frac{t_i}{m} \right\rfloor q^{it_i}. \end{aligned}$$

We have

$$\begin{aligned} \sum _{t_j\geqslant 0} (-1)^{\left\lfloor \frac{t_j}{m} \right\rfloor }\,q^{jt_j}&= \sum _{t_j\geqslant 0} \sum _{r=0}^{m-1} (-1)^{t_j} q^{j(mt_j+r)} \\&= \left( \sum _{r=0}^{m-1} q^{jr}\right) \left( \sum _{t_j\geqslant 0} (-1)^{t_j} q^{jmt_j}\right) \\&= \frac{1-q^{jm}}{1-q^j} \frac{1}{1+q^{jm}} \end{aligned}$$

and

$$\begin{aligned} \sum _{t_i\geqslant 0} (-1)^{\left\lfloor \frac{t_i}{m} \right\rfloor } \left\lfloor \frac{t_i}{m} \right\rfloor q^{it_i}&= \sum _{t_i\geqslant 0} \sum _{r=0}^{m-1} (-1)^{t_i}\,t_i\,q^{i(mt_i+r)} \\&= \left( \sum _{r=0}^{m-1} q^{ir}\right) \left( \sum _{t_i\geqslant 0} (-1)^{t_i}\, t_i\, q^{imt_i}\right) \\&= \frac{1-q^{im}}{1-q^i} \frac{-q^{im}}{(1+q^{im})^2}. \end{aligned}$$

Hence

$$\begin{aligned} RHS&= \sum _{i=1}^\infty \left( \prod _{\begin{array}{c} j=1\\ j\ne i \end{array}}^\infty \frac{1-q^{jm}}{(1-q^j)(1+q^{jm})} \right) \frac{1-q^{im}}{1-q^i} \frac{-(\pm 1)^{i+1}\,i^z\,q^{im}}{(1+q^{im})^2}\\&= \frac{-(q^m;q^m)_\infty }{(q;q)_\infty \,(-q^m;q^m)_\infty } \sum _{i=1}^\infty \frac{(1-q^i)(1+q^{im})}{1-q^{im}} \frac{(\pm 1)^{i+1}\,i^z\,(1-q^{im})\,q^{im}}{(1-q^i)(1+q^{im})^2} \\&= \frac{-(q^m;q^m)_\infty }{(q;q)_\infty \,(-q^m;q^m)_\infty } \sum _{i=1}^\infty \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{1+q^{im}}, \end{aligned}$$

This concludes the proof.

6 Proof of Theorem 1.8

The following theta identity is often attributed to Gauss [2, p. 23, Eq. (2.2.12)]:

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

By this identity, with q replaced by \(q^m\) we get:

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

According to (15) and (17), we can write:

$$\begin{aligned} \sum _{n=0}^\infty b_{m,z}^\pm (n)\,q^n&= \frac{-(q^m;q^m)_\infty }{(q;q)_\infty \,(-q^m;q^m)_\infty } \sum _{i=1}^\infty \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{1+q^{im}}\\&= \left( \sum _{n=-\infty }^\infty (-1)^{n+1}\,q^{m\,n^2} \right) \left( \sum _{n=0}^\infty \widetilde{a}_{m,z}^\pm (n)\,q^n \right) . \end{aligned}$$

The proof of Theorem 1.8 follows easily considering Cauchy’s multiplication of two power series.

Recall that, the reciprocal of the product in (16) is the generating function for the number of the overpartitions of n. An overpartition is an ordinary partitions with the added condition that the first appearance of any part may be overlined or not [5]. Thus there are eight overpartitions of 3:

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

While investigating a truncated form of (16), Andrews and Merca [4] defined \(\overline{M}_k(n)\) to be the number of overpartitions of n in which the first part larger than k appears at least \(k+1\) times. For example, \(\overline{M}_2(12) =16\), and the overpartitions in question are:

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

We have the following truncated form of Theorem 1.8.

Theorem 6.1

Let z be a complex number and let k, m and n be positive integers. Then

$$\begin{aligned} b_{m,z}^\pm (n) - \sum _{j=-k}^k (-1)^{j+1}\,\widetilde{a}_{m,z}^{\pm }(n-m\,j^2) = (-1)^{k-1} \sum _{j=0}^{\lfloor n/m \rfloor } b_{m,z}^\pm (n-m\,j)\,\overline{M}_k(j). \end{aligned}$$

Proof

Andrews and Merca considered the identity (16) and provided in [4, Theorem 7] the following result: for \(k>0\),

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

Take into account that the generating function of \(\overline{M}_k(n)\) is given by

$$\begin{aligned} \sum _{n=0}^\infty \overline{M}_k(n)\,q^n = 2\,\frac{(-q;q)_k}{(q;q)_k} \sum _{j=k+1}^\infty \frac{q^{(k+1)j}\,(-q^{j+1};q)_\infty }{(1-q^j)(q^{j+1};q)}, \end{aligned}$$

we can write

$$\begin{aligned} \frac{(-q;q)_\infty }{(q;q)_\infty } \sum _{n=-k}^k (-1)^{n}\,q^{n^2} - 1 =(-1)^k \sum _{n=0}^\infty \overline{M}_k(n)\,q^n. \end{aligned}$$

By this identity, with q replaced by \(q^m\), we obtain

$$\begin{aligned} \frac{(-q^m;q^m)_\infty }{(q^m;q^m)_\infty } \sum _{n=-k}^k (-1)^{n}\,q^{m\,n^2} - 1 =(-1)^k \sum _{n=0}^\infty \overline{M}_k(n)\,q^{m\,n}. \end{aligned}$$
(18)

Multiplying both sides of (18) by

$$\begin{aligned}\sum _{n=0}^\infty b_{m,z}^\pm (n)\,q^n = \frac{-(q^m;q^m)_\infty }{(q;q)_\infty \,(-q^m;q^m)_\infty } \sum _{i=1}^\infty \frac{(\pm 1)^{i+1}\,i^z\,q^{im}}{1+q^{im}},\end{aligned}$$

we deduce that

$$\begin{aligned}&\bigg ( \sum _{n=0}^\infty \widetilde{a}_{m,z}^{\pm }(n)\,q^{n} \bigg ) \bigg ( \sum _{n=-k}^k (-1)^{n+1}\,q^{m\,n^2} \bigg ) -\sum _{n=0}^\infty b_{m,z}^\pm (n)\,q^n \\&\qquad = (-1)^k \left( \sum _{n=0}^\infty b_{m,z}^\pm (n)\,q^n \right) \left( \sum _{n=0}^\infty \overline{M}_k(n)\,q^{m\,n} \right) . \end{aligned}$$

The proof follows easily by considering Cauchy’s multiplication of two power series. \(\square \)

7 Experimental results and open problems

It is well known that the logarithmic differentiation of the generating function of p(n) allows us to derive a classical formula that combines the functions p(n) and \(\sigma _1^+(n)\):

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

By the equations (6) - (9), we obtain the following expressions for the generating functions of \(a_{m,z}^\pm (n)\) and \(\widetilde{a}_{m,z}^{\pm }(n)\):

$$\begin{aligned} \sum _{n=0}^\infty a_{m,z}^\pm (n)\,q^n = \frac{1}{(q;q)_\infty } \sum _{n=1}^\infty \sigma _z^\pm (n)\,q^{mn}. \end{aligned}$$

and

$$\begin{aligned} \sum _{n=0}^\infty \widetilde{a}_{m,z}^{\pm }(n)\,q^n = \frac{1}{(q;q)_\infty } \sum _{n=1}^\infty \widetilde{\sigma }_z^{\pm }(n)\,q^{mn}. \end{aligned}$$

By these relations, we easily derive the following generalization of (19).

Theorem 7.1

Let z be a complex number. For any positive integers m and n, we have:

$$\begin{aligned} a_{m,z}^\pm (n) = \sum _{j=1}^{\lfloor n/m \rfloor } \sigma _z^\pm (j)\,p(n-jm) \end{aligned}$$

and

$$\begin{aligned} \widetilde{a}_{m,z}^{\pm }(n) = \sum _{j=1}^{\lfloor n/m \rfloor } \widetilde{\sigma }_z^{\pm }(j)\,p(n-jm). \end{aligned}$$

Ramanujan discovered various surprising congruences for p(n) when n is in certain special arithmetic progressions. For example:

$$\begin{aligned} p(5n+4)\equiv 0 \pmod 5,\quad p(7n+5)\equiv 0 \pmod 7,\quad p(11n+6)\equiv 0 \pmod {11}. \end{aligned}$$

Surprisingly there do not seem to be any such congruences modulo 2 or 3. In fact, one of the unsolved problems in the theory of integer partitions is to find a simple criterion for deciding whether Euler’s partition function p(n) is even or odd.

In the following subsections, we present a collection of conjectures involving Ramanujan type congruences for \(a_{m}^+(n)\). We verified the statement of these conjectures numerically up to \(10^7\).

7.1 Congruences modulo 2

Let \(\mathcal {M}_2=\{5,7,11,13,17,19,23\}\) be a set of prime numbers. For each \(m\in \mathcal {M}_2\), we define the set \(\mathcal {R}_{2,m}\) as follows:

$$\begin{aligned} \mathcal {R}_{2,5}&:=\{1,7\},\\ \mathcal {R}_{2,7}&:=\{0,2,6\},\\ \mathcal {R}_{2,11}&:=\{1,3,5,13,19\},\\ \mathcal {R}_{2,13}&:=\{3,5,7,9,15,23\},\\ \mathcal {R}_{2,17}&:=\{0,2,8,10,12,16,28,32\},\\ \mathcal {R}_{2,19}&:=\{1,5,9,11,13,15,21,27,29\},\\ \mathcal {R}_{2,23}&:=\{0,6,8,12,16,18,20,22,34,38,44\}. \end{aligned}$$

For each \(m\in \mathcal {M}_2\), we see that \(|\mathcal {R}_{2,m}|=\lfloor m/2 \rfloor \). Related to the parity of our partition function \(a_{m,1}^\pm (n)\), there is a substantial amount of numerical evidence to state the following conjectures.

Conjecture 1

Let \(m\in \mathcal {M}_2\) and let n be a nonnegative integer such that \(n\equiv \mathcal {R}_{2,m} \pmod {2m}\). Then

$$\begin{aligned} a_{m,1}^+(n) \equiv 0 \pmod 2. \end{aligned}$$

Conjecture 2

Let \(m\in \{7,17,23\}\) and let n be a positive integer such that \(n\equiv \{4,14,34,44\} \pmod {50}\). Then

$$\begin{aligned} a_{m,1}^+(n) \equiv 0 \pmod 2. \end{aligned}$$

Conjecture 3

Let n be a positive integer such that \(n\equiv 4 \pmod {10}\). Then

$$\begin{aligned} a_{25,1}^+(n) \equiv 0 \pmod 2. \end{aligned}$$

It is well known that \(\sigma _1^\pm (n) \equiv 1 \pmod 2\) if and only if n is a square or twice square. Assuming Conjectures 13 and considering Theorem 7.1, we easily derive the following identities.

Conjecture 4

Let n be a nonnegative integer.

  1. (a)

    If \(m\in \mathcal {M}_2\) and \(n\equiv \mathcal {R}_{2,m} \pmod {2\,m}\), then

    $$\begin{aligned} \sum _{k=1}^\infty p\left( n-mk^2\right) \equiv \sum _{k=1}^\infty p\left( n-2mk^2\right) \pmod 2. \end{aligned}$$
  2. (b)

    If \(m\in \{7,17,23\}\) and \(n\equiv \{4,14,34,44\} \pmod {50}\), then

    $$\begin{aligned} \sum _{k=1}^\infty p\left( n-mk^2\right) \equiv \sum _{k=1}^\infty p\left( n-2mk^2\right) \pmod 2. \end{aligned}$$
  3. (c)

    If \(n\equiv 4 \pmod {10}\), then

    $$\begin{aligned} \sum _{k=1}^\infty p\left( n-25k^2\right) \equiv \sum _{k=1}^\infty p\left( n-50k^2\right) \pmod 2. \end{aligned}$$

7.2 Congruences modulo 3

Let \(\mathcal {M}_3=\{7,13,19\}\) be a set of prime numbers. For each \(m\in \mathcal {M}_3\), we define the set \(\mathcal {R}_{3,m}\) as follows:

$$\begin{aligned} \mathcal {R}_{3,7}&:=\{1,4,10\},\\ \mathcal {R}_{3,13}&:=\{2,5,20,23,29,35\},\\ \mathcal {R}_{3,19}&:=\{0,3,6,12,18,33,36,45,54\}. \end{aligned}$$

For each \(m\in \mathcal {M}_3\), we see that \(|\mathcal {R}_{3,m}|=\lfloor m/2 \rfloor \). There is a substantial amount of numerical evidence to state the following conjectures related to congruences modulo 3.

Conjecture 5

Let \(m\in \mathcal {M}_3\) and let n be a nonnegative integer such that \(n\equiv \mathcal {R}_{3,m} \pmod {3m}\). Then

$$\begin{aligned} a_{m,1}^+(n) \equiv 0 \pmod 3. \end{aligned}$$

Conjecture 6

Let n be a positive integer such that \(n\equiv 4 \pmod {15}\). Then

$$\begin{aligned} a_{25,1}^+(n) \equiv 0 \pmod 3. \end{aligned}$$

Let \(\mathcal A\) be the set of the positive integers that are decomposable into \(x^2+xy+y^2\) with \(x,y\in \mathbb {Z}\) and let \({\mathcal {A}}_1\) be the set of the positive integers that are uniquely decomposable into \(x^2+xy+y^2\) with \(y>x>0\). It is clear that \({\mathcal {A}}_1 \subset {\mathcal {A}}\). According to [1, Theorem 7.1], \(\sigma (k) \not \equiv 0 \pmod 3\) if and only if there are \(x,y\in \mathbb {Z}\) such that \(k= x^2+xy+y^2\). Inspired by Conjectures 5 and 6, we propose the following open problem.

Conjecture 7

Let n be a nonnegative integer.

  1. (a)

    If \(m\in \mathcal {M}_3\) and \(n\equiv \mathcal {R}_{3,m} \pmod {3\,m}\), then

    $$\begin{aligned} \sum _{k\in {\mathcal {A}}} p(n-mk) + \sum _{k\in {\mathcal {A}}_1} p(n-mk) \equiv 0 \pmod 3. \end{aligned}$$
  2. (b)

    If \(n\equiv 4 \pmod {15}\), then

    $$\begin{aligned} \sum _{k\in {\mathcal {A}}} p(n-25k) + \sum _{k\in {\mathcal {A}}_1} p(n-25k) \equiv 0 \pmod 3. \end{aligned}$$

7.3 Congruences modulo 4

There is a substantial amount of numerical evidence to state the following conjecture related to congruences modulo 4.

Conjecture 8

Let n be a nonnegative integer.

  1. (a)

    If \(n\equiv \{0,8,12,16,28,32,36,44\} \pmod {68}\), then

    $$\begin{aligned} a_{17,1}^\pm (n) \equiv 0 \pmod 4. \end{aligned}$$
  2. (b)

    If \(n\equiv \{4,44\} \pmod {100}\), then

    $$\begin{aligned} a_{17,1}^\pm (n) \equiv 0 \pmod 4. \end{aligned}$$

7.4 Congruences modulo 5

Let \(\mathcal {M}_5=\{2,7,11,13,17,23,31,37,41,47,61,71\}\) be a set of prime numbers. For each \(m\in \mathcal {M}_5\), we define the set \(\mathcal {R}_{5,m}\) as follows:

$$\begin{aligned} \mathcal {R}_{5,2}&:=\{1,4\},\\ \mathcal {R}_{5,7}&:=\{1,4,11,24,29,31\},\\ \mathcal {R}_{5,11}&:=\{0,4,9,10,15,20,29,40,22,54\}\\ \mathcal {R}_{5,13}&:=\{2,7,9,22,29,42,44,49,54,57,59,62\},\\ \mathcal {R}_{5,17}&:=\{1,4,6,9,14,21,24,26,31,41,54,64,69,71,74,81\},\\ \mathcal {R}_{5,23}&:=\{2,4,7,9,14,17,19,27,32,37,42,49,59,72,74,79,82,94,97,99,102,109\},\\ \mathcal {R}_{5,31}&:=\{0,5,9,10,19,24,29,30,40,50,54,55,60,69,85,89,94,100,104,109,119, \\&\qquad 120, 124, 125, 129, 134, 135, 140, 150, 154\},\\ \mathcal {R}_{5,37}&:=\{1,6,14,16,21,24,26,29,44,51,61,64,66,79,81,84,94,101,\\&\qquad 116,119,121,124,129,131,139,144,149,154,156,161,164,166,\\&\qquad 169,174,176,181\}\\ \mathcal {R}_{5,41}&:=\{0,5,9,15,19,24,25,29,34,39,40,50,59,60,64,65,70,75,79,80,\\&\qquad 100,105,109,120,124,129,149,150,154,159,164,165,169,170,179,\\&\qquad 189,190,195,200,204\} \\ \mathcal {R}_{5,47}&:=\{4,6,9,11,14,16,19,26,29,34,36,39,44,51,56,61,66,74,76,81,\\&\qquad 86,91,99,104,114,121,124,144,146,149,151,159,161,164,171,\\&\qquad 179,191,194,196,199,204,206,211,214,224,226\}\\ \mathcal {R}_{5,61}&:=\{0,4,5,10,20,30,34,35,39,45,49,54,59,60,65,79,95,99,100,110,\\&\qquad 115,119,120,124,129,139,140,144,160,174,179,180,185,190,194,\\&\qquad 200,204,205,209,219,229,234,235,239,240,244,249,254,255,264,\\&\qquad 265,270,274,279,280,289,290,295,300,304\} \\ \mathcal {R}_{5,71}&:=\left\{ 0,10,14,20,24,25,29,34,44,45,49,50,54,55,59,64,65,69,70,\right. \\&\qquad 85,95,100,105,109,115,120,125,129,130,135,139,140,144,159,\\&\qquad 179,180,184,189,200,204,210,214,215,229,230,239,244,249,250,\\&\qquad 255,260,269,275,279,284,285,294,300,304,309,310,315,320,329,\\&\qquad \left. 334,339,340,349,350,354\right\} \end{aligned}$$

For each \(m\in \mathcal {M}_5 {\setminus } \{2\}\), we see that \(|\mathcal {R}_{5,m}|=m-1\). There is a substantial amount of numerical evidence to state the following conjecture related to congruences modulo 5.

Conjecture 9

Let \(m\in \mathcal {M}_5\) and let n be a nonnegative integer such that \(n\equiv \mathcal {R}_{5,m} \pmod {5m}\). Then

$$\begin{aligned} a_{m,1}^+(n) \equiv 0 \pmod 5. \end{aligned}$$

The characterization of integers k such that \(\sigma (k) \equiv 0 \pmod 5\) is an interesting question.

7.5 Congruences modulo 7

Let \(\mathcal {M}_7=\{5,13,19,29,43\}\) be a set of prime numbers. For each \(m\in \mathcal {M}_7\), we define the set \(\mathcal {R}_{7,m}\) as follows:

$$\begin{aligned} \mathcal {R}_{7,5}&:=\{1,12,22,26\},\\ \mathcal {R}_{7,13}&:=\{3,5,10,31,33,54,59,61,68,75,80,87\},\\ \mathcal {R}_{7,19}&:=\{1,5,8,15,29,40,43,47,68,78,85,89,96,103,106,110,124,127\},\\ \mathcal {R}_{7,29}&:=\{0,7,14,19,28,47,56,61,68,75,77,82,103,105,117,119,126,133,\\&\qquad 138,140,145,152,159,161,173,175,196,201\},\\ \mathcal {R}_{7,43}&:=\{0,5,12,14,21,28,35,42,54,70,82,84,89,91,98,103,117,124,140,\\&\qquad 145,166,168,175,180,189,201,203,208,210,215,229,231,236,243,\\&\qquad 250,252,257,266,285,287,294,299\}. \end{aligned}$$

For each \(m\in \mathcal {M}_7\), we see that \(|\mathcal {R}_{7,m}|=m-1\). There is a substantial amount of numerical evidence to state the following conjecture related to congruences modulo 7.

Conjecture 10

Let \(m\in \mathcal {M}_7\) and let n be a nonnegative integer such that \(n\equiv \mathcal {R}_{7,m} \pmod {7m}\). Then

$$\begin{aligned} a_{m,1}^+(n) \equiv 0 \pmod 7. \end{aligned}$$

7.6 Congruences modulo 11

There is a substantial amount of numerical evidence to state the following conjecture related to congruences modulo 11.

Conjecture 11

Let n be a positive integer such that

$$\begin{aligned} n&\equiv \{ 0,6,11,22,39,44,61,66,77,110,121,127,\\&\qquad 138,149,154,160,176,182,204,215,242,248\} \pmod {253}. \end{aligned}$$

Then

$$\begin{aligned} a_{23,1}^+(n) \equiv 0 \pmod {11}. \end{aligned}$$

7.7 Congruences modulo 13

Let \(\mathcal {M}_{13}=\{5,7,13\}\) be a set of prime numbers. For each \(m\in \mathcal {M}_{13}\), we define the set \(\mathcal {R}_{13,m}\) as follows:

$$\begin{aligned} \mathcal {R}_{13,5}&:=\{2,41\},\\ \mathcal {R}_{13,7}&:=\{3,29,81\},\\ \mathcal {R}_{13,13}&:=\{6\}. \end{aligned}$$

There is a substantial amount of numerical evidence to state the following conjecture related to congruences modulo 13.

Conjecture 12

Let \(m\in \mathcal {M}_{13}\) and let n be a nonnegative integer such that \(n\equiv \mathcal {R}_{13,m} \pmod {13m}\). Then

$$\begin{aligned} a_{m,1}^+(n) \equiv 0 \pmod {13}. \end{aligned}$$