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