A375408 Numbers k such that the k-th composition in standard order is not weakly increasing or weakly decreasing.
13, 22, 25, 27, 29, 38, 41, 44, 45, 46, 49, 50, 51, 53, 54, 55, 57, 59, 61, 70, 76, 77, 78, 81, 82, 83, 86, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 121, 123, 125, 134, 140, 141, 142
Offset: 1
Keywords
Examples
The terms and corresponding compositions begin: 13: (1,2,1) 22: (2,1,2) 25: (1,3,1) 27: (1,2,1,1) 29: (1,1,2,1) 38: (3,1,2) 41: (2,3,1) 44: (2,1,3) 45: (2,1,2,1) 46: (2,1,1,2) 49: (1,4,1) 50: (1,3,2) 51: (1,3,1,1) 53: (1,2,2,1) 54: (1,2,1,2) 55: (1,2,1,1,1) 57: (1,1,3,1) 59: (1,1,2,1,1)
Links
- Eric Weisstein's World of Mathematics, Unimodal Sequence.
Crossrefs
The version for run-lengths of compositions is A332833.
A001523 counts unimodal compositions, ranks too dense.
A011782 counts compositions.
A332835 counts compositions with weakly incr. or weakly decr. run-lengths.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Ranks of strict compositions are A233564.
- Ranks of constant compositions are A272919.
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Select[Range[0,100],!LessEqual@@stc[#]&&!GreaterEqual@@stc[#]&]
Comments