1 Introduction

Given a positive integer n, a partition of n is an expression

$$\begin{aligned} n=n_{1}+n_{2}+\cdots +n_{k}, \end{aligned}$$

where all the numbers \(n_{j}\) are integers and \(1\le n_{1}\le n_{2}\le \cdots \le n_{k}\). Let p(n) denote the number of partitions of a natural number n.

One of the most classical problems in the theory of partitions is studying the arithmetic properties of certain sequences of partitions. It originates in the celebrated work of Ramanujan, who proved that

$$\begin{aligned} p(5n+4)\equiv&\ 0\pmod 5, \\ p(7n+5)\equiv&\ 0\pmod 7, \end{aligned}$$

and

$$\begin{aligned} p(11n+6)\equiv \ 0\pmod {11} \end{aligned}$$

hold for each nonnegative integer n. Similar results were proved also for other types of partitions, that is, for functions counting only the partitions of a given number that satisfy certain constrains.

In this paper we focus on the case of m-ary partitions. More precisely, these are partitions such that every part is a power of a fixed number m. For example, all the 2-ary partitions of number 5 are

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

In particular, the number of such partitions is equal to \(4=:b_{2}(5)\). In general, there are no simple formulas for the number of m-ary partitions of n; this number will be denoted by \(b_{m}(n)\).

In the context of m-ary partitions of various types, the problem of finding so-called supercongruences, that is, congruences modulo high powers of m, is one of the most important parts of the theory. Churchhouse was the first to ask about arithmetic properties of the sequences of binary partitions. In [3], he proved that \(b_{2}(n)\) is even if \(n\ge 2\). He also characterized numbers \(b_{2}(n)\) modulo 4 and conjectured that for a fixed positive integer k we have

$$\begin{aligned} b_{2}(2^{k+2}n)\equiv&\ b_{2}(2^{k}n)\pmod {2^{3k+2}}, \\ b_{2}(2^{2k+1})\equiv&\ b_{2}(2^{2k-1})\pmod {2^{3k}} \end{aligned}$$

for all positive integers n. This conjecture was proved by Rødseth in [8].

The above result was subsequently improved and extended to the case of m-ary partitions by Andrews [1], Gupta [5], and Rødseth and Sellers [9]. Namely, they proved that

$$\begin{aligned} b_{m}(m^{r+1}n-\sigma -m)\equiv 0\ \ \ \left( \bmod {\frac{m^{r}}{c_{r}}}\right) \end{aligned}$$
(1)

holds, where for a sequence \((\varepsilon _{j})_{j=1}^{r-1}\in \{0,1\}^{r-1}\) we define

