login
A357847
Number of integer compositions of n whose length is twice their alternating sum.
3
1, 0, 0, 1, 0, 1, 3, 1, 8, 11, 15, 46, 59, 127, 259, 407, 888, 1591, 2925, 5896, 10607, 20582, 39446, 73448, 142691, 269777, 513721, 988638, 1876107, 3600313, 6893509, 13165219, 25288200, 48408011, 92824505, 178248758, 341801149, 656641084, 1261298356
OFFSET
0,7
COMMENTS
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
LINKS
EXAMPLE
The a(0) = 1 through a(9) = 15 compositions:
() . . (21) . (32) (1131) (43) (1142) (54)
(2121) (1241) (111141)
(3111) (2132) (112131)
(2231) (113121)
(3122) (114111)
(3221) (211131)
(4112) (212121)
(4211) (213111)
(311121)
(312111)
(411111)
MATHEMATICA
ats[y_]:=Sum[(-1)^(i-1)*y[[i]], {i, Length[y]}];
Table[Length[Select[Join @@ Permutations/@IntegerPartitions[n], Length[#]==2ats[#]&]], {n, 0, 10}]
CROSSREFS
The version for partitions is A357709, ranked by A357848.
A011782 counts compositions.
A025047 counts alternating compositions.
A103919 counts partitions by alternating sum, full triangle A344651.
A357136 counts compositions by alternating sum, full triangle A097805.
A357182 counts compositions w/ length = alternating sum, ranked by A357184.
A357189 counts partitions w/ length = alternating sum, ranked by A357486.
Sequence in context: A120236 A049760 A343812 * A019146 A102537 A131202
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 16 2022
EXTENSIONS
a(21)-a(38) from Alois P. Heinz, Oct 19 2022
STATUS
approved