login
Numbers k such that the k-th composition in standard order is an anti-run and matches the patterns (1,2,1) or (2,1,2).
2

%I #4 Jul 18 2024 14:26:17

%S 13,22,25,45,49,54,76,77,82,89,97,101,102,105,108,109,141,148,150,153,

%T 162,165,166,177,178,180,182,193,197,198,204,205,209,210,216,217,269,

%U 278,280,281,297,300,301,305,306,308,310,322,325,326,332,333,353,354

%N Numbers k such that the k-th composition in standard order is an anti-run and matches the patterns (1,2,1) or (2,1,2).

%C Such a composition cannot be strict.

%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.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation_pattern">Permutation pattern</a>

%H Gus Wiseman, <a href="/A102726/a102726.txt">Sequences counting and ranking compositions by the patterns they match or avoid.</a>

%H Gus Wiseman, <a href="https://docs.google.com/document/d/e/2PACX-1vTCPiJVFUXN8IqfLlCXkgP15yrGWeRhFS4ozST5oA4Bl2PYS-XTA3sGsAEXvwW-B0ealpD8qnoxFqN3/pub">Statistics, classes, and transformations of standard compositions</a>

%F Equals A333489 /\ A374253.

%e The terms together with their standard compositions begin:

%e 13: (1,2,1)

%e 22: (2,1,2)

%e 25: (1,3,1)

%e 45: (2,1,2,1)

%e 49: (1,4,1)

%e 54: (1,2,1,2)

%e 76: (3,1,3)

%e 77: (3,1,2,1)

%e 82: (2,3,2)

%e 89: (2,1,3,1)

%e 97: (1,5,1)

%e 101: (1,3,2,1)

%e 102: (1,3,1,2)

%e 105: (1,2,3,1)

%e 108: (1,2,1,3)

%e 109: (1,2,1,2,1)

%e 141: (4,1,2,1)

%e 148: (3,2,3)

%e 150: (3,2,1,2)

%e 153: (3,1,3,1)

%t stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;

%t Select[Range[0,100],Length[Split[stc[#]]] == Length[stc[#]]&&!UnsameQ@@First/@Split[stc[#]]&]

%Y Compositions of this type are counted by A285981.

%Y Permutations of prime indices of this type are counted by A335460.

%Y This is the anti-run complement case of A374249, counted by A274174.

%Y This is the anti-run case of A374253, counted by A335548.

%Y A003242 counts anti-run compositions, ranks A333489.

%Y A011782 counts compositions.

%Y A025047 counts wiggly compositions, ranks A345167.

%Y A066099 lists compositions in standard order.

%Y A124767 counts runs in standard compositions, anti-runs A333381.

%Y A233564 ranks strict compositions, counted by A032020.

%Y A333755 counts compositions by number of runs.

%Y A335454 counts patterns matched by standard compositions.

%Y A335456 counts patterns matched by compositions.

%Y A335462 counts (1,2,1)- and (2,1,2)-matching permutations of prime indices.

%Y A335465 counts minimal patterns avoided by a standard composition.

%Y - A335470 counts (1,2,1)-matching compositions, ranks A335466.

%Y - A335471 counts (1,2,1)-avoiding compositions, ranks A335467.

%Y - A335472 counts (2,1,2)-matching compositions, ranks A335468.

%Y - A335473 counts (2,1,2)-avoiding compositions, ranks A335469.

%Y A373948 encodes run-compression using compositions in standard order.

%Y A373949 counts compositions by run-compressed sum, opposite A373951.

%Y A373953 gives run-compressed sum of standard compositions, excess A373954.

%Y Cf. A106356, A124762, A238130, A238279, A261982, A333175, A333382, A333627, A335463, A335524, A335525.

%K nonn

%O 1,1

%A _Gus Wiseman_, Jul 14 2024