$$\begin{aligned} \sigma :=\sum _{j=1}^{r-1}\varepsilon _{j}m^{j}, \ \ \ \ \ \ \ \ \ \ \ c_{r}:={\left\{ \begin{array}{ll} 1 &{} \text {if { m} is odd}, \\ 2^{r-1} &{} \text {if { m} is even}. \end{array}\right. } \end{aligned}$$

Similar results were obtained for many types of m-ary partitions including the case of m-ary partitions with no gaps [2, 6] and m-ary overpartitions [7].

Folsom et al. introduced in [4] the class of M-non-squashing partitions that generalizes ordinary m-ary partitions. Here, we call the M-non-squashing partitions the M-ary partitions for simplicity and due to their similarity with the ordinary m-ary partitions. More precisely, let \(M=(m_{i})_{i=0}^{\infty }\) be a sequence of integers, \(m_{0}=1\), \(m_{i}\ge 2\) for \(i\ge 1\), and for \(r\ge 0\) let

$$\begin{aligned} M_{r}:=m_{0}m_{1}\cdots m_{r}. \end{aligned}$$

Then an M-ary partition of a positive integer n is an expression of the form

$$\begin{aligned} n=M_{r_{1}}+M_{r_{2}}+\cdots +M_{r_{s}}, \end{aligned}$$

for some nonnegative integers \(r_{1},\ldots ,r_{s}\). The number of M-ary partitions of n will be denoted by \(p_{M}(n)\).

The natural question arises whether the congruences (1) can be generalized to a more general class of M-partitions, and if not, whether we can prove some weaker congruences. In fact, our main motivation is the following conjecture stated in [4].

Conjecture 1.1

[4, Conjecture 1.10] Let \(M=(m_{j})_{j=0}^{\infty }\) and \(\varepsilon = (\varepsilon _{j})_{j=1}^{r-1}\in \{0,1\}^{r-1}\) be fixed sequences. Let

$$\begin{aligned} \mu _{j}:=\frac{m_{j}}{(m_{j},P_{j})} \text { and } \sigma =\sum _{j=1}^{r-1}\varepsilon _{j}\prod _{i=0}^{j}m_{i}, \end{aligned}$$
(2)

where \(P_{j}=\prod _{p\le j}p\) is the product of all primes up to j. Then for all integers \(n\ge 1\) and \(0\le c\le m_{1}-1\) we have

$$\begin{aligned} p_{M}(m_{1}\cdots m_{r} n-\sigma -m_{1}-c)\equiv 0\pmod {\mu _{1}\cdots \mu _{r}}. \end{aligned}$$

In the special case of partitions into factorials, the above conjecture can be stated as follows.

Conjecture 1.2

[4, Conjecture 1.11] If \(M=(j)_{j=1}^{\infty }\), then

$$\begin{aligned} p_{M}(r!n -\sigma -c)\equiv 0\pmod {r!/D_{r}}, \end{aligned}$$

where \(\sigma \) is the same as in (2), \(c\in \{1,2\}\), and

$$\begin{aligned} D_{r}=\prod _{p\le r-2}p^{\left\lfloor \frac{r-2}{p}\right\rfloor }. \end{aligned}$$

Unfortunately, the above conjectures are false in general. Indeed, we checked, using Mathematica [10], that for example

$$\begin{aligned} p_{M}(5!n-2-4!)\equiv 10 \ \ \left( \textrm{mod}\ \frac{5!}{6}\right) \end{aligned}$$

for \(n\in \{2,6,8,10,12,16\}\). In fact, Conjecture 1.2 failed in almost all cases we checked, that is, for sequences with \(r\le 5\). However, we made an attempt to find and prove some weaker results of the same type. We focused on the situation in which \(\sigma =0\). Moreover, we prove the above conjectures only modulo a little worse modulus than the product \(\mu _{1}\cdots \mu _{r}\).

For all positive integers a and b we define \(\mu (a,b):=\frac{a}{(a,b)}\). Moreover, let

$$\begin{aligned} \mathcal {M}(m,r):=\textrm{gcd}\{\ \mu (m,j)\ |\ j=1,\ldots ,r\ \}=\frac{m}{\textrm{gcd}\big (m,\textrm{lcm}(1,\ldots ,r)\big )} \end{aligned}$$

for positive integers m and r.

The main result of the paper is the following.

Theorem 1.3

Let \(M=(m_{0},m_{1},\ldots )\) be a (possibly finite) sequence of integers such that \(m_{0}=1\) and \(m_{j}\ge 2\) if \(j\ge 1\). Then for all positive integers n and r we have

$$\begin{aligned} p_{M}(m_{1}m_{2}\cdots m_{r}n-1)\equiv 0\ \ \left( \textrm{mod}\ \prod _{t=2}^{r}\mathcal {M}(m_{t},t-1)\right) . \end{aligned}$$

Let us provide some instances in which Conjecture 1.1 is true. In fact, an even stronger divisibility property holds if we assume that \(m_{r}\) has only large prime factors for every r.

Corollary 1.4

Assume for every prime p that if \(p\mid m_{r}\) then \(p\ge r\). Then for every n we have

$$\begin{aligned} p_{M}(m_{1}m_{2}\cdots m_{r}n-1)\equiv 0\ \ \left( \textrm{mod}\ \prod _{t=2}^{r}m_{r}\right) . \end{aligned}$$

Proof

It is a direct consequence of Theorem 1.3. \(\square \)

Finally, observe that

$$\begin{aligned} \textrm{gcd}\big (m,\textrm{lcm}(1,2)\big )=\textrm{gcd}(m,2) \end{aligned}$$

and

$$\begin{aligned} \textrm{gcd}\big (m,\textrm{lcm}(1,2,3)\big )=\textrm{gcd}(m,2\cdot 3). \end{aligned}$$

Hence, we get that the divisibility properties in Theorem 1.3 are the same as in Conjectures 1.1 and 1.2 if \(r\in \{1,2,3\}\) and \(\sigma =0\).

Corollary 1.5

Conjectures 1.1 and 1.2 are true if \(r\in \{1,2,3\}\) and \(\sigma =0\).

2 Auxiliary results

In our proof, we will use the main idea from [9]. At first, we will connect the numbers of the form \(p_{M}(m_{1}\ldots m_{r} n-1)\) with the numbers \(\alpha _{m,r}(i)\) defined in the following lemma.

Lemma 2.1

For any integers \(m\ge 2\) and n, \(r\ge 1\) there exist unique integers \(\alpha _{m,r}(i)\) such that

$$\begin{aligned} \left( {\begin{array}{c}mn+r-1\\ r\end{array}}\right) =\sum _{i=1}^{r}\alpha _{m,r}(i)\left( {\begin{array}{c}n+i-1\\ i\end{array}}\right) . \end{aligned}$$

Moreover,

  1. 1.

    \(\alpha _{m,r}(r)=m^{r}\),

  2. 2.

    \(\alpha _{m,r}(r-1)=-\frac{1}{2}(r-1)(m-1)m^{r-1}\).

Proof

This is [9, Lemma 1] together with remarks after the proof. \(\square \)

In the proof, we will need the generating function of the sequence \((p_{M}(n))_{n=0}^{\infty }\), that is, the function

$$\begin{aligned} F_{M}(q) = \sum _{n=0}^{\infty }p_{M}(n)q^{n} = \prod _{j=0}^{\infty }\frac{1}{1-q^{M_{j}}}. \end{aligned}$$

In particular, if \(M'=(1,m_{2},m_{3},\ldots )\) then

$$\begin{aligned} F_{M}(q)=\frac{1}{1-q}\prod _{j=0}^{\infty }\frac{1}{1-q^{m_{1}M'_{j}}} = \frac{1}{1-q}F_{M'}(q^{m_{1}}). \end{aligned}$$

For a positive integer \(m\ge 2\) let us define the following linear operator:

$$\begin{aligned} U_{m}:\mathbb {Z}\llbracket q\rrbracket \ni \sum _{n=0}^{\infty }a(n)q^{n}\longmapsto \sum _{n=0}^{\infty }a(mn)q^{n}\in \mathbb {Z}\llbracket q\rrbracket . \end{aligned}$$

The motivation behind considering the above operator is simple. The generating function of the sequence \(\big (p_{M}(m_{1}\cdots m_{r} n-1)\big )_{n=1}^{\infty }\) is exactly \(U_{m_{r}}\circ \cdots \circ U_{m_{1}}\big (qF_{M}(q)\big )\). We will explain this phenomenon in more details in the proof of Theorem 1.3 below. In the proof, we will need some properties of the operators \(U_{m}\) that we gather in the next lemma.

Lemma 2.2

For every \(m\ge 2\) the following properties hold.

  1. (1)

    If \(f(q)=\sum _{n=0}^{\infty }a(n)q^{n}\in \mathbb {Z}\llbracket q\rrbracket \), then

    $$\begin{aligned} U_{m}\big (qf(q)\big )=\sum _{n=0}^{\infty }a(mn-1)q^{n}. \end{aligned}$$
  2. (2)

    If f(q), \(g(q)\in \mathbb {Z}\llbracket q\rrbracket \), then

    $$\begin{aligned} U_{m}\big (f(q)g(q^{m})\big )=U_{m}(f(q))g(q). \end{aligned}$$

Proof

This is a direct consequence of the definition of the operator \(U_{m}\). \(\square \)

As we explained earlier, the generating function of the sequence \(\big (p_{M}(m_{1}\cdots m_{r} n-1)\big )_{n=1}^{\infty }\) is an image of the series \(qF_{M}(q)\) under the operator \(U_{m_{r}}\circ \cdots \circ U_{m_{1}}\). On the other hand, it will be possible to express the same sequence in a more manageable form. In order to do so, we introduce the following sequences of power series \(h_{r}\) and \(H_{(m_{1},\ldots ,m_{r})}\). Let

$$\begin{aligned} h_{r}=h_{r}(q):=\frac{q}{(1-q)^{r+1}} \end{aligned}$$

for \(r\ge 0\).

Lemma 2.3

For each r and m we have

$$\begin{aligned} U_{m}h_{r}=\sum _{i=1}^{r}\alpha _{m,r}(i)h_{i}, \end{aligned}$$

where numbers \(\alpha _{m,r}(i)\) are the same as in Lemma 2.1.

Proof

The statement follows immediately from the definition of \(U_{m}\) and Lemma 2.2. \(\square \)

For a sequence \((m_{1},m_{2},\ldots )\) of natural numbers greater than or equal to 2, let us define the following sequence of power series with integer coefficients (all these sequences depend on q so we skip the variable for simplicity of notation):

$$\begin{aligned} H_{\emptyset } :=&\ h_{0}=\frac{q}{1-q}, \\ H_{(m_{1})} :=&\ U_{m_{1}}\left( \frac{1}{1-q}H_{\emptyset }\right) , \end{aligned}$$

and if \(H_{(m_{1},\ldots ,m_{r-1})}\) is defined for some \(r\ge 2\) then

$$\begin{aligned} H_{(m_{1},\ldots ,m_{r-1},m_{r})}:= U_{m_{r}}\left( \frac{1}{1-q}H_{(m_{1},\ldots ,m_{r-1})}\right) . \end{aligned}$$

Example 2.4

For \(r\le 3\) the series defined above satisfy the following equalities:

  1. (1)

    \(H_{(m_{1})}=m_{1}h_{1}\),

  2. (2)

    \(H_{(m_{1},m_{2})}=m_{1}m_{2}^{2}h_{2}-\left( {\begin{array}{c}m_{2}\\ 2\end{array}}\right) H_{(m_{1})}\),

  3. (3)

    \(H_{(m_{1},m_{2},m_{3})}=m_{1}m_{2}^{2}m_{3}^{3}h_{3}-m_{3}^{2}(m_{3}-1)H_{(m_{1},m_{2})}-\left( {\begin{array}{c}m_{2}\\ 2\end{array}}\right) H_{(m_{1},m_{3})}\) \(-\left( m_{3}^{2}(m_{3}-1)\left( {\begin{array}{c}m_{2}\\ 2\end{array}}\right) -m_{2}^{2}\left( {\begin{array}{c}m_{3}\\ 3\end{array}}\right) \right) H_{(m_{1})}\).

Note here that the above representations of \(H_{(m_1,\ldots ,m_r)}\) as linear combinations of \(H_{(m_{j_1},\ldots ,m_{j_s})}\), \(s<r\), \(j_1<\cdots <j_s\), may NOT be unique. However, in the sequel we will need only the existence of such representations which is presented below.

Lemma 2.5

Let \(r\ge 1\) and \(m_{j}\ge 2\) for \(j\in \{1,\ldots ,r\}\). Then there exist (nonunique) integers \(\beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r})\) such that

$$\begin{aligned} H_{(m_{1},\ldots ,m_{r})}=m_{1}m_{2}^{2}\cdots m_{r}^{r}h_{r}-\sum _{s=1}^{r-1}\ \sum _{1\le j_{1}<\cdots <j_{s}\le r}\beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r})H_{(m_{j_{1}},\ldots ,m_{j_{s}})}. \end{aligned}$$

