%I #13 Nov 06 2021 02:26:06
%S 3,7,10,11,14,15,19,21,23,26,27,28,29,30,31,35,36,37,39,42,43,46,47,
%T 51,52,53,55,56,57,58,59,60,61,62,63,67,69,71,73,74,75,78,79,83,84,85,
%U 86,87,90,91,92,93,94,95,99,100,101,103,104,105,106,107,110
%N Numbers k such that the k-th composition in standard order is not alternating.
%C 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.
%C A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Alternating_permutation">Alternating permutation</a>
%e The sequence of terms together with their binary indices begins:
%e 3: (1,1) 35: (4,1,1) 59: (1,1,2,1,1)
%e 7: (1,1,1) 36: (3,3) 60: (1,1,1,3)
%e 10: (2,2) 37: (3,2,1) 61: (1,1,1,2,1)
%e 11: (2,1,1) 39: (3,1,1,1) 62: (1,1,1,1,2)
%e 14: (1,1,2) 42: (2,2,2) 63: (1,1,1,1,1,1)
%e 15: (1,1,1,1) 43: (2,2,1,1) 67: (5,1,1)
%e 19: (3,1,1) 46: (2,1,1,2) 69: (4,2,1)
%e 21: (2,2,1) 47: (2,1,1,1,1) 71: (4,1,1,1)
%e 23: (2,1,1,1) 51: (1,3,1,1) 73: (3,3,1)
%e 26: (1,2,2) 52: (1,2,3) 74: (3,2,2)
%e 27: (1,2,1,1) 53: (1,2,2,1) 75: (3,2,1,1)
%e 28: (1,1,3) 55: (1,2,1,1,1) 78: (3,1,1,2)
%e 29: (1,1,2,1) 56: (1,1,4) 79: (3,1,1,1,1)
%e 30: (1,1,1,2) 57: (1,1,3,1) 83: (2,3,1,1)
%e 31: (1,1,1,1,1) 58: (1,1,2,2) 84: (2,2,3)
%t stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
%t Select[Range[0,100],Not@*wigQ@*stc]
%Y The complement is A345167.
%Y These compositions are counted by A345192.
%Y A001250 counts alternating permutations, complement A348615.
%Y A003242 counts anti-run compositions.
%Y A025047 counts alternating or wiggly compositions, directed A025048, A025049.
%Y A344604 counts alternating compositions with twins.
%Y A345194 counts alternating patterns (with twins: A344605).
%Y A345164 counts alternating permutations of prime indices (with twins: A344606).
%Y A345165 counts partitions without a alternating permutation, ranked by A345171.
%Y A345170 counts partitions with a alternating permutation, ranked by A345172.
%Y A348610 counts alternating ordered factorizations, complement A348613.
%Y Statistics of standard compositions:
%Y - Length is A000120.
%Y - Constant runs are A124767.
%Y - Heinz number is A333219.
%Y - Number of maximal anti-runs is A333381.
%Y - Runs-resistance is A333628.
%Y - Number of distinct parts is A334028.
%Y Classes of standard compositions:
%Y - Weakly decreasing compositions (partitions) are A114994.
%Y - Weakly increasing compositions (multisets) are A225620.
%Y - Strict compositions are A233564.
%Y - Constant compositions are A272919.
%Y - Anti-run compositions are A333489.
%Y - Non-anti-run compositions are A348612.
%Y Cf. A001222, A005649, A008965, A059893, A106356, A238279, A344615, A345162, A345163, A345166, A345169, A348377, A348380.
%K nonn
%O 1,1
%A _Gus Wiseman_, Jun 15 2021