OFFSET
0,4
COMMENTS
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. In the case of a partition, this equals the number of odd parts in the conjugate partition.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
EXAMPLE
The a(1) = 1 through a(9) = 12 partitions:
1 2 3 4 5 6 7 8 9
111 211 221 42 322 332 333
311 222 331 422 441
11111 411 511 611 522
21111 22111 4211 711
31111 22211 22221
1111111 41111 32211
2111111 33111
51111
2211111
3111111
111111111
For example, we have 3 - 2 + 2 - 1 + 1 = 3 / 2 * 2 / 1 * 1 = 3, so the partition (3,2,2,1,1) is counted under a(9).
MATHEMATICA
ats[y_]:=Sum[(-1)^(i-1)*y[[i]], {i, Length[y]}];
altprod[q_]:=Product[q[[i]]^(-1)^(i-1), {i, Length[q]}];
Table[Length[Select[IntegerPartitions[n], altprod[#]==ats[#]&]], {n, 0, 30}]
CROSSREFS
The version for reverse-alternating sum (or product, or both) is A025065.
Dominated by A347446.
A000041 counts partitions with alternating sum 0.
A027187 counts partitions of even length.
A097805 counts compositions by sum and alternating sum.
A124754 gives alternating sums of standard compositions.
A277103 counts partitions with the same alternating sum as their conjugate.
A345927 gives alternating sums of binary expansions.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 30 2021
STATUS
approved