Moreover, we can chose \(\beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r})\) so that they satisfy the following recurrence relations:

  • if \(j_{s}=r\), then if \(s\ge 2\),

    $$\begin{aligned} \beta _{(j_{1},\ldots ,j_{s-1},r)}(m_{1},\ldots ,m_{r})=\beta _{(j_{1},\ldots ,j_{s-1})}(m_{1},\ldots ,m_{r-1}), \end{aligned}$$

    and if \(s=1\),

    $$\begin{aligned} \beta _{(r)}(m_{1},\ldots ,m_{r})=0. \end{aligned}$$
  • if \(j_{s}\ne r\) and \((j_{1},\ldots ,j_{s})=(r-s,r-s+1,\ldots ,r-1)\), then

    $$\begin{aligned} \beta _{(r-s,\ldots ,r-1)}(m_{1},\ldots ,m_{r})&=\left( \prod _{j=1}^{r-s-1}m_{j}^{j}\prod _{j=r-s}^{r-1}m_{j}^{r-s-1}\right) \alpha _{m_{r},r}(s) +\sum _{i=s+1}^{r-1}\left( \prod _{j=1}^{r-i-1}m_{j}^{j}\right. \\ {}&\left. \quad \times \prod _{j=r-i}^{r-1}m_{j}^{r-i-1}\right) \alpha _{m_{r},r}(i)\beta _{(i-s+1,\ldots ,i)}(m_{r-i},\ldots ,m_{r-1}). \end{aligned}$$
  • otherwise,

    $$\begin{aligned} \beta _{(j_{1},\ldots ,j_{s})}&(m_{1},\ldots ,m_{r}) \\&= \sum _{i=s+1}^{r-1}\left( \prod _{j=1}^{r-i-1}m_{j}^{j}\prod _{j=r-i}^{r-1}m_{j}^{r-i-1}\right) \alpha _{m_{r},r}(i) \beta _{(j_{1}-(r-i)+1,\ldots ,j_{s}-(r-i)+1)}(m_{r-i},\ldots ,m_{r-1}). \end{aligned}$$

