login
A349057
Numbers k such that the k-th composition in standard order is not weakly alternating.
26
37, 46, 52, 53, 69, 75, 78, 92, 93, 101, 104, 105, 107, 110, 116, 117, 133, 137, 139, 142, 150, 151, 156, 157, 165, 174, 180, 181, 184, 185, 186, 187, 190, 197, 200, 201, 203, 206, 208, 209, 210, 211, 214, 215, 220, 221, 229, 232, 233, 235, 238, 244, 245, 261
OFFSET
1,1
COMMENTS
We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
EXAMPLE
The terms and corresponding compositions begin:
37: (3,2,1)
46: (2,1,1,2)
52: (1,2,3)
53: (1,2,2,1)
69: (4,2,1)
75: (3,2,1,1)
78: (3,1,1,2)
92: (2,1,1,3)
93: (2,1,1,2,1)
101: (1,3,2,1)
104: (1,2,4)
105: (1,2,3,1)
107: (1,2,2,1,1)
110: (1,2,1,1,2)
116: (1,1,2,3)
117: (1,1,2,2,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[ Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
whkQ[y_]:=And@@Table[If[EvenQ[m], y[[m]]<=y[[m+1]], y[[m]]>=y[[m+1]]], {m, 1, Length[y]-1}];
Select[Range[0, 100], !whkQ[stc[#]]&&!whkQ[-stc[#]]&]
CROSSREFS
The strong case is A345168, complement A345167, counted by A345192.
The strong anti-run case is A345169, counted by A345195.
Including all non-anti-runs gives A348612, complement A333489.
These compositions are counted by A349053, complement A349052.
The directed cases are counted by A129852 (incr.) and A129853 (decr.).
The complement for patterns is A349058, strong A345194.
The complement for ordered factorizations is A349059, strong A348610.
Partitions of this type are counted by A349061, complement A349060.
Partitions of this type are ranked by A349794.
Non-strict partitions of this type are counted by A349796.
Permutations of prime indices of this type are counted by A349797.
A001250 counts alternating permutations, complement A348615.
A003242 counts Carlitz (anti-run) compositions, complement A261983.
A011782 counts compositions.
A025047 counts alternating/wiggly compositions, directed A025048, A025049.
A345164 counts alternating permutations of prime indices, weak A349056.
A345165 counts partitions w/o an alternating permutation, ranked by A345171.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A349054 counts strict alternating compositions.
Sequence in context: A039351 A043174 A043954 * A244356 A159750 A108333
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 04 2021
STATUS
approved