Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
Number of integer compositions with the same length as the absolute value of their alternating sum.
18

%I #13 Sep 29 2022 12:56:36

%S 1,1,0,0,2,3,2,5,12,22,26,58,100,203,282,616,962,2045,2982,6518,9858,

%T 21416,31680,69623,104158,228930,339978,751430,1119668,2478787,

%U 3684082,8182469,12171900,27082870,40247978,89748642,133394708,297933185,442628598,990210110

%N Number of integer compositions with the same length as the absolute value of their alternating sum.

%C A composition of n is a finite sequence of positive integers summing to n.

%C The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

%e The a(1) = 1 through a(8) = 12 compositions:

%e (1) (13) (113) (24) (124) (35)

%e (31) (212) (42) (151) (53)

%e (311) (223) (1115)

%e (322) (1151)

%e (421) (1214)

%e (1313)

%e (1412)

%e (1511)

%e (2141)

%e (3131)

%e (4121)

%e (5111)

%t ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];

%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==Abs[ats[#]]&]],{n,0,15}]

%Y For product instead of length we have A114220.

%Y For sum equal to twice alternating sum we have A262977, ranked by A348614.

%Y For product equal to sum we have A335405, ranked by A335404.

%Y This is the absolute value version of A357182.

%Y These compositions are ranked by A357185.

%Y The case of partitions is A357189.

%Y A003242 counts anti-run compositions, ranked by A333489.

%Y A011782 counts compositions.

%Y A025047 counts alternating compositions, ranked by A345167.

%Y A124754 gives alternating sums of standard compositions.

%Y A238279 counts compositions by sum and number of maximal runs.

%Y A261983 counts non-anti-run compositions.

%Y A357136 counts compositions by alternating sum.

%Y Cf. A000120, A032020, A070939, A106356, A114901, A131044, A178470, A233564, A242882, A262046, A301987.

%K nonn

%O 0,5

%A _Gus Wiseman_, Sep 28 2022

%E a(21)-a(39) from _Alois P. Heinz_, Sep 29 2022