Proof

We use induction on r. For \(r=1\) and \(r=2\) the result is presented in Example 2.4. Let us assume that \(r\ge 3\) and for every \(1\le k\le r-1\) and every sequence \((n_{1},\ldots ,n_{k})\), where \(n_{j}\ge 2\) for each \(j\in \{1,\ldots ,k\}\), we have

$$\begin{aligned} H_{(n_{1},\ldots ,n_{k})}=n_{1}n_{2}^{2}\cdots n_{k}^{k}h_{k}-\sum _{s=1}^{k-1}\sum _{1\le j_{1}<\ldots <j_{s}\le k}\beta _{(j_{1},\ldots ,j_{s})}(n_{1},\ldots ,n_{k})H_{(n_{j_{1}},\ldots ,n_{j_{s}})}. \end{aligned}$$
(3)

From the recurrence relations defining \(H_{(m_{1},\ldots ,m_{r})}\), the induction hypothesis (3) used for \(k=r-1\) and \((n_{1},\ldots ,n_{k})=(m_{1},\ldots ,m_{r-1})\), and the linearity of the operator \(U_{m_{r}}\), we get

$$\begin{aligned} H_{(m_{1},\ldots ,m_{r})}=&\ U_{m_{r}}\left( \frac{1}{1-q}H_{(m_{1},\ldots ,m_{r-1})}\right) = m_{1}\cdots m_{r-1}^{r-1}U_{m_{r}}\left( \frac{1}{1-q} h_{r-1}\right) \\&-\sum _{s=1}^{r-2}\sum _{1\le j_{1}<\cdots<j_{s}\le r-1}\beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r-1})U_{m_{r}}\left( \frac{1}{1-q} H_{(m_{j_{1}},\ldots ,m_{j_{s}})}\right) \\ =&\ m_{1}\cdots m_{r-1}^{r-1}U_{m_{r}}\big (h_{r}\big )-\sum _{s=1}^{r-2}\sum _{1\le j_{1}<\cdots <j_{s}\le r-1}\beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r-1})H_{(m_{j_{1}},\ldots ,m_{j_{s}},m_{r})}. \end{aligned}$$

In the remaining part of the proof we will not modify the coefficients of \(H_{(m_{j_{1}},\ldots ,m_{j_{s}},m_{r})}\). Hence, we can take

$$\begin{aligned} \beta _{(j_{1},\ldots ,j_{s},r)}(m_{1},\ldots ,m_{r})=\beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r-1}). \end{aligned}$$

Moreover, in the above sum the expression \(H_{(m_{r})}\) does not appear. Therefore,

$$\begin{aligned} \beta _{(r)}(m_{1},\ldots ,m_{r})=0, \end{aligned}$$

as in the statement.

Lemmas 2.3 and 2.1 imply

$$\begin{aligned} m_{1}\cdots m_{r-1}^{r-1}U_{m_{r}}\big (h_{r}\big )=&\ m_{1}\cdots m_{r-1}^{r-1}\left( \sum _{i=1}^{r}\alpha _{m_{r},r}(i)h_{i}\right) \\ =&\ m_{1}\cdots m_{r-1}^{r-1}\left( m_{r}^{r}h_{r}+\sum _{i=1}^{r-1}\alpha _{m_{r},r}(i)h_{i}\right) \\ =&\ m_{1}\cdots m_{r-1}^{r-1}m_{r}^{r}h_{r}+m_{1}\cdots m_{r-1}^{r-1}\sum _{i=1}^{r-1}\alpha _{m_{r},r}(i)h_{i}. \end{aligned}$$

