OFFSET
0,6
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.
EXAMPLE
The a(1) = 1 through a(8) = 6 compositions:
(1) (31) (113) (42) (124) (53)
(212) (223) (1151)
(311) (322) (2141)
(421) (3131)
(4121)
(5111)
MATHEMATICA
ats[y_]:=Sum[(-1)^(i-1)*y[[i]], {i, Length[y]}];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Length[#]==ats[#]&]], {n, 0, 15}]
CROSSREFS
For product instead of length we have A114220.
For absolute value we have A357183.
These compositions are ranked by A357184.
The case of partitions is A357189.
A011782 counts compositions.
A124754 gives alternating sums of standard compositions.
A238279 counts compositions by sum and number of maximal runs.
A261983 counts non-anti-run compositions.
A357136 counts compositions by alternating sum.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 28 2022
EXTENSIONS
a(21)-a(39) from Alois P. Heinz, Sep 29 2022
STATUS
approved