A344618 Reverse-alternating sums of standard compositions (A066099). Alternating sums of the compositions ranked by A228351.
0, 1, 2, 0, 3, -1, 1, 1, 4, -2, 0, 2, 2, 0, 2, 0, 5, -3, -1, 3, 1, 1, 3, -1, 3, -1, 1, 1, 3, -1, 1, 1, 6, -4, -2, 4, 0, 2, 4, -2, 2, 0, 2, 0, 4, -2, 0, 2, 4, -2, 0, 2, 2, 0, 2, 0, 4, -2, 0, 2, 2, 0, 2, 0, 7, -5, -3, 5, -1, 3, 5, -3, 1, 1, 3, -1, 5, -3, -1, 3
Offset: 0
Examples
The sequence of nonnegative integers together with the corresponding standard compositions and their reverse-alternating sums begins: 0: () -> 0 15: (1111) -> 0 30: (1112) -> 1 1: (1) -> 1 16: (5) -> 5 31: (11111) -> 1 2: (2) -> 2 17: (41) -> -3 32: (6) -> 6 3: (11) -> 0 18: (32) -> -1 33: (51) -> -4 4: (3) -> 3 19: (311) -> 3 34: (42) -> -2 5: (21) -> -1 20: (23) -> 1 35: (411) -> 4 6: (12) -> 1 21: (221) -> 1 36: (33) -> 0 7: (111) -> 1 22: (212) -> 3 37: (321) -> 2 8: (4) -> 4 23: (2111) -> -1 38: (312) -> 4 9: (31) -> -2 24: (14) -> 3 39: (3111) -> -2 10: (22) -> 0 25: (131) -> -1 40: (24) -> 2 11: (211) -> 2 26: (122) -> 1 41: (231) -> 0 12: (13) -> 2 27: (1211) -> 1 42: (222) -> 2 13: (121) -> 0 28: (113) -> 3 43: (2211) -> 0 14: (112) -> 2 29: (1121) -> -1 44: (213) -> 4 Triangle begins (row lengths A011782): 0 1 2 0 3 -1 1 1 4 -2 0 2 2 0 2 0 5 -3 -1 3 1 1 3 -1 3 -1 1 1 3 -1 1 1
Crossrefs
Up to sign, same as the reverse version A124754.
The version for Heinz numbers of partitions is A344616.
Positions of zeros are A344619.
A116406 counts compositions with alternating sum >= 0.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
All of the following pertain to compositions in standard order:
- The length is A000120.
- Converting to reversed ranking gives A059893.
- The rows are A066099.
- The sum is A070939.
- The runs are counted by A124767.
- The reversed version is A228351.
- Strict compositions are ranked by A233564.
- Constant compositions are ranked by A272919.
- The Heinz number is A333219.
- Anti-run compositions are ranked by A333489.
Programs
-
Mathematica
sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}]; stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]] Table[sats[stc[n]],{n,0,100}]
Comments