Observe that the induction hypothesis (3) for every \(k=i\le r-1\) and every sequence \((n_{1},\ldots ,n_{k})=(m_{l_{1}},\ldots ,m_{l_{i}})\), where \(1\le l_{1}<\cdots <l_{i}\le r-1\), implies

$$\begin{aligned} m_{l_{1}}m_{l_{2}}^{2}\cdots m_{l_{i}}^{i}h_{i}=H_{(m_{l_{1}},\ldots ,m_{l_{i}})}+\sum _{s=1}^{i-1}\ \sum _{1\le j_{1}<\cdots <j_{s}\le i}\beta _{(j_{1},\ldots ,j_{s})}(m_{l_{1}},\ldots ,m_{l_{i}})H_{(m_{l_{j_{1}}},\ldots ,m_{l_{j_{s}}})}. \end{aligned}$$

Let \(1\le i\le r-1\) be fixed and apply the above equality with \((l_{1},\ldots ,l_{i})=(r-i,r-i+1,\ldots ,r-1)\) to get

$$\begin{aligned}&\left( \prod _{j=1}^{i}m_{r-1-i+j}^{j}\right) h_{i} \\&\quad =H_{(m_{r-i},\ldots ,m_{r-1})} +\sum _{s=0}^{i-1}\ \sum _{r-i\le j_{1}<\ldots <j_{s}\le r-1} \beta _{(j_{1}-(r-i)+1,\ldots ,j_{s}-(r-i)+1)}(m_{r-i},\ldots ,m_{r-1})H_{(m_{j_{1}},\ldots ,m_{j_{s}})}. \end{aligned}$$

The above relation implies

$$\begin{aligned} m_{1}&\cdots m_{r-1}^{r-1}\sum _{i=1}^{r-1}\alpha _{m_{r},r}(i)h_{i}= \sum _{i=1}^{r-1}\left( \prod _{j=1}^{r-i-1}m_{j}^{j}\prod _{j=r-i}^{r-1}m_{j}^{r-i-1}\right) \alpha _{m_{r},r}(i)\left( \prod _{j=1}^{i}m_{r-1-i+j}^{j}\right) h_{i} \\ =&\ \sum _{i=1}^{r-1}\left( \prod _{j=1}^{r-i-1}m_{j}^{j}\prod _{j=r-i}^{r-1}m_{j}^{r-i-1}\right) \alpha _{m_{r},r}(i)H_{(m_{r-i},\ldots ,m_{r-1})}\\&+\sum _{i=1}^{r-1}\left( \prod _{j=1}^{r-i-1}m_{j}^{j}\prod _{j=r-i}^{r-1}m_{j}^{r-i-1}\right) \alpha _{m_{r},r}(i)\times \\&\times \sum _{s=0}^{i-1}\ \sum _{r-i\le j_{1}<\cdots <j_{s}\le r-1}\beta _{(j_{1}-(r-i)+1,\ldots ,j_{s}-(r-i)+1)}(m_{r-i},\ldots ,m_{r-1})H_{(m_{j_{1}},\ldots ,m_{j_{s}})}. \end{aligned}$$

Now we can find the remaining expressions for \(\beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r})\). If \((j_{1},\ldots ,j_{s})=\)

\((r-s,r-s+1,\ldots ,r-1)\), then

$$\begin{aligned} \beta&_{(r-s,\ldots ,r-1)}(m_{1},\ldots ,m_{r})= \left( \prod _{j=1}^{r-s-1}m_{j}^{j}\prod _{j=r-s}^{r-1}m_{j}^{r-s-1}\right) \alpha _{m_{r},r}(s) \\ {}&\ \ \ \ \ +\sum _{i=s+1}^{r-1}\left( \prod _{j=1}^{r-i-1}m_{j}^{j}\prod _{j=r-i}^{r-1}m_{j}^{r-i-1}\right) \alpha _{m_{r},r}(i)\beta _{((r-s)-(r-i)+1,\ldots ,(r-1)-(r-i)+1)}(m_{r-i},\ldots ,m_{r-1}) \\&\ = \left( \prod _{j=1}^{r-s-1}m_{j}^{j}\prod _{j=r-s}^{r-1}m_{j}^{r-s-1}\right) \alpha _{m_{r},r}(s) \\ {}&\ \ \ \ \ +\sum _{i=s+1}^{r-1}\left( \prod _{j=1}^{r-i-1}m_{j}^{j}\prod _{j=r-i}^{r-1}m_{j}^{r-i-1}\right) \alpha _{m_{r},r}(i)\beta _{(i-s+1,\ldots ,i)}(m_{r-i},\ldots ,m_{r-1}). \end{aligned}$$

Otherwise we have

$$\begin{aligned}&\beta _{(j_{1},\ldots ,j_{s})}(m_{1}, \ldots ,m_{r})\\&\quad = \sum _{i=s+1}^{r-1}\left( \prod _{j=1}^{r-i-1}m_{j}^{j}\prod _{j=r-i}^{r-1}m_{j}^{r-i-1}\right) \alpha _{m_{r},r}(i) \beta _{(j_{1}-(r-i)+1,\ldots ,j_{s}-(r-i)+1)}(m_{r-i},\ldots ,m_{r-1}) \end{aligned}$$

