|
|
A357183
|
|
Number of integer compositions with the same length as the absolute value of their alternating sum.
|
|
18
|
|
|
1, 1, 0, 0, 2, 3, 2, 5, 12, 22, 26, 58, 100, 203, 282, 616, 962, 2045, 2982, 6518, 9858, 21416, 31680, 69623, 104158, 228930, 339978, 751430, 1119668, 2478787, 3684082, 8182469, 12171900, 27082870, 40247978, 89748642, 133394708, 297933185, 442628598, 990210110
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
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.
|
|
LINKS
|
|
|
EXAMPLE
|
The a(1) = 1 through a(8) = 12 compositions:
(1) (13) (113) (24) (124) (35)
(31) (212) (42) (151) (53)
(311) (223) (1115)
(322) (1151)
(421) (1214)
(1313)
(1412)
(1511)
(2141)
(3131)
(4121)
(5111)
|
|
MATHEMATICA
|
ats[y_]:=Sum[(-1)^(i-1)*y[[i]], {i, Length[y]}];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Length[#]==Abs[ats[#]]&]], {n, 0, 15}]
|
|
CROSSREFS
|
For product instead of length we have A114220.
For sum equal to twice alternating sum we have A262977, ranked by A348614.
This is the absolute value version of A357182.
These compositions are ranked by A357185.
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.
Cf. A000120, A032020, A070939, A106356, A114901, A131044, A178470, A233564, A242882, A262046, A301987.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|