This site is supported by donations to The OEIS Foundation.

Restricted compositions

From OeisWiki
(Redirected from Integer compositions into n parts of size at most m)
Jump to: navigation, search


This article page is a stub, please help by expanding it.


Restricted size of parts

(...)

Restricted number of parts

Note that since the empty sum is defined as 0, the number of compositions into 0 parts of 0 is 1.

The number of compositions into
k
parts of a positive integer
n
is (choose
k  −  1
separators among the
n  −  1
potential separators between
n
stones in a single row)
     
c (n, k )  =  (
n − 1
k − 1
), 1kn.

The number of compositions with at most
k
parts of a positive integer
n
is
     
k
i  = 1
  
c  (n, i )  = 
k
i  = 1
  
(
n − 1
i − 1
), 1kn.

The number of compositions with at least
k
parts of a positive integer
n
is
     
n
i  = k
  
c  (n, i )  = 
n
i  = k
  
(
n − 1
i − 1
), 1kn.

The number of compositions with an odd number of parts of a positive integer
n
is

(...)

The number of compositions with an even number of parts of a positive integer
n
is

(...)

Restricted number of parts and restricted size of parts

n parts of size at most m

Compositions of
n   ≤   k   ≤   mn
in to
n
parts, with size of parts not greater than
m
.
The number of compositions of
n   ≤   k   ≤   mn
into
n
parts with size of parts not greater than
m
is given by the coefficient of
xk
in
(
m

i  = 1
xi  )n = xn (
m − 1

i  = 0
xi  )n
, thus by the [univariate]
m
-nomial coefficient
Cm(n ,   j )
of
x   j = xk  − n
in
(
m − 1

i  = 0
xi  )n
.
The [univariate]
m
-nomial coefficients,
m   ≥   2
, are obtained by the recurrence relation
Cm(0, 0)  :=  1;
Cm(n ,   j )  :=
j
i  = j − (m − 1) n
  
Cm(n − 1, i ), n ≥ 1, 0 ≤   j ≤ (m − 1) n,
where
Cm(n,   j )   :=   0
for
  j < 0
or
  j > (m  −  1) n
.
For [univariate]
m
-nomial coefficient array, row
n   ≥   0
is the sequence of coefficients of
x   j, 0   ≤    j   ≤   (m  −  1) n ,
in
(
m  − 1

i  = 0
xi  )n
.

m
[Univariate]
m
-nomial coefficients (concatenated rows, row
n   ≥   0 
)
A-number
2 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 6, 15, 20, 15, 6, 1, 1, 7, 21, 35, 35, 21, 7, 1, 1, 8, 28, 56, 70, 56, 28, 8, 1, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1, ... A007318
3 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 6, 7, 6, 3, 1, 1, 4, 10, 16, 19, 16, 10, 4, 1, 1, 5, 15, 30, 45, 51, 45, 30, 15, 5, 1, 1, 6, 21, 50, 90, 126, 141, 126, 90, 50, 21, 6, 1, 1, 7, 28, 77, 161, 266, 357, 393, 357, 266, 161, 77, 28, 7, 1, 1, 8, 36, 112, 266, ... A027907
4 1, 1, 1, 1, 1, 1, 2, 3, 4, 3, 2, 1, 1, 3, 6, 10, 12, 12, 10, 6, 3, 1, 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1, 1, 5, 15, 35, 65, 101, 135, 155, 155, 135, 101, 65, 35, 15, 5, 1, 1, 6, 21, 56, 120, 216, 336, 456, 546, 580, 546, 456, 336, 216, 120, 56, 21, 6, 1, ... A008287
5 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 18, 19, 18, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 52, 68, 80, 85, 80, 68, 52, 35, 20, 10, 4, 1, 1, 5, 15, 35, 70, 121, 185, 255, 320, 365, 381, 365, 320, 255, 185, 121, 70, 35, 15, 5, 1, 1, 6, 21, 56, 126, 246, 426, 666, ... A035343
6 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 80, 104, 125, 140, 146, 140, 125, 104, 80, 56, 35, 20, 10, 4, 1, ... A063260
7 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 33, 36, 37, 36, 33, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 116, 149, 180, 206, 224, 231, 224, 206, 180, 149, 116, 84, 56, 35, ... A063265
8 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 42, 46, 48, 48, 46, 42, 36, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 120, 161, 204, 246, 284, 315, 336, 344, 336, 315, 284, 246, 204, 161, 120, 84, 56, 35, 20, 10, 4, 1, ... A171890
9 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 52, 57, 60, 61, 60, 57, 52, 45, 36, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 120, 165, 216, 270, 324, 375, 420, 456, 480, 489, 480, 456, ... A213652
10 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 63, 69, 73, 75, 75, 73, 69, 63, 55, 45, 36, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 282, 348, 415, 480, ... A213651
11 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 75, 82, 87, 90, 91, 90, 87, 82, 75, 66, 55, 45, 36, 28, 21, 15, 10, 6, 3, 1, ... A??????
12 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 88, 96, 102, 106, 108, 108, 106, 102, 96, 88, 78, 66, 55, 45, 36, 28, 21, 15, 10, 6, 3, 1, ... A??????

