A346632 Triangle read by rows giving the main diagonals of the matrices counting integer compositions by length and alternating sum (A345197).
1, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 1, 2, 3, 0, 0, 0, 1, 2, 6, 6, 0, 0, 0, 1, 2, 9, 12, 0, 0, 0, 0, 1, 2, 12, 18, 10, 0, 0, 0, 0, 1, 2, 15, 24, 30, 20, 0, 0, 0, 0, 1, 2, 18, 30, 60, 60, 0, 0, 0, 0, 0, 1, 2, 21, 36, 100, 120, 35, 0, 0, 0, 0
Offset: 0
Examples
Triangle begins: 1 0 0 0 1 0 0 1 2 0 0 1 2 0 0 0 1 2 3 0 0 0 1 2 6 6 0 0 0 1 2 9 12 0 0 0 0 1 2 12 18 10 0 0 0 0 1 2 15 24 30 20 0 0 0 0 1 2 18 30 60 60 0 0 0 0 0 1 2 21 36 100 120 35 0 0 0 0 0 1 2 24 42 150 200 140 70 0 0 0 0 0 1 2 27 48 210 300 350 280 0 0 0 0 0 0 1 2 30 54 280 420 700 700 126 0 0 0 0 0
Crossrefs
The first nonzero element in each column appears to be A001405.
These are the diagonals of the matrices given by A345197.
Antidiagonals of the same matrices are A345907.
Row sums are A345908.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
Programs
-
Mathematica
ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}]; Table[Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{k}],k==(n+ats[#])/2&]],{k,n}],{n,0,15}]
Comments