A345168 Numbers k such that the k-th composition in standard order is not alternating.
3, 7, 10, 11, 14, 15, 19, 21, 23, 26, 27, 28, 29, 30, 31, 35, 36, 37, 39, 42, 43, 46, 47, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 67, 69, 71, 73, 74, 75, 78, 79, 83, 84, 85, 86, 87, 90, 91, 92, 93, 94, 95, 99, 100, 101, 103, 104, 105, 106, 107, 110
Offset: 1
Keywords
Examples
The sequence of terms together with their binary indices begins: 3: (1,1) 35: (4,1,1) 59: (1,1,2,1,1) 7: (1,1,1) 36: (3,3) 60: (1,1,1,3) 10: (2,2) 37: (3,2,1) 61: (1,1,1,2,1) 11: (2,1,1) 39: (3,1,1,1) 62: (1,1,1,1,2) 14: (1,1,2) 42: (2,2,2) 63: (1,1,1,1,1,1) 15: (1,1,1,1) 43: (2,2,1,1) 67: (5,1,1) 19: (3,1,1) 46: (2,1,1,2) 69: (4,2,1) 21: (2,2,1) 47: (2,1,1,1,1) 71: (4,1,1,1) 23: (2,1,1,1) 51: (1,3,1,1) 73: (3,3,1) 26: (1,2,2) 52: (1,2,3) 74: (3,2,2) 27: (1,2,1,1) 53: (1,2,2,1) 75: (3,2,1,1) 28: (1,1,3) 55: (1,2,1,1,1) 78: (3,1,1,2) 29: (1,1,2,1) 56: (1,1,4) 79: (3,1,1,1,1) 30: (1,1,1,2) 57: (1,1,3,1) 83: (2,3,1,1) 31: (1,1,1,1,1) 58: (1,1,2,2) 84: (2,2,3)
Links
- Wikipedia, Alternating permutation
Crossrefs
The complement is A345167.
These compositions are counted by A345192.
A003242 counts anti-run compositions.
A344604 counts alternating compositions with twins.
Statistics of standard compositions:
- Length is A000120.
- Constant runs are A124767.
- Heinz number is A333219.
- Number of maximal anti-runs is A333381.
- Runs-resistance is A333628.
- Number of distinct parts is A334028.
Classes of standard compositions:
- Weakly decreasing compositions (partitions) are A114994.
- Weakly increasing compositions (multisets) are A225620.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Anti-run compositions are A333489.
- Non-anti-run compositions are A348612.
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1]; Select[Range[0,100],Not@*wigQ@*stc]
Comments