# On k-partitions of multisets with equal sums

## Abstract

We study the number of ordered k-partitions of a multiset with equal sums, having elements $$\alpha _1,\ldots ,\alpha _n$$ and multiplicities $$m_1,\ldots ,m_n$$. Denoting this number by $$S_k(\alpha _1, \ldots , \alpha _n; m_1, \ldots , m_n)$$, we find the generating function, derive an integral formula, and illustrate the results by numerical examples. The special case involving the set $$\{1,\dots ,n\}$$ presents particular interest and leads to the new integer sequences $$S_k(n)$$, $$Q_k(n)$$, and $$R_k(n)$$, for which we provide explicit formulae and combinatorial interpretations. Conjectures in connection to some superelliptic Diophantine equations and an asymptotic formula are also discussed. The results extend previous work concerning 2- and 3-partitions of multisets.

## Introduction

An integer partition is a way of writing an integer as a sum of natural numbers. The study of partitions was inaugurated through the pioneering work of Euler (1748), who introduced numerous concepts which are still in use, and proved fundamental results concerning partitions of an integer n into distinct parts, or into odd parts.

Since that time, numerous mathematicians including Gauss, Cauchy, Jacobi, Weierstrass, MacMahon, Hardy, Ramanujan, Erdös, and Andrews have contributed to the study of partitions. Key details about the history of partitions can be found in the classical books of Andrews  and , or in the review article by Pak , which focuses on bijective proofs of classical partitions identities.

First noticed by Euler, the number p(n) of ways in which a positive integer n can be partitioned as a sum of positive integers is given by the generating function:

\begin{aligned} \sum _{n=0}^{\infty }p(n)x^{n}=\prod _{k=1}^{\infty }\left( {\frac{1}{1-x^{k}}}\right) . \end{aligned}
(1)

For details about generating functions see . The asymptotic estimation for p(n) was first given by Hardy and Ramanujan, who in 1918 proposed the formula:

