[go: up one dir, main page]

login
Revision History for A163181 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
T(n,k) is the number of weak compositions of k into n parts no greater than (n-1) for n>=1, 0<=k<=n(n-1).
(history; published version)
#14 by Alois P. Heinz at Thu Feb 21 07:56:47 EST 2013
STATUS

editing

approved

#13 by Alois P. Heinz at Thu Feb 21 07:56:40 EST 2013
MAPLE

b:= proc(n, k, l) option remember; `if`(k=0, 1,

`if`(l=0, 0, add(b(n, k-j, l-1), j=0..min(n-1, k))))

end:

T:= (n, k)-> b(n, k, n):

seq(seq(T(n, k), k=0..n*(n-1)), n=1..8); # Alois P. Heinz, Feb 21 2013

#12 by Alois P. Heinz at Thu Feb 21 07:55:44 EST 2013
LINKS

Alois P. Heinz, <a href="/A163181/b163181.txt">Rows n = 1..32, flattened</a>

#11 by Alois P. Heinz at Thu Feb 21 07:54:41 EST 2013
NAME

T(n,k) is the number of weak compositions of k into n parts no greater than (n-1) for n>=1, 0<=k<=n(n-1).

COMMENTS

T(n,k) is the number of length n sequences on an alphabet of {0,1,2,...,n-1} that have a sum of k. Equivalently T(n,k) is the number of functions f:{1,2,...,n}->{0,1,2,...,n-1} such that Sum(f(i)=k, i=1...n).

Row n is also row n of the array of q-nomial coefficients. [From _- _Matthew Vandermast_, Oct 31 2010]

FORMULA

O.g.f. for row n is ((1-x^n)/(1-x))^n . For k<=(n-1), T(n,k) =Binomial C(n+k-1,k).

EXAMPLE

T(3,4) = 6 because there are 6 ternary sequences of length three that sum to 4: {[0, 2, 2}, {], [1, 1, 2}, {], [1, 2, 1}, {], [2, 0, 2}, {], [2, 1, 1}, {], [2, 2, 0}].

CROSSREFS

The maximum of row n is in column k=n(n-1)/2 = A000217(n-1).

For q-nomial arrays, see A000012, A007318, A027907, A008287, A035343, A063260, A063265, A171890. See also A181567. [From _- _Matthew Vandermast_, Oct 31 2010]

STATUS

proposed

editing

#10 by Joerg Arndt at Thu Feb 21 07:50:05 EST 2013
STATUS

editing

proposed

#9 by Joerg Arndt at Thu Feb 21 07:49:19 EST 2013
KEYWORD

nonn,tabl,tabf,changed

#8 by Joerg Arndt at Thu Feb 21 07:48:09 EST 2013
KEYWORD

nonn,tabl,changed

STATUS

proposed

editing

#7 by Geoffrey Critzer at Thu Feb 21 07:19:20 EST 2013
STATUS

editing

proposed

#6 by Geoffrey Critzer at Thu Feb 21 06:52:32 EST 2013
MATHEMATICA

(*warning very inefficient*) Table[Distribution[Map[Total, Strings[Range[n], n]]], {n, 1, 6}]//Grid (*warning very inefficient*)

#5 by Geoffrey Critzer at Thu Feb 21 06:50:36 EST 2013
MATHEMATICA

Table[Distribution[Map[Total, Strings[Range[n], n]]], {n, 1, 6}]//Grid (*warning very inefficient*)

nn=100; Table[CoefficientList[Series[Sum[x^i, {i, 0, n-1}]^n, {x, 0, nn}], x], {n, 1, 10}]//Grid (* Geoffrey Critzer, Feb 21 2013*)

STATUS

approved

editing