Table of possible outcomes
2 throws of “
m
-sided” dice (or 2 spins of
m
-slotted roulette)
All
k
th antidiagonal pairs,
1   ≤   k   ≤   2 m  −  1
, sum to
k + 1

1 2 ... m − 1 m
1 (1, 1) (1, 2) (1, ...) (1, m − 1) (1, m)
2 (2, 1) (2, 2) (2, ...) (2, m − 1) (2, m)
... (..., 1) (..., 2) (..., ...) (..., m − 1) (..., m)
m − 1 (m − 1, 1) (m − 1, 2) (m − 1, ...) (m − 1, m − 1) (m − 1, m)
m (m, 1) (m, 2) (m, ...) (m, m − 1) (m, m)

Coins

Coins (e.g., considering head as 1 and tail as 2) may be taken as “dihedral dice.”

“Dihedral dice” (
n
coins,
n   ≥   2
): compositions of
n   ≤   k   ≤   2 n
into
n
parts, with size of parts not greater than 2.
The number of compositions of
n   ≤   k   ≤   2 n
into
n
parts with size of parts not greater than 2 is given by the (binomials being either [univariate] or [bivariate], since
n2 = n  −  n1
) binomial coefficient
(  nk  )
of
xk
in
(x 1 + x 2 )n = xn (x 0 + x 1 )n
.

Number of compositions of
n   ≤   k   ≤   2 n
with
n
“dihedral dice”
Row
n, n   ≥   0,
is the sequence of [univariate] binomial coefficients of
x   j, 0   ≤   j   ≤   n ,
in
(x 0 + x 1 )n

n
Number of compositions A-number
0 1 A??????
1 1, 1, A??????
2 1, 2, 1 A??????
3 1, 3, 3, 1 A??????
4 1, 4, 6, 4, 1 A??????
5 1, 5, 10, 10, 5, 1 A??????
6 1, 6, 15, 20, 15, 6, 1 A??????
7 1, 7, 21, 35, 35, 21, 7, 1 A??????

A007318 Pascal’s triangle read by rows:
C (n, k ) = (  nk  ) =
n!
k ! (n  −  k )!
 , 0   ≤   k   ≤   n
.
{1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 6, 15, 20, 15, 6, 1, 1, 7, 21, 35, 35, 21, 7, 1, 1, 8, 28, 56, 70, 56, 28, 8, 1, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1, ...}

Dice

Tetrahedral dice
Tetrahedral dice (
n
dice,
n   ≥   2
): compositions of
n   ≤   k   ≤   4 n
into
n
parts, with size of parts not greater than 4.
The number of compositions of
n   ≤   k   ≤   4 n
into
n
parts with size of parts not greater than 4 is given by the coefficient of
xk
in
(x 1 + x 2 + x 3 + x 4 )n = xn (x 0 + x 1 + x 2 + x 3 )n
.

Number of compositions of
n   ≤   k   ≤   4 n
with
n
tetrahedral dice
Row
n, n   ≥   0,
is the sequence of [univariate] quadrinomial coefficients of
x   j, 0   ≤   j   ≤   3 n ,
in
(x 0 + x 1 + x 2 + x 3 )n

