The Combinatorics of Weighted Vector Compositions
Steffen Eger

TL;DR
This paper explores the combinatorial structure of weighted vector compositions, connecting them to probability, calculus, number theory, and asymptotic analysis, and proposing a new primality conjecture.
Contribution
It introduces the concept of weighted vector compositions, linking them to various mathematical areas and extending classical results with new conjectures.
Findings
Relations to sums of random vectors
Formulas for derivatives of composite functions
Congruence properties similar to binomial coefficients
Abstract
A vector composition of a vector is a matrix whose rows sum to . We define a weighted vector composition as a vector composition in which the column values of may appear in different colors. We study vector compositions from different viewpoints: (1) We show how they are related to sums of random vectors and (2) how they allow to derive formulas for partial derivatives of composite functions. (3) We study congruence properties of the number of weighted vector compositions, for fixed and arbitrary number of parts, many of which are analogous to those of ordinary binomial coefficients and related quantities. Via the Central Limit Theorem and their multivariate generating functions, (4) we also investigate the asymptotic behavior of several special cases of numbers of weighted vector compositions. Finally, (5) we conjecture an…
| -color | cross-and-dash | 1-2 compositions |
|---|---|---|
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
The Combinatorics of Weighted Vector Compositions
Steffen Eger
Department of Computer Science
Technical University Darmstadt
Abstract
A vector composition of a vector is a matrix whose rows sum to . We define a weighted vector composition as a vector composition in which the column values of may appear in different colors. We study vector compositions from different viewpoints: (1) We show how they are related to sums of random vectors and (2) how they allow to derive formulas for partial derivatives of composite functions. (3) We study congruence properties of the number of weighted vector compositions, for fixed and arbitrary number of parts, many of which are analogous to those of ordinary binomial coefficients and related quantities. Via the Central Limit Theorem and their multivariate generating functions, (4) we also investigate the asymptotic behavior of several special cases of numbers of weighted vector compositions. Finally, (5) we conjecture an extension of a primality criterion due to Mann and Shanks [28] in the context of weighted vector compositions.
1 Introduction
An integer composition (ordered partition) of a nonnegative integer is a tuple of nonnegative integers whose sum is . The ’s are called the parts of the composition. For fixed number of parts, the number of -weighted integer compositions—also called -colored integer compositions in the literature—in which each part size may occur in different colors, is given by the extended binomial coefficient [12].
We generalize here the notion of weighted integer compositions to weighted vector compositions. For a vector , for , a vector composition [4] of with parts is a matrix such that . We call a vector composition -weighted, for a function , when each part of ‘size’ may occur in one of different colors in the composition. For example, for and :
[TABLE]
and for all other , there are seven distinct -weighted vector compositions of , namely:
[TABLE]
where distinguishes between the two values of . For fixed number of parts, we denote the number of distinct -weighted vector compositions of by . Moreover, the number of -weighted vector compositions with arbitrarily many parts is then given by .
The number of -weighted vector compositions with parts may be represented as
[TABLE]
When the function takes values in (or even in a commutative ring), then the RHS of Eq. (4) gives the total weight of all vector compositions of with parts, where we define the weight of a composition as .
We study -weighted vector compositions from several viewpoints. Section 2 relates weighted vector compositions to sums of random vectors. Section 3 introduces basic identities for which will be used in follow-up results. Section 4 derives a formula for partial derivatives of composite functions using these identities. Our formula generalizes the famous formula of Faà di Bruno (see [26]) for the higher order derivatives of a composite function. Section 5 gives divisibility properties of and in Section 6, we derive congruences and identities for sums of , including . Our results in these two sections generalize corresponding results from [16, 41] for weighted integer compositions, and others for ordinary binomial coefficients. We also generalize here the notion of so-called -color compositions in which a part of size may occur in different colors in a composition [2]. We discuss asymptotics of weighted vector compositions in Section 7 and the primality criterion of Mann and Shanks [28] in the context of weighted vector compositions in Section 8.
In the rest of this work, we use the following notation and definitions. We write vectors and matrices in bold font () to distinguish them from ‘scalars’ (). We write vectors as row vectors (). We write the components of a vector as and similarly for matrices. We use the standard notation, , for ordinary binomial coefficients, which are a special case of our setup. They are retrieved when and is the indicator function on , that is, for and for all other .
We let be the set of nonnegative integers. Let and let . Let and let . Let
[TABLE]
be the set of all non-zero part sizes in ‘bounded from above’ by , and let . Let the elements in or be enumerated as . We denote by the set
[TABLE]
of vector partitions (unordered compositions) of with parts, including part size . Here, are the multiplicities of the part sizes . We similarly define as the set of vector partitions of with parts, excluding . We write for the set of vector partitions, part size included, of with arbitrary number of parts:
[TABLE]
and analogously for .111When it is clear from context whether is included or not, we may also write for both and , and similarly for related quantities. For a scalar and a vector , we write , when for all components of .
Background: Weighted vector compositions generalize the concept of vector compositions introduced in Andrews [4]. In fact, vector compositions are -weighted vector compositions for which is the indicator function on . For the same , Munarini et al. [31] introduce matrix compositions. These are matrices whose entries sum to a positive integer and whose columns are non-zero. We find that the number of matrix compositions of for matrices with rows satisfies .
Vector compositions are also closely related to lattice path combinatorics [44]. Lattice paths are paths from the origin to some point where each step lies in some set . In our case, each coordinate of each step is nonnegative. Vector compositions also generalize the concept of alignments considered in computational biology and computational linguistics [20]. For example, the number of (standard) alignments of sequences of lengths is given by , where is the indicator function on . When is the indicator function on more ‘complex’ , counts “many-to-many” alignments [15].
Weighted integer compositions, that is, the case when , go back to [29] and [46, 47]. Recently, they have attracted attention in the form of so-called -color compositions, for which is specified as identity function, that is, [2, 21, 32, 39, 41]. More general have been considered in [1, 7, 12, 17, 16, 25, 40], to name just a few. Results on standard integer compositions, i.e., where is the indicator function on or a subset thereof, are found in [23].
2 Relation to multivariate random variables
Let be i.i.d. discrete random vectors with common distribution function , for . Then the distribution of the sum is given by
[TABLE]
Let be the discrete uniform measure on some . Then
[TABLE]
where is the indicator function on . Thus . Moreover, may be approximated by the multivariate normal distribution according to the multivariate Central Limit Theorem (CLT). That is, for large , can be approximated by the density
[TABLE]
where and are the mean vector and covariance matrix of , respectively. Here, is the mean vector of each and is the covariance matrix among the components of , where denotes its determinant. The approximation holds for large .
Example 2.1**.**
Let , for integers . Let be uniformly distributed on , for all . We have . Since the components of are independent of each other and since the variance of each component of is given by (variance of uniform distributed random variable on ), we find that
[TABLE]
This leads to the approximation
[TABLE]
When and we obtain the well-known approximation for the central binomial coefficient .
Example 2.2**.**
Let . Let be uniformly distributed on . We have
[TABLE]
Therefore . Moreover and thus
[TABLE]
Hence:
[TABLE]
For example, we have
[TABLE]
while the approximation formula yields , which amounts to a relative error of less than 5%. Analogously,
[TABLE]
while the approximation formula yields , which amounts to a relative error of less than 4%.
The idea of deriving asymptotics of coefficients via the CLT, that underlies our above approximations, has been developed in different works such as [14, 49]; see [30] for a survey. While such results can also be obtained via singularity or saddle point analysis methods using the generating function for in our case [18, 36], using the CLT with suitably defined random variables is an alternative that may guarantee additional desirable properties such as uniform convergence [33].
3 Basic identities
In the sequel, we write for where and .
For and and , consider the coefficient of of the power series in the variables , where:
[TABLE]
and denote it by . Our first theorem states that denotes the combinatorial object we are investigating in this work, the number of -weighted vector compositions of (with a fixed number, , of parts). Therefore is the generating function for .
Theorem 3.1**.**
We have that .
Proof.
Collecting terms in (2), we see that is given as
[TABLE]
where the sum is over all nonnegative vector solutions to . Using (1) proves the theorem. ∎
Next, we list four identities for which we will make use of in the proofs of (divisibility) properties of the number of vector compositions later on.
Theorem 3.2**.**
Let and . Then, the following hold:
[TABLE]
In (4), denote the multinomial coefficients. In (5), which we will call Vandermonde convolution, the sum is over all solutions , , of , and the relationship holds for any fixed composition of , for . In (6), is an integer satisfying . In (7), and by we denote the function for which , for all , and .
Proof.
(4) follows from rewriting the sum in (3) as a summation over vector partitions rather than over vector compositions and then adjusting the factors in the sum. (5) follows because each vector composition of with parts can be subdivided into a fixed number of ‘subcompositions’ with parts. These represent weighted vector compositions of vectors with parts and the subcompositions are independent of each other, given that the ’s sum to . In view of our previous discussions, we prove (6) for sums of random vectors. For , let denote the partial sum of i.i.d. random vectors . Consider the conditional expectation , for which the relation
[TABLE]
holds, by independent and identical distribution of . Moreover, by definition of conditional expectation, we have that
[TABLE]
Combining the two identities for and rearranging yields (6). To prove (7), let . The part value may occur times in a vector composition of with parts. When it occurs exactly times we are left with a composition of into parts in which does not occur anymore. The factor distributes the parts with value among parts and the parts may be colored independently into colors. ∎
Remark 3.3**.**
Note the following important special case of (5) which results when we let and and ,
[TABLE]
which establishes that the quantities may be perceived of as generating a “Pascal triangle”-like array in which entries in row are weighted sums of the entries in row . However, note that the entries in rows themselves lie in an -dimensional space.
We also note the following special cases of .
Lemma 3.4**.**
For all , we have that:
[TABLE]
∎
4 Combinatorics of partial derivatives
The formula of Faà di Bruno (1825-1888) describes the higher-order derivatives of a composite function as a combinatorial sum of the derivatives of the individual functions and . Hardy [22] generalizes this formula to partial derivatives, arguing that treating variables in the derivatives as distinct is more natural. We provide an alternative derivation of the partial derivative formula which is based on interpreting as the generating function for weighted vector compositions. As a consequence, the formulas for partial derivatives of composite functions follow effortlessly from different identities for weighted vector compositions.
For two power series and with and , we first ask for the power series representation of . We find that
[TABLE]
by Theorem 3.1. Hence, using (1), we obtain
[TABLE]
where we let stand for (vector compositions of with fixed number of parts) and analogously represents the class of vector compositions of with arbitrary number of parts. Moreover, we use the abbreviation and denotes the number of parts in . Note that the above representation generalizes the analogous representation derived in Vignat and Wakhare [48] to the multivariate case.
Since
[TABLE]
for any power series , we immediately have several Faà di Bruno like representations of partial derivatives. Here, we write for , for and for .
Theorem 4.1**.**
Let , with and . Let and assume that and have a sufficient number of derivatives. Then
[TABLE]
∎
Note that in the theorem, terms with drop, so we can perceive of the sum as being over non-zero parts .
Alternative representations of the partial derivative can be derived by considering different identities for . For example, using (4), we obtain Theorem 4.2 below. Still other representations follow analogously from considering further identities of , e.g., (7), plugged into the representation of in (8) above.
Theorem 4.2**.**
Let , with and . Let and assume that and have a sufficient number of derivatives. Then
[TABLE]
where .∎
Example 4.3**.**
Let . Then . Moreover,
[TABLE]
Therefore, according to Theorem 4.2
[TABLE]
We now show that Theorem 4.1 (or equivalently Theorem 4.2) generalizes the main formula derived in [22]. Recall that a set partition of is a set of disjoint, non-empty subsets of whose union is .
Lemma 4.4**.**
There is a bijection between the set of all vector partitions (unordered compositions) of the vector into non-zero parts and the set of all set partitions of into parts.
The proof of the lemma is straightforward. We can assign each set partition (where , , ) the vector partition where is a vector whose entries are for all indices in and zero otherwise (and vice versa). Due to the properties of , yields .
Further, since the parts of each vector partition of into non-zero parts are all distinct, we also have that .
To derive the main result in [22], we now let in Theorem 4.1 be (each of variables occurs exactly once). Then and and . Thus,222In the equation, we perceive of as directly containing unordered vectors, rather than multiplicities as in our original definition.
[TABLE]
Interpreting the last quantity as a sum over set partitions, using Lemma 4.4, with the as subsets of yields the formula (5) in [22].
Correspondingly, our representation in Theorem 4.2 is the direct analogue of the representation in [22] based on ‘multiset partitions’ (Corollary to Propositions 1 and 2 in [22] combined with Proposition 4 therein).
There has been some debate on the combinatorial nature of higher-order derivatives. While they may (thus) be perceived of as set partitions [22, 26], Yang [50] finds that they are “essentially integer partitions”. Noting the relationships and equivalences between these concepts and based on our derivations, we may also claim that partial derivatives of composite functions are essentially vector compositions!
5 Congruences for
Theorem 5.1** (Parity of ).**
Let and let . Then
[TABLE]
Proof.
We distinguish three cases.
- •
Case : Let be even and let one entry of be odd. Consider (6) in Theorem 3.1 with . If is even, the right-hand side vector is even in each entry. Thus, if is odd in one entry, must be even.
- •
Case : Let be even and be even in each entry. Consider the Vandermonde convolution in the case of and . Then,
[TABLE]
All pairs for which occur exactly twice, so their sum contributes nothing modulo . The only term that does not occur twice is , for which . Hence,
[TABLE]
- •
Case : Let be odd. Then is even. Thus, the Vandermonde convolution with , implies
[TABLE]
where we use Case and Case in the last congruence.
∎
Example 5.2**.**
Let and let for all
. Let for all other . Then, by Theorem 5.1,
[TABLE]
In fact, . In contrast,
[TABLE]
Indeed, .
Theorem 5.3**.**
Let be prime, . Then
[TABLE]
We sketch three proofs of Theorem 5.3, a combinatorial proof and two proof sketches based on identities in Theorem 3.2. The first proof uses the following lemma (see [3]).
Lemma 5.4**.**
Let be a finite set, let be prime, and suppose has the property that for any in , where is the -fold composition of . Then , where is the set of fixed points of . ∎
Proof of Theorem 5.3, 1.
Let , a map from the set of -weighted vector compositions of with parts to itself, be the operation that shifts all parts one to the right, modulo . In other words, maps (denoting colors by superscripts) to
[TABLE]
Of course, applying times yields the original vector composition, that is, for all . We may thus apply Lemma 5.4. If allows a representation for some suitable , has exactly fixed points, namely, all compositions to . Otherwise, if has no such representation, has no fixed points. This proves the theorem. ∎
Proof of Theorem 5.3, 2.
We apply (7) in Theorem 3.2. Since for the ordinary binomial coefficients, the relation holds for all and , we have
[TABLE]
for any and where the last congruence is due to Fermat’s little theorem. Therefore, if for some , then and otherwise for any . Now, the theorem follows inductively. ∎
Proof of Theorem 5.3, 3.
We use (4) in Theorem 3.2 in conjunction with the following property of multinomial coefficients (see, e.g., [38]):
[TABLE]
Since the multiplicities for in (4) satisfy , we have , since otherwise was composite. Moreover, if and only if exactly one of the equals and all the other are zero. Hence, whenever , for any , then for all in the summation, for otherwise, the condition would imply that , a contradiction. Therefore, since all terms in the summation in (4) are congruent to zero modulo by (9). Consider now the case for some . Then, , that is, for some . Again, the only terms in the summation that contribute modulo are those for which . Thus, there is exactly one term that contributes, namely, . Therefore, . ∎
We call the next congruence Babbage’s congruence, since Charles Babbage was apparently the first to assert the respective congruence in the case of ordinary binomial coefficients [5].
Theorem 5.5** (Babbage’s congruence).**
Let be prime, let be a nonnegative integer, and let . Then
[TABLE]
whereby is defined as , for all .
Proof.
By the Vandermonde convolution, we have
[TABLE]
Now, by Theorem 5.3, divides whenever is not of the form . Hence, modulo , the only terms that contribute to the sum are those for which at least ’s are of the form . Since the ’s must sum to , this implies that all ’s are of the form , for . Hence, modulo , (10) becomes
[TABLE]
The last sum is precisely . ∎
Example 5.6**.**
Let be the indicator function on the set
. Let , , and . Enumeration shows that
[TABLE]
Moreover, can be determined by looking at the compositions of in two parts, which are . We have and . Hence, , as predicted.
Since , by Theorem 5.3, we have the following theorem.
Theorem 5.7**.**
Let be prime, let be a nonnegative integer, and let . Then
[TABLE]
∎
We use Theorem 5.7 to prove a stronger version of Theorem 5.3, namely:
Theorem 5.8**.**
Let be prime and let , . Then
[TABLE]
Proof.
Let . Using Theorem 5.7 twice, we find for
[TABLE]
Using this, we find that:
[TABLE]
and so on for any .
Consider now the case for any . We use (7) from Theorem 3.2 together with the fact that when and whenever . From this it follows that
[TABLE]
for any . We can successively set all arguments of to zero and note that hence . ∎
Now, we consider the case when in is not of the form for any .
Theorem 5.9**.**
Let be prime and let be a nonnegative integer. Let not be of the form , for any . Then
[TABLE]
where is as defined in Theorem 5.5.
Proof.
By the Vandermonde convolution, (5), we find that
[TABLE]
As in the proof of Theorem 5.9, at least factors must be such that . Not all factors can be of the form , since otherwise , a contradiction. Hence, exactly factors must be of the form , and therefore,
[TABLE]
Now, the equation has solutions if and only if , that is, when there exists such that . ∎
Example 5.10**.**
Let , and . In this situation, the only suitable in the previous theorem is to which corresponds . The theorem thus implies that
[TABLE]
Let for all and otherwise. Then since . Moreover, . Therefore
[TABLE]
Indeed,
[TABLE]
Theorem 5.11**.**
Let , . Let and let . Then
[TABLE]
for all . Equivalently,
[TABLE]
Here, is the number , where the have prime factorization and where , for all .
Proof.
From (6), with , write
[TABLE]
Now, for any , consider this equation at component , dividing by :
[TABLE]
Since , this means that for all . ∎
Example 5.12**.**
Let be the indicator function on the set
. Enumeration shows that
[TABLE]
We have and . Hence divides , and indeed, .
Theorem 5.13**.**
Let be prime, arbitrary. Then,
[TABLE]
where for .
In the theorem, note that . Also note that the limit of the summation for is (more adequately described as) .
Proof.
From (4), can be written as
[TABLE]
For a term in the sum, either or , since otherwise, if , then, , whence is composite, a contradiction. Those terms on the RHS of (11) for which contribute nothing to the sum modulo , by (9), so they can be ignored. But, from the equation , the case happens precisely when:
- •
there are unit vectors , for , each of whose associated multiplicity is , as well as the zero vector , whose multiplicity is , such that .
∎
Example 5.14**.**
When , then . Hence,
because only the term leads to a valid solution, since cannot be the sum of two or more elements from . When , then and the relevant terms are . The formula becomes
[TABLE]
Recall that the ordinary binomial coefficients satisfy Lucas’ theorem, namely,
[TABLE]
whenever and with . Bollinger and Burchard [8] generalize this to extended binomial coefficients. We further generalize to weighted vector compositions.
Theorem 5.15** (Lucas’ theorem).**
Let be prime and let , where for . Let . Then
[TABLE]
whereby the sum is over all that satisfy .
Proof.
We have
[TABLE]
where the fourth relation (congruence) follows from Theorem 5.8, and the theorem follows by comparing the coefficients of . ∎
Example 5.16**.**
For a similar situation as in Example 5.6, let and . Thus, . For , the relevant such that are:
[TABLE]
No other must be looked at, because and and the specified is zero outside . Hence:
[TABLE]
by Theorem 5.15, which is true, since .
Our final result in this section allows a fast computation of the coefficients modulo a prime . See Granville [19] for the corresponding result for the special case of ordinary binomial coefficients.
Theorem 5.17**.**
Let be prime, , . Then,
[TABLE]
whereby with , and , where each component of satisfies .
Proof.
We have
[TABLE]
by Theorem 5.3 and therefore, with , for ,
[TABLE]
Now, since is the coefficient of of , we have
[TABLE]
and the theorem follows after re-indexing the summation on the RHS. ∎
Example 5.18**.**
In the situation of Example 5.16, consider , and . By Theorem 5.17, we have hence to consider sums of products of the form
[TABLE]
Since is zero outside of , ranges over
and the summation is the same as in Example 5.16.
For a more challenging example, let , and . Here, we have to consider sums of products of the form
[TABLE]
Due to the specification of , the only possible such term () leads to the sum value of [math]. Indeed, .
6 Congruences and identities for sums of
In this section, we consider divisibility properties and identities for sums of . First, we focus on the number of vector compositions with arbitrary number of parts. In Theorems 6.8 and 6.10, we then investigate particular divisibility properties for the total number of all -weighted vector compositions of where ranges over particular sets and where the number of parts is fixed, that is, we evaluate divisibility of . We also generalize the notion of -color compositions [2] in this section and derive a corresponding identity.
At first, we establish that satisfies a weighted linear recurrence where the weights are given by .
Theorem 6.1**.**
For , , we have that
[TABLE]
where we define and if any component of is smaller than zero.
Proof.
An -weighted vector composition of ends, in its last part, with exactly one of the values , and may be colored in different colors. Moreover, is a vector composition of . ∎
Before investigating divisibility of , we detail special cases of that arise for particular .
Example 6.2**.**
When is the indicator function on the set
, then is the well-known Delannoy sequence [6], which counts the number of lattice paths from to with steps in (i.e., east, north, north-east). The underlying lattice paths are of interest in sequence alignment problems in computational biology and computational linguistics. They also appear in so-called edit distance problems [27] in which the minimal number of insertions and deletions is sought that transforms one sequence into another. Closed-form expressions for the Delannoy numbers are
[TABLE]
The weighted Delannoy numbers [37], for which ,
and , for integers , have closed-form expression
[TABLE]
When is the indicator function on the set , then are known as Whitney numbers [9]. The diagonals are listed as integer sequence A051286. A closed-form expression can be derived as
[TABLE]
The diagonals of , where , are listed as integer sequence A098479. The diagonals of , where , are listed as integer sequence A047781. The diagonals of , where , are listed as integer sequence A126086. They appear in alignment problems of multiple (in this case, three) sequences. The case of , for , counts the original vector compositions considered in [4]. A closed-form expression is given by
[TABLE]
It has been noted that , where
[11]. The latter numbers generalize the Delannoy numbers and admit the closed-form expression [42]
[TABLE]
Next, we generalize the concept of -color compositions for ordinary colored compositions, for which the weighting function is for each part size , to weighted vector compositions. Of course, there are many possible extensions of the concept of -color integer compositions to vector compositions. The most natural is probably the following:
Definition 6.3**.**
We call an -weighted vector composition of an -color composition when
[TABLE]
for all .
This definition inherently captures an independent labeling of the vector components into colors (for component ),, colors (for component ). It is well-known that ordinary -color compositions [2] are closely related to “1-2-color compositions”, that is, integer compositions that only have part sizes in ; see, e.g., Shapcott [41]. The next theorem generalizes this relationship.
Theorem 6.4**.**
Let for all and let be the indicator function on . Then
[TABLE]
for all .
Proof sketch.
Let be the colorations of part size . We bijectively re-write them to individual components . Now, when we have a sum (and similarly for more than two terms) this reads in components
[TABLE]
where and denote the bijective re-writings. Consider this equation in each row, . Encode the integer composition of into the “cross-and-dash representation” of Shapcott [41] in which crosses separate parts and a part value of size with color is denoted by dashes and one cross in position . Then, as in Shapcott [41], Proposition 2, let crosses stand for 1s and dashes for 2s. This proves the bijection between -weighted compositions and -weighted compositions.
The table below illustrates the -color compositions of (into two parts) and the uniquely corresponding -weighted compositions (into four parts).
The table omits the further eight cases corresponding to and . ∎
Example 6.5**.**
The number of -weighted vector compositions of are given by the integer sequence
[TABLE]
for . The number of -weighted vector compositions of are given by integer sequence A051286
[TABLE]
When is arbitrary but zero almost everywhere, that is, for only finitely many , then satisfies a linear recurrence by Theorem 6.1. When , that is, vectors are one-dimensional, then satisfies an -th order linear recurrence of the form
[TABLE]
in this situation.
For such sequences, Somer [43] specifies varying congruence relationships, one of which translates to the following result in our context.
Theorem 6.6** ([16], Theorem 27).**
Let be a prime and let a nonnegative integer. Let be zero almost everywhere, i.e., for all for some positive . Then
[TABLE]
∎
However, when , these results are not applicable. One possibility would be to project vectors in onto via a bijection and then define new quantities
[TABLE]
for which the findings of [43] and others might be applicable. The problem with such a specification is that the bijection does not lead, in general, to fixed order linear recurrences because can map different to ‘arbitrary’ points in , so that e.g. may be a function of and , but may be a function of and .
Another result, for , is the following. Consider the weighted Delannoy numbers for which , and as above. Razpet [37] shows that these numbers satisfy a ‘Lucas property’.
Theorem 6.7** ([37], Theorem 2).**
Let be prime, , and let integers satisfy
[TABLE]
Then
[TABLE]
∎
Finally, we consider the number of -weighted vector compositions, with fixed number of parts, of all vectors in some particular sets . Introduce the following notation:
[TABLE]
where is the set of diagonal matrices with nonnegative integer entries. Note that generalizes the binomial sum notation (cf. [45]). By the Vandermonde convolution, satisfies
[TABLE]
Our first theorem in this context goes back to J. W. L. Glaisher, and its proof is inspired by the corresponding proof for binomial sums due to Sun (cf. [45], and references therein).
Theorem 6.8**.**
Let . For any prime , for all , and any , ,
[TABLE]
Proof.
For ,
[TABLE]
by Theorem 5.3. Now, in components, the equation means that . Since , we have , i.e., . In vector notation this means for the diagonal matrix with entries . Therefore,
[TABLE]
using Theorem 5.7. The RHS is . For , the result follows by induction using (12). ∎
Example 6.9**.**
Let be the indicator function on the set . Let , , and . To evaluate , we consider all matrices and all corresponding sums . Since it is impossible to write (or larger) as the sum of numbers in , must be zero. The only suitable matrices are then
[TABLE]
The corresponding values are
[TABLE]
We easily find that and therefore . Similarly, for , we have to evaluate matrices
[TABLE]
and correspondingly
[TABLE]
for . Summing up yields , which is indeed .
Theorem 6.10**.**
Let for almost all . Consider , the row sum in row , or, equivalently, the total number of -weighted vector compositions with parts. Let . Then
[TABLE]
for all . This implies the congruences
[TABLE]
for any prime by Fermat’s little theorem, where , with for all .
Proof.
Consider the equation . Plug in . ∎
Remark 6.11**.**
Note that the previous theorem generalizes the fact that the number of odd entries in row in Pascal’s triangle is a multiple of .
Example 6.12**.**
When is the indicator function on then and so the row sum in row is and thus always odd. To illustrate, for , we have , so their sum is . For , we have to consider all with . We find for all such that is non-zero:
[TABLE]
Hence, their sum is indeed .
7 Asymptotics of
We can find asymptotics of by looking at its multivariate generating function
[TABLE]
While methods for determining the asymptotic growth of the coefficients of a generating function in one variable are well-established [18], methods for generating functions of several variables are less ubiquitous. However, [35] and [34] discuss such cases. Particularly simple results obtain when is symmetric in .
For instance, [35] discuss the case when is the indicator function on , so that . They determine the set of “critical points”, that is, the points that satisfy and in the positive orthant. They find that , where is the only solution, from which follows the asymptotic
[TABLE]
using their Theorems 3.2 and 3.3. More general cases such as when is the indicator function on or on can be solved analogously, but require more work to find the critical points and the implied asymptotics.
Theorem 7.1** ([20], Theorem 2).**
Let be the indicator function on . Then
[TABLE]
∎
Theorem 7.2** ([17], Theorem 4).**
Let be the indicator function on . Moreover, let and let . Define h=N\Bigl{(}\frac{\phi}{1+3\phi+2\phi^{2}}\Bigr{)}^{N-1} and . Then
[TABLE]
∎
Example 7.3**.**
For the in the last theorem, the number equals while the approximation formula has , which amounts to a relative error of less than .
Note that in the last theorem is closely related to by Theorem 6.4, which immediatley yields another asymptotic formula.
8 Prime criteria
Mann and Shanks’ [28] prime criterion states that an integer is prime if and only if divides the adjusted binomial coefficients for all with . This criterion can be extended to -weighted integer compositions () when takes on the value for all elements inside the ‘unit sphere’, that is, 0 and 1 [13, 17]. For , it is tempting to conjecture as follows.
Conjecture 8.1**.**
Let for all . Then, an integer is prime if and only if divides for all integers with .
If is prime, then indeed for all integers with . This is a simple consequence of Theorem 5.11. Conversely, when is not prime, then is odd or even. When is even, does not divide . However, when is odd, the situation is more difficult. Mann and Shanks choose , for a prime divisor of and a suitable . This choice is appropriate for and the stated requirements on . However, already for , we find a counter-example to this choice (when is the indicator function on ). Namely, when , then is a prime divisor of and we have where . Then by Theorem 5.13 and Example 5.14. Numerical evaluation shows that this sum is . However, while this choice is not suitable, there are others for (namely ). We leave Conjecture 8.1 as an open problem.
9 Conclusion
Many extensions of our results are conceivable. We have shown that the basis for weighted vector compositions are sums of independent and identically distributed random vectors. Other types of compositions can be investigated in which part sizes are correlated [10]. The basis for this class of compositions would be sums of dependent random vectors. Many approximations both for dependent and independent sums of random variables are known, e.g., [24]. How do these translate to approximation results for weighted compositions? Finally, we have generalized weighted integer compositions to weighted vector compositions. One could further generalize to weighted matrix compositions or general weighted tensor compositions, that is, compositions of arbitrary multidimensional arrays.
Acknowledgements
The author wishes to thank the anonymous referee for helpful suggestions.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] M. Abrate, S. Barbero, U. Cerruti, and N. Murru. Colored compositions, invert operator and elegant compositions with the “black tie”. Discrete Math. , 335:1 – 7, 2014.
- 2[2] A. K. Agarwal. n 𝑛 n -colour compositions. Indian J. Pure Appl. Math , 31:1421–1427, 2000.
- 3[3] P. G. Anderson, A. T. Benjamin, and J. A. Rouse. Combinatorial proofs of Fermat’s, Lucas’s, and Wilson’s theorems. Amer. Math. Monthly , 112(3):266–268, 2005.
- 4[4] G. E. Andrews. The theory of partitions, ii: Simon newcom’s problem. Utilitas Math. , 7:33–54, 1975.
- 5[5] C. Babbage. Demonstration of a theorem relating to prime numbers. The Edinburgh Philosophical Journal , 1:46–49, 1819.
- 6[6] C. Banderier and S. Schwer. Why Delannoy numbers? J. Statist. Plann. Inference , 135(1):40 – 54, 2005.
- 7[7] D. Birmajer, J. Gil, and M. D. Weiner. Compositions colored by simplicial polytopic numbers. J. Comb. , 9(2):221–232, 2018.
- 8[8] R. Bollinger and C. Burchard. Lucas’s theorem and some related results for extended Pascal triangles. Amer. Math. Monthly , 97(3):198–204, Mar. 1990.