(where we assumed that \(\beta _{(k_{1},\ldots ,k_{u})}(n_{1},\ldots ,n_{u})=0\) if for some \(i\in \{1,\ldots ,u\}\) we have \(k_{i}\le 0\)). These are the formulas we wanted to prove. \(\square \)

Recall that for all positive integers a, b we use the notation \(\mu (a,b):=\frac{a}{(a,b)}\).

Lemma 2.6

For all integers \(m\ge 2\), \(r\ge 2\), \(i\in \{1,\ldots ,r\}\) we have

$$\begin{aligned} \mu (mi,r)\mid \alpha _{m,r}(i). \end{aligned}$$

In particular, \(\mu (m,r)\mid \alpha _{m,r}(i)\) for all i.

Proof

The number m will not change during the proof so we omit it and write \(\alpha _{r}(i)\) for \(\alpha _{m,r}(i)\) in order to simplify the notation. For every n we have

$$\begin{aligned} \sum _{i=1}^{r}\alpha _{r}(i)&\left( {\begin{array}{c}n+i-1\\ i\end{array}}\right) =\left( {\begin{array}{c}mn+r-1\\ r\end{array}}\right) =\frac{mn+r-1}{r}\left( {\begin{array}{c}mn+r-2\\ r-1\end{array}}\right) \\ =&\ \frac{mn+r-1}{r}\sum _{i=1}^{r-1}\alpha _{r-1}(i)\left( {\begin{array}{c}n+i-1\\ i\end{array}}\right) \\ =&\ \frac{1}{r}\sum _{i=1}^{r-1}\alpha _{r-1}(i)\big (m(n+i)-(mi-r+1)\big )\left( {\begin{array}{c}n+i-1\\ i\end{array}}\right) \\ =&\ \frac{1}{r}\sum _{i=1}^{r-1}\alpha _{r-1}(i)\left[ m(i+1)\left( {\begin{array}{c}n+i\\ i+1\end{array}}\right) -(mi-r+1)\left( {\begin{array}{c}n+i-1\\ i\end{array}}\right) \right] \\ =&\ \sum _{i=2}^{r}\frac{mi}{r}\alpha _{r-1}(i-1)\left( {\begin{array}{c}n+i-1\\ i\end{array}}\right) -\sum _{i=1}^{r-1}\frac{mi-r+1}{r}\alpha _{r-1}(i)\left( {\begin{array}{c}n+i-1\\ i\end{array}}\right) \\ =&\ m\alpha _{r-1}(r-1)\left( {\begin{array}{c}n+r-1\\ r\end{array}}\right) \\&\ +\sum _{i=2}^{r-1}\left[ \frac{mi}{r}\alpha _{r-1}(i-1)-\frac{mi-r+1}{r}\alpha _{r-1}(i)\right] \left( {\begin{array}{c}n+i-1\\ i\end{array}}\right) -\frac{m-r+1}{r}\alpha _{r-1}(1)\left( {\begin{array}{c}n\\ 1\end{array}}\right) . \end{aligned}$$

By comparing the coefficients of \(\left( {\begin{array}{c}n+i-1\\ i\end{array}}\right) \) we get

$$\begin{aligned} \alpha _{r}(i)=\frac{mi}{r}\alpha _{r-1}(i-1)-\frac{mi-r+1}{r}\alpha _{r-1}(i), \end{aligned}$$

or, equivalently,

$$\begin{aligned} r\alpha _{r}(i)-(r-1)\alpha _{r-1}(i)=mi\big (\alpha _{r-1}(i-1)-\alpha _{r-1}(i)\big ). \end{aligned}$$

We can write down the same equalities with r replaced by any \(s\le r\) to get

$$\begin{aligned} s\alpha _{s}(i)-(s-1)\alpha _{s-1}(i)=mi\big (\alpha _{s-1}(i-1)-\alpha _{s-1}(i)\big ). \end{aligned}$$

Let us sum all these equalities over \(1\le s\le r\). We get

$$\begin{aligned} r\alpha _{r}(i)=mi\sum _{s=1}^{r}\big (\alpha _{s-1}(i-1)-\alpha _{s-1}(i)\big ). \end{aligned}$$

The main part of the statement follows. The second part is a consequence of the fact that \(\mu (m,r)\mid \mu (mi,r)\) for every i. \(\square \)

Lemma 2.7

For every \(r\ge 1\) and every \(1\le j_{1}<\cdots <j_{s}\le r\) we have

$$\begin{aligned} \beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r})\equiv 0 \ \ \bigg (\textrm{mod} \prod _{\begin{array}{c} 1\le t\le r \\ t\not \in \{j_{1},\ldots ,j_{s}\} \end{array}}\mu (m_{t},t)\bigg ). \end{aligned}$$

If \(m_{1}=m_{2}=\cdots =m\), then \(\beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r})\equiv 0\pmod {m^{r-s}/(m,2)}\).

Proof

