|
|
A357136
|
|
Triangle read by rows where T(n,k) is the number of integer compositions of n with alternating sum k = 0..n. Part of the full triangle A097805.
|
|
39
|
|
|
1, 0, 1, 1, 0, 1, 0, 2, 0, 1, 3, 0, 3, 0, 1, 0, 6, 0, 4, 0, 1, 10, 0, 10, 0, 5, 0, 1, 0, 20, 0, 15, 0, 6, 0, 1, 35, 0, 35, 0, 21, 0, 7, 0, 1, 0, 70, 0, 56, 0, 28, 0, 8, 0, 1, 126, 0, 126, 0, 84, 0, 36, 0, 9, 0, 1, 0, 252, 0, 210, 0, 120, 0, 45, 0, 10, 0, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,8
|
|
COMMENTS
|
A composition of n is a finite sequence of positive integers summing to n.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
|
|
LINKS
|
|
|
EXAMPLE
|
Triangle begins:
1
0 1
1 0 1
0 2 0 1
3 0 3 0 1
0 6 0 4 0 1
10 0 10 0 5 0 1
0 20 0 15 0 6 0 1
35 0 35 0 21 0 7 0 1
0 70 0 56 0 28 0 8 0 1
126 0 126 0 84 0 36 0 9 0 1
0 252 0 210 0 120 0 45 0 10 0 1
462 0 462 0 330 0 165 0 55 0 11 0 1
0 924 0 792 0 495 0 220 0 66 0 12 0 1
For example, row n = 5 counts the following compositions:
. (32) . (41) . (5)
(122) (113)
(221) (212)
(1121) (311)
(2111)
(11111)
|
|
MATHEMATICA
|
Prepend[Table[If[EvenQ[nn], Prepend[#, 0], #]&[Riffle[Table[Binomial[nn, k], {k, Floor[nn/2], nn}], 0]], {nn, 0, 10}], {1}]
|
|
CROSSREFS
|
The full triangle counting compositions by alternating sum is A097805.
This is the right-half of even-indexed rows of A260492.
The triangle without top row and left column is A108044.
Ranking and counting compositions:
- length = absolute value of alternating sum: A357185, counted by A357183.
A124754 gives alternating sums of standard compositions.
A238279 counts compositions by sum and number of maximal runs.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|