A308230 Irregular triangle: row n shows the alternating sums of partitions of n when the parts are arranged in nonincreasing order and the partitions are arranged lexicographically from [n] to [1,1,1,...,1].
1, 2, 0, 3, 1, 1, 4, 2, 0, 2, 0, 5, 3, 1, 3, 1, 1, 1, 6, 4, 2, 4, 0, 2, 2, 2, 0, 2, 0, 7, 5, 3, 5, 1, 3, 3, 1, 3, 1, 3, 1, 1, 1, 1, 8, 6, 4, 6, 2, 4, 4, 0, 2, 4, 2, 4, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 9, 7, 5, 7, 3, 5, 5, 1, 3, 5, 3, 5, 1, 3, 1, 3, 3, 3, 3, 1
Offset: 1
Examples
First 8 rows: 1 2 0 3 1 1 4 2 0 2 0 5 3 1 3 1 1 1 6 4 2 4 0 2 2 2 0 2 0 7 5 3 5 1 3 3 1 3 1 3 1 1 1 1 8 6 4 6 2 4 4 0 2 4 2 4 2 0 2 2 2 0 2 0 2 0 Row 5 comes from arranging the 7 partitions of 5 is this order: [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], [1,1,1,1,1] and taking alternating sums: 5, 4-1, 3-1, 3-1+1, 2-2+1, 2-1+1-1, 1-1+1-1.
Programs
-
Mathematica
r[n_] := Map[Total[Map[Total, {Take[##], Drop[##]} &[#, {1, -1, 2}] {1, -1}]] &, IntegerPartitions[n]]; Column[Table[r[n], {n, 10}]] (* Peter J. C. Moses, May 15 2019 *)
Comments