We proceed by induction on r. The cases \(r=1\), \(r=2\) and \(r=3\) simply follow from Example 2.4. Let us assume that the statement is true for \(r-1\) and consider the recurrence relations from Lemma 2.5 modulo the product from the statement. We get the following cases:

  • If \(j_{s}=r\), then by the first case of Lemma 2.5

    $$\begin{aligned} \beta _{(j_{1},\ldots ,j_{s-1},r)}(m_{1},\ldots ,m_{r})=\beta _{(j_{1},\ldots ,j_{s-1})}(m_{1},\ldots ,m_{r-1}), \end{aligned}$$

    so the statement follows from the induction hypothesis.

  • If \((j_{1},\ldots ,j_{s})=(r-s,\ldots ,r-1)\), then for \(s\le r-2\) all the summands on the right side in the formula from the second case of Lemma 2.5 are divisible by \(m_{1}m_{2}\cdots m_{r-1}\cdot \alpha _{m_{r},r}(i)\) for some i. Thus, the result follows from Lemma 2.6. If \(s=r-1\) then \((j_{1},\ldots ,j_{s})=(1,2,\ldots ,r-1)\), so the result again follows since every summand is divisible by \(\alpha _{m_{r},r}(i)\) for some i.

  • The remaining case: similarly as in the previous case, every summand in the formula from the last case of Lemma 2.5 is divisible by \(m_{1}\cdots m_{r-1}\cdot \alpha _{m_{r},r}(i)\) for some i. Hence, the result follows from Lemma 2.6.

The first part of the statement follows. For the second let

$$\begin{aligned} N:=\prod _{j=1}^{r}m_{j}. \end{aligned}$$

Lemma 2.5 implies that for every sequence \((m_{1},m_{2},\ldots )\) the following congruences hold:

  • \(\beta _{(j_{1},\ldots ,j_{s-1},r)}(m_{1},\ldots ,m_{r})\equiv \beta _{(j_{1},\ldots ,j_{s-1})}(m_{1},\ldots ,m_{r-1}) \pmod {N}\);

  • if \(j_{1}=r-s\) and \(s\ne r-1\), then

    $$\begin{aligned} \beta _{(r-s,\ldots ,r-1)}(m_{1},\ldots ,m_{r})\equiv \alpha _{m_{r},r}(r-1)\beta _{(r-s,\ldots ,r-1)}(m_{1},\ldots ,m_{r-1}) \pmod {N}, \end{aligned}$$

    and if \(s=r-1\), then

    $$\begin{aligned} \beta _{(1,\ldots ,r-1)}(m_{1},\ldots ,m_{r})\equiv \alpha _{m_{r},r}(r-1)\pmod {N}; \end{aligned}$$
  • if \(j_{1}\ne r-s\) and \(j_{s}\ne r\), then

    $$\begin{aligned} \beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r})\equiv \alpha _{m_{r},r}(r-1)\beta _{(j_{1},\ldots ,j_{s})}(m_{1},\ldots ,m_{r-1}) \pmod {N}. \end{aligned}$$

Let us assume that all the numbers \(m_{j}\) are equal to some number m. Then the result follows quickly in the second and third case from the fact that \(\alpha _{m,r}(r-1)=-\frac{1}{2}(r-1)(m-1)m^{r-1}\) is divisible by \(m^{r-1}/(m,2)\).

Let us now move to the first case. Observe that if \(t<s\) is such that \((j_{1},\ldots ,j_{s})=(j_{1},\ldots ,j_{s-t},r-t+1,r-t+2,\ldots ,r)\) and \(j_{s-t}\ne r-t\), then

$$\begin{aligned} \beta _{(j_{1},\ldots ,j_{s})}(\underbrace{m,\ldots ,m}_{r \text { times}}) \equiv \beta _{(j_{1},\ldots ,j_{s-1})}(\underbrace{m,\ldots ,m}_{r-1 \text { times}}) \equiv \cdots \equiv \beta _{(j_{1},\ldots ,j_{s-t})}(\underbrace{m,\ldots ,m}_{r-t \text { times}}) \pmod {m^{r-t}}. \end{aligned}$$

By the previously considered cases, the last quantity is divisible by

$$\begin{aligned} \frac{m^{(r-t)-(s-t)}}{(m,2)}=\frac{m^{r-s}}{(m,2)}, \end{aligned}$$

and so is \(\beta _{(j_{1},\ldots ,j_{s})}(\underbrace{m,\ldots ,m}_{r \text { times}})\) in this case, as we wanted.

The last case that we need to consider is \((j_{1},\ldots ,j_{s})=(r-s+1,\ldots ,r)\). Then

$$\begin{aligned} \beta _{(r-s+1,\ldots ,r)}(\underbrace{m,\ldots ,m}_{r\text { times}}) =\beta _{(r-s+1,\ldots ,r-1)}(\underbrace{m,\ldots ,m}_{r-1\text { times}}) =\cdots = \beta _{(r-s+1)}(\underbrace{m,\ldots ,m}_{r-s+1\text { times}}) =0 \end{aligned}$$

by the subcase \(s=1\) of the first case of Lemma 2.5. The result follows. \(\square \)

For positive integers m and r let

$$\begin{aligned} \mathcal {M}(m,r):=\textrm{gcd}\{\ \mu (m,j)\ |\ j=1,\ldots ,r\ \}=\frac{m}{\textrm{gcd}\big (m,\textrm{lcm}(1,\ldots ,r)\big )}. \end{aligned}$$

Lemma 2.8

For every \(n\in \mathbb {N}_{0}\) the coefficient of \(q^{n}\) in the series \(H_{(m_{1},\ldots ,m_{r})}\) is divisible by the product \(\prod _{t=1}^{r}\mathcal {M}(m_{t},t)\).

Proof