n
Number of compositions A-number
0 1 A??????
1 1, 1, 1, 1 A??????
2 1, 2, 3, 4, 3, 2, 1 A??????
3 1, 3, 6, 10, 12, 12, 10, 6, 3, 1 A??????
4 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1 A??????
5 1, 5, 15, 35, 65, 101, 135, 155, 155, 135, 101, 65, 35, 15, 5, 1 A??????
6 1, 6, 21, 56, 120, 216, 336, 456, 546, 580, 546, 456, 336, 216, 120, 56, 21, 6, 1 A??????
7 1, 7, 28, 84, 203, 413, 728, 1128, 1554, 1918, 2128, 2128, 1918, 1554, 1128, 728, 413, 203, 84, 28, 7, 1 A??????

A008287 Triangle of [univariate] quadrinomial (also called tetranomial) coefficients. Row
n, n   ≥   0,
is the sequence of coefficients of
(1 + x + x 2 + x 3 )n
.
{1, 1, 1, 1, 1, 1, 2, 3, 4, 3, 2, 1, 1, 3, 6, 10, 12, 12, 10, 6, 3, 1, 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1, 1, 5, 15, 35, 65, 101, 135, 155, 155, 135, 101, 65, 35, 15, 5, 1, 1, 6, 21, 56, 120, 216, 336, 456, 546, 580, 546, 456, 336, 216, 120, 56, 21, 6, 1, ...}
Cubic dice
Cubic dice (
n
dice,
n   ≥   2
): compositions of
n   ≤   k   ≤   6 n
into
n
parts, with size of parts not greater than 6.
The number of compositions of
n   ≤   k   ≤   6 n
into
n
parts with size of parts not greater than 6 is given by the coefficient of
xk
in
(x 1 + x 2 + x 3 + x 4 + x 5 + x 6 )n = xn (x 0 + x 1 + x 2 + x 3 + x 4 + x 5 )n
.

Number of compositions of
n   ≤   k   ≤   6 n
with
n
cubic dice
Row
n, n   ≥   0,
is the sequence of [univariate] hexanomial coefficients of
x   j, 0   ≤   j   ≤   5 n ,
in
(x 0 + x 1 + x 2 + x 3 + x 4 + x 5 )n

n
Number of compositions A-number
0 1
1 1, 1, 1, 1, 1, 1
2 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1 A??????
3 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1 A056150
4 1, 4, 10, 20, 35, 56, 80, 104, 125, 140, 146, 140, 125, 104, 80, 56, 35, 20, 10, 4, 1 A??????
5 1, 5, 15, 35, 70, 126, 205, 305, 420, 540, 651, 735, 780, 780, 735, 651, 540, 420, 305, 205, 126, 70, 35, 15, 5, 1 A??????
6 1, 6, 21, 56, 126, 252, 456, 756, 1161, 1666, 2247, 2856, 3431, 3906, 4221, 4332, 4221, 3906, 3431, 2856, 2247, 1666, 1161, 756, 456, 252, 126, 56, 21, 6, 1 A108907
7 1, 7, 28, 84, 210, 462, 917, 1667, 2807, 4417, 6538, 9142, 12117, 15267, 18327, 20993, 22967, 24017, 24017, 22967, 20993, 18327, 15267, 12117, 9142, 6538, 4417, 2807, 1667, 917, 462, 210, 84, 28, 7, 1 A166322

A063260 [Univariate] sextinomial (also called hexanomial) coefficient array. Row
n, n   ≥   0,
is the sequence of coefficients of
(
5

i  = 0
xi  )n
.
{1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 80, 104, 125, 140, 146, 140, 125, 104, 80, 56, 35, 20, 10, 4, 1, ...}
Octahedral dice
Octahedral dice (
n
dice,
n   ≥   2
): compositions of
n   ≤   k   ≤   8 n
into
n
parts, with size of parts not greater than 8.
The number of compositions of
n   ≤   k   ≤   8 n
into
n
parts with size of parts not greater than 8 is given by the coefficient of
xk
in
(x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 + x 8 )n = xn (x 0 + x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 )n
.

Number of compositions of
n   ≤   k   ≤   8 n
with
n
octahedral dice
Row
n, n   ≥   0,
is the sequence of [univariate] octanomial coefficients of
x   j, 0   ≤   j   ≤   7n ,
in
(x 0 + x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 )n

