%I #17 Sep 29 2022 12:55:57
%S 1,1,0,0,1,3,1,4,6,20,13,48,50,175,141,512,481,1719,1491,5400,4929,
%T 17776,15840,57420,52079,188656,169989,617176,559834,2033175,1842041,
%U 6697744,6085950,22139780,20123989,73262232,66697354,242931321,221314299,806516560
%N Number of integer compositions of n with the same length as 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) = 6 compositions:
%e (1) (31) (113) (42) (124) (53)
%e (212) (223) (1151)
%e (311) (322) (2141)
%e (421) (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[#]==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 For absolute value we have A357183.
%Y These compositions are ranked by A357184.
%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,6
%A _Gus Wiseman_, Sep 28 2022
%E a(21)-a(39) from _Alois P. Heinz_, Sep 29 2022