cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A357136 #13 Nov 02 2023 07:54:50
%S A357136 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,
%T A357136 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,
%U A357136 36,0,9,0,1,0,252,0,210,0,120,0,45,0,10,0,1
%N 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.
%C A357136 A composition of n is a finite sequence of positive integers summing to n.
%C A357136 The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
%e A357136 Triangle begins:
%e A357136     1
%e A357136     0   1
%e A357136     1   0   1
%e A357136     0   2   0   1
%e A357136     3   0   3   0   1
%e A357136     0   6   0   4   0   1
%e A357136    10   0  10   0   5   0   1
%e A357136     0  20   0  15   0   6   0   1
%e A357136    35   0  35   0  21   0   7   0   1
%e A357136     0  70   0  56   0  28   0   8   0   1
%e A357136   126   0 126   0  84   0  36   0   9   0   1
%e A357136     0 252   0 210   0 120   0  45   0  10   0   1
%e A357136   462   0 462   0 330   0 165   0  55   0  11   0   1
%e A357136     0 924   0 792   0 495   0 220   0  66   0  12   0   1
%e A357136 For example, row n = 5 counts the following compositions:
%e A357136   .  (32)     .  (41)   .  (5)
%e A357136      (122)       (113)
%e A357136      (221)       (212)
%e A357136      (1121)      (311)
%e A357136      (2111)
%e A357136      (11111)
%t A357136 Prepend[Table[If[EvenQ[nn],Prepend[#,0],#]&[Riffle[Table[Binomial[nn,k],{k,Floor[nn/2],nn}],0]],{nn,0,10}],{1}]
%Y A357136 The full triangle counting compositions by alternating sum is A097805.
%Y A357136 The version for partitions is A103919, full triangle A344651.
%Y A357136 This is the right-half of even-indexed rows of A260492.
%Y A357136 The triangle without top row and left column is A108044.
%Y A357136 Ranking and counting compositions:
%Y A357136 - product = sum: A335404, counted by A335405.
%Y A357136 - sum = twice alternating sum: A348614, counted by A262977.
%Y A357136 - length = alternating sum: A357184, counted by A357182.
%Y A357136 - length = absolute value of alternating sum: A357185, counted by A357183.
%Y A357136 A003242 counts anti-run compositions, ranked by A333489.
%Y A357136 A011782 counts compositions.
%Y A357136 A025047 counts alternating compositions, ranked by A345167.
%Y A357136 A032020 counts strict compositions, ranked by A233564.
%Y A357136 A124754 gives alternating sums of standard compositions.
%Y A357136 A238279 counts compositions by sum and number of maximal runs.
%Y A357136 Cf. A000120, A051159, A070939, A114220, A114901, A242882, A262046.
%K A357136 nonn,easy,tabl
%O A357136 0,8
%A A357136 _Gus Wiseman_, Sep 30 2022