n
Number of compositions A-number
0 1 A??????
1 1, 1, 1, 1, 1, 1, 1, 1 A??????
2 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1 A??????
3 1, 3, 6, 10, 15, 21, 28, 36, 42, 46, 48, 48, 46, 42, 36, 28, 21, 15, 10, 6, 3, 1 A??????
4 1, 4, 10, 20, 35, 56, 84, 120, 161, 204, 246, 284, 315, 336, 344, 336, 315, 284, 246, 204, 161, 120, 84, 56, 35, 20, 10, 4, 1 A??????
5 1, 5, 15, 35, 70, 126, 210, 330, 490, 690, 926, 1190, 1470, 1750, 2010, 2226, 2380, 2460, 2460, 2380, 2226, 2010, 1750, 1470, 1190, 926, 690, 490, 330, 210, 126, 70, 35, 15, 5, 1 A??????

A171890 [Univariate] octonomial coefficient array. Row
n, n   ≥   0,
is the sequence of coefficients of
(
7

i  = 0
xi  )n
.
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 42, 46, 48, 48, 46, 42, 36, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 120, 161, 204, 246, 284, 315, 336, 344, 336, 315, 284, 246, 204, 161, 120, 84, 56, 35, 20, 10, 4, 1, ...}
Dodecahedral dice
Dodecahedral dice (
n
dice,
n   ≥   2
): compositions of
n   ≤   k   ≤   12 n
into
n
parts, with size of parts not greater than 12.
The number of compositions of
n   ≤   k   ≤   12 n
into
n
parts with size of parts not greater than 12 is given by the coefficient of
xk
in
(x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 + x 8 + x 9 + x 10 + x 11 + x 12 )n = xn (x 0 + x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 + x 8 + x 9 + x 10 + x 11 )n
.

Number of compositions of
n   ≤   k   ≤   12 n
with
n
dodecahedral dice
Row
n, n   ≥   0,
is the sequence of [univariate] dodecanomial coefficients of
x   j, 0   ≤   j   ≤   11 n ,
in
(x 0 + x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 + x 8 + x 9 + x 10 + x 11 )n

n
Number of compositions A-number
0 1 A??????
1 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 A??????
2 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 A??????
3 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 88, 96, 102, 106, 108, 108, 106, 102, 96, 88, 78, 66, 55, 45, 36, 28, 21, 15, 10, 6, 3, 1 A??????
4 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 286, 364, 451, 544, 640, 736, 829, 916, 994, 1060, 1111, 1144, 1156, 1144, 1111, 1060, 994, 916, 829, 736, 640, 544, 451, 364, 286, 220, 165, 120, 84, 56, 35, 20, 10, 4, 1 A??????

A?????? [Univariate] dodecanomial coefficient array. Row
n, n   ≥   0,
is the sequence of coefficients of
(
11

i  = 0
xi  )n
.
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 88, 96, 102, 106, 108, 108, 106, 102, 96, 88, 78, 66, 55, 45, 36, 28, 21, 15, 10, 6, 3, 1, ...}
Icosahedral dice
Icosahedral dice (
n
dice,
n   ≥   2
): compositions of
n   ≤   k   ≤   20 n
into
n
parts, with size of parts not greater than 20.
The number of compositions of
n   ≤   k   ≤   20 n
into
n
parts with size of parts not greater than 20 is given by the coefficient of
xk
in
(
20

i  = 1
xi  )n = xn (
19

i  = 0
xi  )n
.

Number of compositions of
n   ≤   k   ≤   20 n
with
n
icosahedral dice
Row
n, n   ≥   0,
is the sequence of [univariate] icosanomial coefficients of
x   j, 0   ≤   j   ≤   19 n ,
in
(
19

i  = 0
xi  )n

n
Number of compositions A-number
0 1 A??????
1 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 A??????
2 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 A??????
3 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 228, 244, 258, 270, 280, 288, 294, 298, 300, 300, 298, 294, 288, 280, 270, 258, 244, 228, 210, 190, 171, 153, 136, 120, 105, 91, 78, 66, 55, 45, 36, 28, 21, 15, 10, 6, 3, 1 A??????

A?????? [Univariate] icosanomial coefficient array. Row
n, n   ≥   0,
is the sequence of coefficients of
(
19

i  = 0
xi  )n
.
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, ...}

See also





External links