login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.
The version for partitions is A103919, full triangle A344651.
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:
- product = sum: A335404, counted by A335405.
- sum = twice alternating sum: A348614, counted by A262977.
- length = alternating sum: A357184, counted by A357182.
- length = absolute value of alternating sum: A357185, counted by A357183.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A025047 counts alternating compositions, ranked by A345167.
A032020 counts strict compositions, ranked by A233564.
A124754 gives alternating sums of standard compositions.
A238279 counts compositions by sum and number of maximal runs.
Sequence in context: A173662 A263406 A257230 * A172026 A296046 A060318
KEYWORD
nonn,easy,tabl
AUTHOR
Gus Wiseman, Sep 30 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)