A350355 Numbers k such that the k-th composition in standard order is up/down.
0, 1, 2, 4, 6, 8, 12, 13, 16, 20, 24, 25, 32, 40, 41, 48, 49, 50, 54, 64, 72, 80, 81, 82, 96, 97, 98, 102, 108, 109, 128, 144, 145, 160, 161, 162, 166, 192, 193, 194, 196, 198, 204, 205, 216, 217, 256, 272, 288, 289, 290, 320, 321, 322, 324, 326, 332, 333, 384
Offset: 1
Keywords
Examples
The terms together with the corresponding compositions begin: 0: () 1: (1) 2: (2) 4: (3) 6: (1,2) 8: (4) 12: (1,3) 13: (1,2,1) 16: (5) 20: (2,3) 24: (1,4) 25: (1,3,1) 32: (6) 40: (2,4) 41: (2,3,1) 48: (1,5) 49: (1,4,1) 50: (1,3,2) 54: (1,2,1,2)
Crossrefs
The case of permutations is counted by A000111.
Counting patterns of this type gives A350354.
The down/up version is A350356.
A003242 counts anti-run compositions.
A349057 ranks non-weakly alternating compositions.
Statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of maximal anti-runs is A333381.
- Number of distinct parts is A334028.
Classes of standard compositions:
- Strict compositions are A233564.
- Constant compositions are A272919.
- Patterns are A333217.
Programs
-
Mathematica
updoQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]>y[[m+1]],y[[m]]
Comments