OFFSET
0,7
COMMENTS
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..3465
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}]
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 16 2022
EXTENSIONS
a(21)-a(38) from Alois P. Heinz, Oct 19 2022
STATUS
approved