\begin{aligned} p(n)\sim {\frac{1}{4n{\sqrt{3}}}}\exp \left( {\pi {\sqrt{\frac{2n}{3}}}}\right) }, \end{aligned
(2)

valid as $$n\rightarrow \infty$$. An elementary proof was given in 1942 by Erdös .

Of particular interest is the study of partitions of the set $$[n]=\{1,2,\ldots ,n\}$$ into two sets with equal sums, which gives rise to the signum equation. For a positive integer n, the number of solutions is denoted by S(n) and corresponds to the number of ways in which one can choose $$+$$ and − such that $$\pm 1\pm 2\pm 3\pm \cdots \pm n=0$$. This sequence is indexed as A063865  and was shown to be closely related to the Erdös-Surányi problem, by Andrica and Ionaşcu . The asymptotic formula for S(n) was conjectured in 2002 by Andrica and Tomescu :

\begin{aligned} \underset{n\equiv 0\ \text {or} \ 3 \pmod 4}{\lim _{n\rightarrow \infty }} \, \frac{S(n)}{\frac{2^n}{n\sqrt{n}}}=\sqrt{\frac{6}{\pi }}. \end{aligned}

This was proved in 2013 by Sullivan , using analytic methods. Proof details and possible extensions based on the Central Limit Theorem, as well as connections to Erdös-Surányi representations of integers, have been suggested [4, 5].

Another important and challenging problem is to enumerate the partitions of multisets having certain properties. Results for the number of partitions of multisets, as well as asymptotic formulae for small multiplicities were obtained in the 1970’s by Bender , and Bender et al. . Further information about multiset theory can be found in the book by Stanley .

The current paper is motivated by initial results concerning the number of 2-partitions with equal sums for multisets  and by the more recent extension to 3-partitions with equal sums, in which different techniques were developed . The framework for the general study of k-partitions with equal sums for multisets is inspired from the generating function approach proposed by Andrica in , which started initially from a problem involving derivatives. This opened the way to numerous novel results related to multi-partitions with equal sums.

The structure of the paper is described below. In Sect. 2, we introduce the number $$S_k(\alpha _1, \ldots ,\alpha _n; m_1, \ldots , m_n)$$, of ordered k-partitions of a multiset having equal sums, for which we obtain the generating function and an integral formula. The case of k-partitions of the set $$[n]=\{1,\dots ,n\}$$ is discussed in Sect. 3. The main results in Sect. 4 are contained in Theorems 1 and 2. This leads to the arithmetic functions $$S_k(n)$$, $$Q_k(n)$$, and $$R_k(n)$$, for which we find explicit formulae, combinatorial interpretations, novel integer sequences, and conjectures related to superelliptic equations and to the asymptotic formula.

## k-Partitions of multisets with equal sums

One of the famous strongly NP-complete problems is the 3-partition problem, which has the following statement. Given the positive integers bm and $$a_1,\dots ,a_n$$ such that $$n = 3m$$ and $$\sum _{s=1}^n a_s = mb$$, one needs to partition the set $$\{a_1,\dots ,a_n\}$$ into m subsets, each containing exactly three elements, in which sum is exactly b (see, e.g.,  and ). For example, the set $$\{10, 13, 5, 15, 7, 10\}$$ can be partitioned into the two sets $$\{ 10, 13, 7 \}$$, $$\{5, 15, 10 \}$$, each of which sum to 30.

In this paper, we investigate another k-partition concept of a multiset

\begin{aligned} M=\{\underset{m_1\ \mathrm{{times}}}{\underbrace{\alpha _1,\ldots , \alpha _1}},\ldots , \underset{m_n\ \mathrm{{times}}}{\underbrace{\alpha _n,\ldots ,\alpha _n}}\}, \end{aligned}

where $$\alpha _1, \ldots , \alpha _n$$ are integers and $$m_1, \dots ,m_n$$ are positive integers. Each $$m_s$$ is called the multiplicity of the element $$\alpha _s$$, $$s=1,\dots ,n$$, while $$\sigma (M)= \sum _{s=1}^n m_s\alpha _s$$ represents the sum of the elements of M. For the sake of simplicity, we shall denote $$\varvec{\alpha } = (\alpha _1, \ldots , \alpha _n)$$ and $$\mathbf{m} = (m_1, \ldots ,m_n)$$.

### Definition 1

Let $$k\ge 2$$ be an integer. Denote by $$S_k(\varvec{\alpha };\mathbf{m})$$ the number of ordered k-partitions of M having equal sums, i.e., the number of k-tuples $$(C_1,\dots , C_k)$$ of pairwise disjoint subsets of M such that

1. (i)

$$C_1\cup \dots \cup C_k=M$$;

2. (ii)

$$\sigma (C_1) =\dots =\sigma (C_k) =\frac{1}{k}\sigma (M)$$.

Clearly, one has the relationship $$S_k(\varvec{\alpha };\mathbf{m})=k! \cdot N_k(\varvec{\alpha };\mathbf{m}),$$ where $$N_k(\varvec{\alpha };\mathbf{m})$$ is the number of non-ordered k-partitions of M.

The number $$S_k(\varvec{\alpha };\mathbf{m})$$ is the free (constant) term of the expansion of the Laurent polynomial $$F(X_1,\dots ,X_{k-1})\in \mathbb {Z}[X_1,\dots ,X_{k-1}, X_1^{-1},\dots , X_{k-1}^{-1}]$$, defined by

\begin{aligned} F(X_1,\dots ,X_{k-1}) = \prod _{s=1}^n \left( X_1^{\alpha _s}+\cdots +X_{k-1}^{\alpha _s} + \frac{1}{(X_1\cdots X_{k-1})^{\alpha _s}}\right) ^{m_s}. \end{aligned}
(3)

Indeed, assume that for $$s=1,\dots ,n$$, from $$\left( X_1^{\alpha _s}+\cdots +X_{k-1}^{\alpha _s} + \frac{1}{(X_1\cdots X_{k-1})^{\alpha _s}}\right) ^{m_s}$$ we have selected $$c^s_j$$ terms equal to $$X_j^{\alpha _s}$$, with $$j=1,\dots ,k-1$$, and $$c^s_k$$ terms equal to $$\frac{1}{(X_1\cdots X_{k-1})^{\alpha _s}}$$. Notice that we must have $$c^s_1+\cdots +c^s_k=m_s$$. Such a selection contributes to the free term if and only if

\begin{aligned} X_1^{\sum _{s=1}^n c^s_1\alpha _s} \cdots X_{k-1}^{\sum _{s=1}^n c^s_{k-1}\alpha _s}\cdot \frac{1}{(X_1\cdots X_{k-1})^{\sum _{s=1}^n c^s_k\alpha _s}}=1. \end{aligned}

This is equivalent to

\begin{aligned} \sum _{s=1}^n c^s_1\alpha _s = \cdots =\sum _{s=1}^n c^s_{k-1}\alpha _s=\sum _{s=1}^n c^s_k\alpha _s. \end{aligned}

This means that the sets

\begin{aligned} C_j = \{\underset{c^1_j\ \mathrm{{times}}}{\underbrace{\alpha _1,\ldots , \alpha _1}},\ldots , \underset{c^n_j\ \mathrm{{times}}}{\underbrace{\alpha _n,\ldots ,\alpha _n}}\}, \quad j=1,2,\dots ,k, \end{aligned}

represent a partition of M which also satisfies property (ii) in Definition 1.

Ordering (3) by the powers of $$X_j$$, for $$j=1,\dots ,k-1$$, one obtains

\begin{aligned} F(X_1,\dots ,X_{k-1}) = \sum _{m\in \mathbb {Z}} P_{m,j}(X_1,\dots ,X_{j-1},X_{j+1},\dots ,X_{k-1}) X_j^m, \end{aligned}
(4)

where $$P_{m,j}(X_1,\dots ,X_{j-1},X_{j+1},\dots ,X_{k-1})$$ are Laurent polynomials. As F is symmetric in its variables, the Laurent polynomials $$P_{m,j}$$ do not actually depend on j; hence, we may use the simplified notation $$P_{m}(X_1,\dots ,X_{j-1},X_{j+1},\dots ,X_{k-1})$$. One can easily check that the free term of $$F(X_1,\dots ,X_{k-1})$$ is equal to the free term of $$P_{0}(X_1,\dots ,X_{j-1},X_{j+1},\dots ,X_{k-1})$$.

Denoting for simplicity $$\widetilde{X}_j=(X_1,\dots ,X_{j-1},X_{j+1},\dots ,X_{k-1})$$, by (3), we have

\begin{aligned} F(X_1,\dots ,X_{k-1}) =P_{0}(\widetilde{X_j})+ \sum _{m\in \mathbb {Z}, m\ne 0} P_{m}(\widetilde{X_j}) X_j^m. \end{aligned}
(5)

Let $$X_j=\cos t+i\sin t$$ in (3) and (5) and integrate with respect to t over the range $$[0,2\pi ]$$. Since the integral of the monomial $$X_j^m$$ with respect to t over $$[0,2\pi ]$$ vanishes for $$m\ne 0$$, the integral representation of the polynomial is given by

\begin{aligned} P_{0}(\widetilde{X_j})=\frac{1}{2\pi }\int _0^{2\pi } \prod _{s=1}^n\left( X_1^{\alpha _s}+\cdots +X_{k-1}^{\alpha _s} + \frac{1}{(X_1\cdots X_{k-1})^{\alpha _s}}\right) ^{m_s} \, \mathrm {d}t. \end{aligned}
(6)

Setting $$X_j=X$$, $$X_l=1$$ for $$l=1,\dots ,k-1$$ and $$l\ne j$$ in (3) and (5), one obtains

\begin{aligned} \prod _{s=1}^{n} \left( X^{\alpha _s}+k-2+\frac{1}{X^{\alpha _s}}\right) ^{m_s} =P_{0}(1,\dots ,1) + \sum _{m\in \mathbb {Z}, m\ne 0} P_{m}(1,\dots ,1) X^m. \end{aligned}
(7)

By symmetry in X and $$X^{-1}$$, we have

\begin{aligned} P_{m}(1,\dots ,1)=P_{-m}(1,\dots ,1), \quad m\in \mathbb Z. \end{aligned}

Also, from (6), we deduce that

\begin{aligned} P_{0}(1,\dots ,1)=\frac{1}{2\pi }\int _0^{2\pi } \prod _{s=1}^{n} \left( X^{\alpha _s}+k-2 + \frac{1}{X^{\alpha _s}}\right) ^{m_s}\, \mathrm {d}t, \end{aligned}
(8)

which depends on k, $$\varvec{\alpha }$$, and $$\mathbf {m}$$. In what follows, we shall denote for simplicity $$P_{0}(1,\dots ,1)$$ by $$Q_k(\varvec{\alpha };\mathbf{m})$$. Since $$X^{\alpha _s}+ \frac{1}{X^{\alpha _s}} =2\cos \alpha _s t$$, we have

\begin{aligned} Q_k(\varvec{\alpha };\mathbf{m})=\frac{1}{2\pi }\int _0^{2\pi } \prod _{s=1}^n(k-2+2\cos \alpha _s t)^{m_s}\, \mathrm {d}t. \end{aligned}
(9)

We have that

\begin{aligned} Q_k(\varvec{\alpha };\mathbf{m})= S_k(\varvec{\alpha };\mathbf{m})+R_k(\varvec{\alpha };\mathbf{m}), \end{aligned}
(10)

where $$R_k(\mathbf {m};\varvec{\alpha })$$ is the sum of the coefficients of $$P_{0}(\widetilde{X_j})$$ that are different from the free term. Also, setting $$X=1$$ in (7), we get $$k^{m_1+\cdots +m_n} = \sum _{m\in \mathbb {Z}} P_{m}(1\dots ,1)$$, that is the sum of all the coefficients in all polynomials $$P_{m}$$ is $$k^{m_1+\cdots +m_n}$$.

By formula (9), after simple computations, it follows that

\begin{aligned} Q_4(\varvec{\alpha };\mathbf{m})= Q_2\left( \frac{\varvec{\alpha }}{2}; 2\mathbf{m}\right) . \end{aligned}

As shown in , the integral formula for the number of ordered 2-partitions with equal sum, of the multiset M with integer elements $$\varvec{\alpha }$$ and multiplicities $$\mathbf{m}$$, is given by

\begin{aligned} S_2(\varvec{\alpha };\mathbf{m}) =\frac{2^{m_1+\cdots +m_n}}{2\pi }\int _0^{2\pi }\prod _{s=1}^n (\cos \alpha _s t)^{m_s}\, \mathrm {d}t. \end{aligned}
(11)

For $$\alpha _s=s$$ and $$m_1=\cdots =m_n=m$$, $$s=1,\dots ,n$$, this produces the formula:

\begin{aligned} c^{(m)}_0(n)= \frac{2^{nm}}{2\pi }\int _0^{2\pi }\prod _{s=1}^n (\cos s t)^{m}\, \mathrm {d}t, \end{aligned}
(12)

where $$c^{(m)}_0(n)=S_2(1,2,\dots ,n; m,m,\dots ,m)$$.

## k-Partitions with equal sums of the set $$[n]=\{1,\dots ,n\}$$

In this section, we set $$\alpha _s=s$$ and $$m_s=1$$, for $$s=1,\dots ,n$$, and use the simplified notations $$S_k(n)$$ for $$S_k(\varvec{\alpha };\mathbf{m})$$ and $$R_k(n)$$ for $$R_k(\varvec{\alpha };\mathbf{m})$$. Some recurrences can be obtained for the coefficients of the polynomial $$F(X_1,\dots ,X_{k-1})$$ defined by (3), which is indexed by the level n, as in the formula:

\begin{aligned} F_n(X_1,\dots ,X_{k-1}) =\prod _{s=1}^n \left( X_1^s+\cdots +X_{k-1}^s + \frac{1}{(X_1\cdots X_{k-1})^s}\right) . \end{aligned}
(13)

We may first write $$F_n(X_1,\dots ,X_{k-1})$$ as a Laurent polynomial in $$X_1,\dots ,X_{k-1}$$ with integer coefficients, given by the formula:

\begin{aligned} F_n(X_1,\dots ,X_{k-1}) =\sum _{j_1,\dots ,j_{k-1} \in \mathbb {Z}}c_{j_1,\dots ,j_{k-1}}(n) X_1^{j_1}X_2^{j_2}\cdots X_{k-1}^{j_{k-1}}. \end{aligned}
(14)

Clearly, we have

\begin{aligned} F_n(X_1, \dots ,X_{k-1}) = \frac{U(X_1, \dots ,X_{k-1})}{V(X_1, \dots ,X_{k-1})}, \end{aligned}

where U and V are polynomials. If $$V\ne 0$$ at the origin of $$\mathbb R^{k-1}$$, then the coefficients in (14) are given by the Cauchy integral formula:

\begin{aligned} c_{j_1,\dots ,j_{k-1}(n)} = \frac{1}{(2\pi i)^{k-1}} \int _{T} \frac{F_n(X_1,\dots ,X_{k-1})}{x_1\cdots x_{k-1}} x_1^{-j_1}\cdots x_{k-1}^{-j_{k-1}} \mathrm {d} x_1 \wedge \dots \wedge \mathrm {d} x_{k-1}, \end{aligned}
(15)

with T a product of sufficiently small circles around the coordinate axes of $$\mathbb R^{k-1}$$.

A detailed derivation of this approach, further applications and examples, can be found in [8, Chapter 4.3] and the references therein. While this is a closed formula, for effective computations, it is sometimes more practical to use a recurrence between the coefficients of levels n and $$n-1$$ (see Theorems 4 and 5 in ).

Setting $$X_1 = X$$ and $$X_p=1$$ for $$p=2,\dots ,k-1$$ in (13), one obtains

\begin{aligned} F_n(X,1,\dots ,1)=\prod _{s=1}^n \left( X^s+k-2 + \frac{1}{X^s}\right) =\sum _{m\in \mathbb {Z}} P_{n,m}(1,\dots ,1) X^m. \end{aligned}
(16)

Notice that $$P_{n,m}(1,\dots ,1)=P_{n,-m}(1,\dots ,1)$$, $$m\in \mathbb Z$$, which represents the sum of the coefficients of the Laurent polynomial $$P_{n,m}(X_1,\dots ,X_{k-1})$$. For simplicity, we denote $$P_{n,m}:=P_{n,m}(1,\dots ,1)$$. The terms of the sequence $$\{P_{n,0}\}_{n\ge 1}$$ can be obtained from the following double recurrence:

\begin{aligned} P_{n,0} = P_{n-1,-n}+P_{n-1,0}+P_{n-1,n}= P_{n-1,0}+2P_{n-1,n}. \end{aligned}
(17)

From the integral formula (9) applied in this case, we can also compute the terms $$P_{n,0}$$ directly. Since this computation is actually performed for a given value of k, for what follows, we introduce the notation:

\begin{aligned} Q_k(n) = P_{n,0}=S_k(n)+R_k(n)= \frac{1}{2\pi }\int _0^{2\pi } \prod _{s=1}^n(k-2+2\cos s t)\, \mathrm {d}t. \end{aligned}
(18)

Simple calculations show that

\begin{aligned} Q_2(n)&= \frac{2^n}{2\pi }\int _0^{2\pi } \prod _{s=1}^n \cos s t\, \mathrm {d}t, \end{aligned}
(19)

and by (9) and (12) it follows that $$Q_2(n) = c^{(1)}_0(n)$$.

## Main results concerning $$Q_k(n)$$

In this section, we explore properties and special cases for $$Q_k(n)$$, $$S_k(n)$$, and $$R_k(n)$$. In the process, we provide new context for a number of existing sequences and identify novel entries to . We then establish a polynomial formula for $$Q_k(n)$$ and conjecture its asymptotic behavior. We also conjecture properties related to the distribution of perfect powers within this sequence.

Denoting by T(nk) the number of set partitions of $$[n]=\{1,\dots ,n\}$$ into k blocks with equal sum of elements, indexed as A275714 in , the number of ordered partitions satisfies $$S_k(n)=k!\cdot T(n,k)$$ and generates a new sequence.

### A combinatorial interpretation of $$Q_k(n)$$

In what follows we investigate the expression $$Q_k(n)$$ defined by (18). In particular, $$Q_3(n)$$ gives the number of solutions of the 3-signum equation 

\begin{aligned} 1\cdot \varepsilon _1 + 2\cdot \varepsilon _2 + \cdots + n\cdot \varepsilon _n = 0, \end{aligned}
(20)

where $$\varepsilon _s \in \{-1,0,1\}$$, $$s=1,\dots ,n$$. We study some properties of this sequence, and we illustrate a counting procedure for $$Q_k(n)$$ when $$k=3$$, $$k=4$$, and $$k=5$$.

The following result provides a new combinatorial context for $$Q_k(n)$$.

### Theorem 1

$$Q_k(n)$$ is the number of ordered partitions of [n] into k disjoint sets $$A_1,\dots ,A_k$$, with the property $$\sigma (A_1)=\sigma (A_k)$$.

### Proof

A monomial $$X_1^{d_1}\cdots X_{k-1}^{d_{k-1}}(X_1\cdots X_{k-1})^{-d_k}$$ of $$F_n(X_1,\dots ,X_{k-1})$$ in (13) is independent of $$X_1$$ if and only if $$d_1=d_k$$. The number of such monomials equals the number the ordered partitions $$A_1, A_2, \dots , A_k$$ of [n] such that $$\sigma (A_1)=\sigma (A_k)=d_1$$, with $$d_j\ge 0$$ for $$j=1,\dots ,k$$ and $$d_1+\cdots +d_k=\sigma ([n])$$. $$\square$$

### Example 4

For $$k=3$$, the sequence $$Q_3(n)$$ starts with the terms

\begin{aligned} 1, 1, 3, 7, 15, 35, 87, 217, 547, 1417, 3735, 9911, 26513, 71581,\cdots \end{aligned}

and is indexed as A007576. These terms can also obtained by formula (18) as

\begin{aligned} Q_3(n) = \frac{1}{2\pi }\int _0^{2\pi } \prod _{s=1}^n(1+2\cos s t)\, \mathrm {d}t. \end{aligned}
(21)

It was recently conjectured (see context for A007576 ) that

\begin{aligned} Q_3(n) \sim \frac{1}{2 \sqrt{\pi }}\cdot \frac{3^{n + 1}}{n^{3/2}}. \end{aligned}

As the monomials in the expansion of $$F_n(X,Y)$$ are of the form $$X^{\alpha }Y^{\beta }(XY)^{-\gamma }$$, a term is independent of X if and only if $$\alpha =\gamma$$. To identify the numbers of terms independent of X, we need to count all subsets A and B of $$\{1,2,\dots ,n\}$$ such that $$A\cap B=\emptyset$$ with $$\sigma (A)=\sigma (B)=\alpha$$ with $$\alpha ,\beta ,\gamma \ge 0$$ and $$\alpha +\beta +\gamma =\sigma ([n])$$. This is equivalent to finding the number of solutions of the 3-signum equation (20). For $$k=3$$, we list below the triples obtained for $$n=4$$ and $$n=5$$.

When $$[n]=\{1,2,3,4\}$$, we have $$\sigma ([n])=10$$. We enumerate all the partitions ABC of [n] having the property $$\sigma (A)=\sigma (C)$$. The problem is equivalent to finding all the triplets $$(\alpha , \beta , \gamma )$$ such that $$\alpha , \beta , \gamma \ge 0$$, $$\alpha =\gamma$$, and $$\alpha +\beta +\gamma =10$$. Table 1 presents all such partitions and $$\varepsilon _s$$, $$s=1,\dots ,4$$, satisfying (20). Adding the multiplicities, we confirm that $$Q_3(4)=7$$.

When $$[n]=\{1,2,3,4,5\}$$, we have $$\sigma ([n])=15$$. We count the partitions ABC of [n] such that $$\sigma (A)=\sigma (C)$$. To this end, we find the number of triplets $$(\alpha , \beta , \gamma )$$ such that $$\alpha , \beta , \gamma \ge 0$$, $$\alpha =\gamma$$, and $$\alpha +\beta +\gamma =15$$. From simple computations, we obtain Table 2 presenting all possible subset configurations, along with the values for $$\varepsilon _s$$, $$s=1,\dots ,5$$ in (20). Adding the multiplicities, one obtains $$Q_3(5)=15$$.

### Example 5

For $$k=4$$, the sequence $$Q_4(n)$$ is indexed as A047653 and starts with

\begin{aligned} 2, 4, 10, 26, 76, 236, 760, 2522, 8556, 29504, 103130, 364548, 1300820,\cdots . \end{aligned}

By (18), The integral formula for $$Q_4(n)$$ is

\begin{aligned} Q_4(n) = \frac{1}{2\pi }\int _0^{2\pi } \prod _{s=1}^n(2+2\cos s t)\, \mathrm {d}t = \frac{2^{2n}}{2\pi }\int _0^{2\pi } \prod _{s=1}^n \cos ^2 \frac{s t}{2}\, \mathrm {d}t, \end{aligned}
(22)

and the asymptotic expansion was conjectured in 2014 (see A047653 in )

\begin{aligned} Q_4(n) \sim \sqrt{\frac{3}{\pi }} \cdot \frac{4^{n}}{n^{3/2}}. \end{aligned}

The sequence $$R_4(n)$$ is novel and begins with the numbers

\begin{aligned} 2, 4, 10, 26, 76, 236, 736, 2498, 8556, 29504, 103130, 364548, 1300820,\cdots . \end{aligned}

We now count the partitions ABCD of $$\{1,2,3,4,5\}$$ such that $$\sigma (A)=\sigma (D)$$, that is the number of 4-tuples $$(\alpha , \beta , \gamma ,\delta )$$ with the properties $$\alpha , \beta , \gamma ,\delta \ge 0$$, $$\alpha =\delta$$, and $$\alpha +\beta +\gamma +\delta =15$$. Direct computations produce the values in Table 3.

One may notice that $$Q_4(5)=76=2^5+8\cdot 2^2+6\cdot 2$$.

### Remark 1

In Table 3, the $$B\cup C$$ column contains all elements once. There are 8 instances where this contains two elements, and finally, 6 instances where this only has 1 single element.This suggests the formula:

\begin{aligned} Q_k(5) = (k-2)^5+ 8(k-2)^2 + 6(k-2), \quad k\ge 2. \end{aligned}

This result will be fully explained in general, in the following subsection.

### The polynomial formula for $$Q_k(n)$$

We show that $$Q_k(n)$$ can be expanded as a polynomial in the variable $$k-2$$, and we calculate its coefficients. We prove that these are non-negative integers for which we can establish a number of properties.

### Theorem 2

$$1^{\circ }$$ The following formula holds:

\begin{aligned} Q_k(n) = \sum _{d=0}^{n} N(d,n)\cdot (k-2)^{n-d}, \end{aligned}
(23)

where for each $$d=0,\dots ,n$$, N(dn) is the number of ordered partitions of [n] into 3 subsets ABC, such that the cardinality of B is d and $$\sigma (A)=\sigma (C)$$.

$$2^{\circ }$$ The coefficients N(dn) are given by the formula

\begin{aligned} N(d,n) = \frac{2^d}{2\pi } \int _0^{2\pi } \sigma _d \left( \cos t,\cos 2t, \dots ,\cos nt\right) \, \mathrm {d}t, \ \ d=0,\dots ,n, \end{aligned}
(24)

where $$\sigma _d \left( \cos t,\cos 2t, \dots ,\cos nt\right)$$ is the d-th symmetric sum of $$\cos t,\cos 2t, \dots ,\cos nt$$.

### Proof

Recall that by formula (18), we have

\begin{aligned} Q_k(n) = \frac{1}{2\pi }\int _0^{2\pi } \prod _{s=1}^n(k-2+2\cos s t)\, \mathrm {d}t, \end{aligned}

hence, $$Q_k(n)$$ is a monic polynomial of degree n in $$k-2$$.

$$1^{\circ }$$ By Theorem 1, $$Q_k(n)$$ represents the number of ordered partitions of [n] into k subsets $$A_1,\dots ,A_k$$, with the property $$\sigma (A_1)=\sigma (A_k)$$.

Consider a 3-partition ABC of [n] such that $$\sigma (A)=\sigma (C)$$ and assume that $$A\cup C$$ has $$d=0,\dots ,n$$ elements (denote the number of such 3-partitions by N(dn)). The number of ordered partitions of [n] into k subsets generated by this configuration, having the property $$A_1=A$$, $$B = A_2\cup \dots \cup A_{k-1}$$, and $$A_k=C$$ is $$(k-2)^{n-d}$$ (i.e., the number of functions between a set with $$n-d$$ elements and a set with $$k-2$$ elements). It is now clear that $$Q_k(n)$$ is a linear combination of powers of $$k-2$$, where the coefficient of $$(k-2)^{n-d}$$ has the multiplicity N(dn). This phenomenon is illustrated in Tables 1, 2, and 3.

$$2^{\circ }$$ For $$d=0,\dots ,n$$, the coefficients are

\begin{aligned} N(d,n) = \frac{2^d}{2\pi } \int _0^{2\pi } \sum _{1\le k_1<k_2<\cdots <k_d\le n} \cos k_1 t \cos k_2 t \cdots \cos k_d t \, \mathrm {d}t, \end{aligned}
(25)

hence the result. $$\square$$

### Corollary 1

Let $$N_{k_1,\dots ,k_d}$$ be the number of solutions of the 2-signum equation

\begin{aligned} \pm k_1 \pm k_2 \pm \cdots \pm k_d=0, \end{aligned}

(i.e., the number of ordered 2-partitions with equal sums of the set $$\{k_1,\dots ,k_d\}$$).

The following relation holds true:

\begin{aligned} N(d,n) = \sum _{1\le k_1<k_2<\cdots <k_d\le n} N_{k_1,\dots ,k_d}. \end{aligned}
(26)

### Proof

The following identity is known to hold (see, e.g., ):

\begin{aligned} 2^{d} \prod _{s=1}^{d} \cos k_s t = \sum \cos \left( \pm k_1t \pm k_2t \pm \cdots \pm k_dt \right) , \end{aligned}
(27)

where the sum is taken over all the choices of $$+$$ and −.

Also, notice that for an integer $$k\in \mathbb Z$$, one has

\begin{aligned} \frac{1}{2\pi }\int _0^{2\pi } \cos kt \, \mathrm {d}t = {\left\{ \begin{array}{ll} 1, \quad k=0 \\ 0, \quad k\ne 0. \end{array}\right. } \end{aligned}

For fixed $$1\le k_1<k_2<\cdots <k_d\le n$$, the integral of (25) gives $$N_{k_1,\dots ,k_d}$$, by (27). Summing over all such configurations, we obtain (26). $$\square$$

We can now easily compute some particular coefficients.

Case $$d=0$$. Clearly, one has $$N(0,n)=1$$.

Case $$d=1$$. For $$k_1=1,\dots ,n$$, $$N_{k_1}=0$$; hence, by Corollary 1, we have $$N(1,n)=0$$.

Case $$d=2$$. Whenever $$1\le k_1<k_2\le n$$, we have $$N_{k_1,k_2}=0$$; hence, $$N(2,n)=0$$.

Case $$d=3$$. By Corollary 1, we deduce that N(3, n) corresponds to the number of ordered triplets $$(k_1,k_2,k_3)$$ with the property $$1\le k_1<k_2<k_3\le n$$ such that $$k_1+k_2=k_3$$. This equals the number of pairs $$(k_1,k_2)$$ with $$1\le k_1<k_2<n$$ such that $$k_1+k_2\le n$$.

Clearly, if $$k_1=1$$, then $$k_2$$ takes the values $$2,\dots , n-1$$; If $$k_1=2$$, then $$k_2$$ takes the values $$3,\dots , n-2$$, and so on. Finally, if $$k_1=\left\lfloor \frac{n}{2} \right\rfloor$$ then one has $$k_2=\left\lfloor \frac{n}{2} \right\rfloor +1$$ for n odd, and there is no solution $$k_2$$ for n even. This gives the expression

\begin{aligned} N(3,n) = 2\bigg \lfloor \frac{n}{2} \bigg \rfloor \left( n - \bigg \lfloor \frac{n}{2} \bigg \rfloor -1\right) =\bigg \lfloor \frac{n^2}{2} \bigg \rfloor , \end{aligned}

where the last formula is obtained by trying even and odd cases. One can notice that as a sequence of n, this recovers A007590.

Case $$d=n$$. One obtains

\begin{aligned} N(n,n) = \frac{2^n}{2\pi }\int _0^{2\pi } \prod _{s=1}^n \cos s t\, \mathrm {d}t=Q_2(n) = N_{1,2,\dots ,n}. \end{aligned}

### Some results and conjectures concerning $$Q_k(n)$$

By (23), the coefficients of $$Q_k(n)$$ are non-negative integers, in which combinatorial meaning is related to the partitions of the set [n]. We shall present arithmetic properties of $$Q_k(n)$$, highlight connections to hyperelliptic equations, and formulate conjectures related to elliptic curves and to the asymptotic behavior of $$Q_k(n)$$.

Direct calculations involving the integral (18) lead to the formulae:

\begin{aligned} Q_k(3)&= (k-2)^3+2; \\ Q_k(4)&= (k-2)^4+ 4(k-2) + 2; \\ Q_k(5)&= (k-2)^5+ 8(k-2)^2 + 6(k-2); \\ Q_k(6)&= (k-2)^6+ 12(k-2)^3 + 16(k-2)^2 + 6(k-2); \\ Q_k(7)&= (k-2)^7+18(k-2)^4+30(k-2)^3+18(k-2)^2+12(k-2)+8; \\ Q_k(8)&= (k-2)^8+24(k-2)^5+52(k-2)^4+52(k-2)^3+44(k-2)^2\\&\quad +30(k-2)+8; \\ Q_k(9)&= (k-2)^9+32(k-2)^6+82(k-2)^5+104(k-2)^4+130(k-2)^3 \\&\quad +136(k-2)^2+62(k-2). \end{aligned}

The sequence $$Q_k(3)$$ recovers A034324 in , while the sequences $$Q_k(n)$$ obtained for $$n=4,\dots , 9$$ are new and have interesting arithmetic properties.

It has been claimed that the sequence $$Q_k(3)$$ A084380 does not contain any perfect squares, i.e., the elliptic equation $$x^3+2 = y^2$$ has no solution in positive integers. In [10, Theorem 2.3], Andrica and Ţurcas showed that in fact $$(-1,-1)$$ and $$(-1,1)$$ are the only integer solutions of this equation.

This statement is linked to a Catalan-type conjecture related to Pillai’s equation $$a^x - b^y = n$$, with $$a>0, b>0, x>1, y>1$$ integers, which states that for any integer n, there are finitely many perfect powers in which difference is n. For $$n=2$$, the only solution involving perfect powers smaller than $$10^{18}$$ was $$2 = 3^3-5^2$$. The number of such solutions is linked to A076427 in .

Moreover, Andrica et al. in  proved that the only solutions to the equation $$x^5+8x^2+6x = y^4$$ are $$(x,y) = (0,0)$$, $$(-1,1)$$, and $$(-1,-1)$$ (Theorem 7), the only solutions for $$x^7+18x^4+30x^3+18x^2 + 12x + 8 = y^2$$ are $$(x,y) =(-1,1)$$, and $$(-1,-1)$$ (Theorem 8), and also discuss equations of the type $$y^{2m}=Q_{k}(2m+1)$$.

We now formulate the following conjectures.

### Conjecture 1

The sequence $$Q_k(4)$$ does not contain any perfect cubes, i.e., the superelliptic equation $$x^4+4x+2 = y^3$$ has no solution in positive integers.

On the other hand, it can be easily seen that the sequence $$Q_k(4)$$ does not contain perfect squares, since for $$x\ge 3$$, we have $$(x^2)^2< x^4+4x+2 < (x^2+1)^2$$.

### Conjecture 2

The sequence $$Q_k(6)$$ does not contain any perfect fifth powers, i.e., the superelliptic equation $$x^6+12x^3+16x^2+6x = y^5$$ has no solution in non-negative integers, apart from the trivial solution $$x=y=0$$.

The sequence $$Q_k(6)$$ does not contain perfect squares (hence, no perfect fourth powers), since for $$x\ge 5$$, we have $$(x^3+6)^2<x^6+12x^3+16x^2+6x <(x^3+7)^2$$; also, the sequence $$Q_k(6)$$ does not contain perfect cubes, as for $$x\ge 8$$, we have $$(x^2)^3<x^6+12x^3+16x^2+6x<(x^2+1)^3$$. Simple computations show that the property holds for $$x=1,\dots ,4$$ for squares, and for $$x=1,\dots ,7$$ for cubes.

### Conjecture 3

For $$2\le m\le n-1$$, the number of integer solutions to $$Q_k(n) = y^m$$ is finite.

Conjectures 12, and 3 have been checked for $$k\le 10^4$$. The only perfect power encountered in the sequences $$Q_k(n)$$ for $$n=4,5,6$$, was found for $$n=5$$ and $$k=8$$, where $$Q_8(5) = 6^5+8\cdot 6^2 + 6 \cdot 6 = 8100=90^2$$.

### Conjecture 4

For $$k\ge 2$$, the following asymptotic formula holds:

\begin{aligned} Q_k(n) \sim \frac{\sqrt{3}}{2\sqrt{\pi }} \cdot \frac{k^{n+\frac{1}{2}}}{n^{3/2}} \end{aligned}

as $$n\rightarrow \infty$$.

The formula for $$Q_2(n)$$, conjectured by Andrica and Tomescu in 2002, was proved by Sullivan in 2013. This formula is also consistent with the asymptotic evaluations conjectured for $$Q_k(3)$$ in Example 4, and for $$Q_k(4)$$ in Example 5 (Fig. 1).

## References

1. 1.

Andrews, G.E.: The Theory of Partitions. Cambridge University Press, Cambridge (1998)

2. 2.

Andrews, G.E., Eriksson, K.: Integer Partitions, 2nd edn. Cambridge University Press, Cambridge (2010)

3. 3.

Andrica, D.: A combinatorial result concerning the product of two or more derivatives. Bull. Calcutta Math. Soc. 92(4), 299–304 (2000)

4. 4.

Andrica, D., Ionaşcu, E.J.: Some unexpected connections between Analysis and Combinatorics. In: Rassias, T.M., Pardalos, P. (eds.) Mathematics Without Boundaries. Topics in Pure Mathematics, pp. 1–20. Springer, New York (2014)

5. 5.

Andrica, D., Ionaşcu, E.J.: The signum equation for Erdös–Surányi sequences. Integers 15A, 1–9 (2015)

6. 6.

Andrica, D., Tomescu, I.: On an integer sequence related to a product of trigonometric functions, and its combinatorial relevance. J. Integer Seq. 5, Article 02.2.4 (2002)

7. 7.

Andrica, D., Bagdasar O.: Some remarks on 3-partitions of multisets. Proceedings of the 2nd IMA TCDM’18. Electron. Notes Discrete Math. 70, 1–8 (2018)

8. 8.

Andrica, D., Bagdasar, O.: Recurrent Sequences: Key Results. Applications and Problems. Springer, Berlin (2020)

9. 9.

Andrica, D., Bagdasar, O., Ţurcaş, G.C.: The number of partitions of a set and superelliptic Diophantine equations. In: Raigorodskii, A.M., Rassias, M.T. (eds.) Discrete Mathematics and Applications. Optimization and Its Applications, vol. 165, pp. 35–55. Springer, Cham (2020)

10. 10.

Andrica, D., Ţurcaş, G.C.: An elliptic Diophantine equation from the study of partitions. Stud. Univ. Babeş-Bolyai Math. 70(3), 349–356 (2019)

11. 11.

Bagdasar, O., Andrica, D.: New results and conjectures on 2-partitions of multisets. Proceedings of the 7th ICMSAO’17, IEEE, pp. 1–5 (2017)

12. 12.

Bender, E.A.: Partitions of multisets. Discret. Math. 9, 301–311 (1974)

13. 13.

Bender, E.A., Devitt, J.S., Richmond, L.S.: Partitions of multisets II. Discret. Math. 50, 1–8 (1984)

14. 14.

Erdös, P.: On an elementary proof of some asymptotic formulas in the theory of partitions. Ann. Math. 43(2), 437–450 (1942)

15. 15.

Garey, M.R., Johnson, D.S.: Complexity results for multiprocessor scheduling under resource constraints. SIAM J. Comput. 4, 397–411 (1975)

16. 16.

Garey, M.R., Johnson, D.S.: Computers and Intractability; A Guide to the Theory of NP-Completeness. Freeman, San Francisco (1979)

17. 17.

Pak, I.: Partition bijections, a survey. Ramanujan J. 12, 5–75 (2006)

18. 18.

Sloane, N.J.A: The On-Line Encyclopedia of Integer Sequences. https://oeis.org

19. 19.

Stanley, R.P.: Weyl groups, the hard Lefschetz theorem and the Sperner property. SIAM J. Algebr. Discret. Methods 1, 168–184 (1980)

20. 20.

Sullivan, B.D.: On a conjecture of Andrica and Tomescu. J. Integer Seq. 16, Article 13.3.1 (2013)

21. 21.

Wilf, H.: Generatingfunctionology. Academic Press, New York (1994)

## Acknowledgements

O. Bagdasar’s research was supported by a grant of the Romanian National Authority for Research and Innovation, CNCS/CCCDI UEFISCDI, project number PN-III-P2-2.1-BG-2016-0333, within PNCDI III.

## Author information

Authors

### Corresponding author

Correspondence to Ovidiu Bagdasar.