We use induction on r. For \(r=1\) and any \(m_{1}\) we have \(H_{(m_{1})}=m_{1}h_{1}\), so, indeed, all the coefficients of \(H_{(m_{1})}\) are divisible by \(m_{1}\). Assume that if \(s\le r-1\), then for every sequence \((n_{1},\ldots ,n_{s})\) with \(n_{i}\ge 2\) the series \(H_{(n_{1},\ldots ,n_{s})}\) is divisible by \(\prod _{t=1}^{s}\mathcal {M}(n_{t},t)\). The latter product is divisible by \(\prod _{t=1}^{s}\mathcal {M}(m_{j_{t}},j_{t})\), where \(n_{t}=m_{j_{t}}\) for each t. The result follows from Lemmas 2.5 and 2.7. \(\square \)

3 Proof of theorem 1.3

Because of Lemma 2.8 it is enough to prove the following relation:

$$\begin{aligned} \sum _{n=1}^{\infty }p_{M}(m_{1}m_{2}\cdots m_{r}n-1)q^{n}=H_{(m_{2},m_{3},\ldots ,m_{r})}(q)F_{r}(q), \end{aligned}$$
(4)

for \(r\ge 2\), where \(F_{r}(q):=F_{(m_{r+1},m_{r+2},\ldots )}(q)\). Let us begin with the case of \(r=2\) (note that we have a string \((m_{2},\ldots ,m_{r})\) on the right side of the above inequality so Lemma 2.8 has to be used with this string instead of \((m_{1},\ldots ,m_{r})\)). We apply the operators \(U_{m_{1}}\) and \(U_{m_{2}}\) to both sides of the equality \(qF_{0}(q)=\frac{q}{1-q}F_{1}(q^{m_{1}})\) (note that \(F_{0}(q)=F_{M}(q)\) and \(F_{1}(q)=F_{M'}(q)\)). We get

$$\begin{aligned} \sum _{n=1}^{\infty }p_{M}(m_{1}m_{2}n-1)q^{n}=&\ U_{m_{2}}\circ U_{m_{1}}\left( qF_{0}(q)\right) =U_{m_{2}}\left( U_{m_{1}}\left( \frac{q}{1-q}F_{1}(q^{m_{1}})\right) \right) \\ =&\ U_{m_{2}}\left( U_{m_{1}}\left( \frac{q}{1-q}\right) F_{1}(q) \right) =U_{m_{2}}\left( U_{m_{1}}\left( \frac{q}{1-q}\right) \frac{1}{1-q} F_{2}(q^{m_{2}}) \right) \\ =&\ U_{m_{2}}\left( \frac{q}{(1-q)^{2}}F_{2}(q^{m_{2}})\right) =U_{m_{2}}\left( \frac{q}{(1-q)^{2}}\right) F_{2}(q) = H_{(m_{2})}(q)F_{2}(q). \end{aligned}$$

In the above chain of equalities we used the fact that \(U_{m}\left( \frac{q}{1-q}\right) =\frac{q}{1-q}\) for every \(m\ge 2\).

Let us now assume that (4) is true for some r. We want to prove it for \(r+1\). Let us apply the operator \(U_{m_{r+1}}\) to both sides of (4) and get

$$\begin{aligned} \sum _{n=1}^{\infty }p_{M}(m_{1}m_{2}\cdots m_{r}m_{r+1}n-1)q^{n}=&\ U_{m_{r+1}}\left( H_{(m_{2},\ldots ,m_{r})}(q)F_{r}(q)\right) \\ =&\ U_{m_{r+1}}\left( H_{(m_{2},\ldots ,m_{r})}(q)\frac{1}{1-q}F_{r+1}\left( q^{m_{r+1}}\right) \right) \\ =&\ U_{m_{r+1}}\left( \frac{1}{1-q}H_{(m_{2},\ldots ,m_{r})}(q)\right) F_{r+1}\left( q\right) \\ =&\ H_{(m_{2},\ldots ,m_{r},m_{r+1})}(q)F_{r+1}\left( q\right) . \end{aligned}$$

The proof is finished. \(\square \)

Remark 1

One may ask what happens if we use the idea from the above proof to find an expression for the generating function of \((p_{M}(m_{1}n-1))_{n=1}^{\infty }\). We would have

$$\begin{aligned} \sum _{n=1}^{\infty }p_{M}(m_{1}n-1)q^{n}&= U_{m_{1}}(qF_{M}(q))=U_{m_{1}}\left( \frac{q}{1-q} F_{M'}(q^{m_{1}})\right) \\&=U_{m_{1}}\left( \frac{q}{1-q}\right) F_{M'}(q) = \frac{q}{1-q}F_{M'}(q). \end{aligned}$$

We can now use the equality \(p_{M}(m_{1}n-1)=p_{M}(m_{1}(n-1))\) that comes quickly by comparing the coefficients in the equality \((1-q)F_{M}(q)=F_{M'}(q^{m_{1}})\). We get

$$\begin{aligned} (1-q)\sum _{n=1}^{\infty }p_{M}(m_{1}(n-1))q^{n} = qF_{M'}(q). \end{aligned}$$
(5)

After expanding the power series and comparing the coefficients we get that equality (5) is equivalent to

$$\begin{aligned} p_{M}(m_{1}n)-p_{M}(m_{1}(n-1)) = p_{M'}(n) \end{aligned}$$

for every \(n\ge 1\). However, the same equality follows quickly by comparing the coefficients in the equation \((1-q)F_{M}(q)=F_{M'}(q^{m_{1}})\) so we achieved a relation that is true but does not give any new information.