A374253 Numbers k such that the k-th composition in standard order matches the patterns (1,2,1) or (2,1,2).
13, 22, 25, 27, 29, 45, 46, 49, 51, 53, 54, 55, 57, 59, 61, 76, 77, 82, 86, 89, 90, 91, 93, 94, 97, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 115, 117, 118, 119, 121, 123, 125, 141, 148, 150, 153, 155, 156, 157, 162, 165, 166, 173, 174, 177, 178
Offset: 1
Keywords
Examples
The terms together with their standard compositions begin: 13: (1,2,1) 22: (2,1,2) 25: (1,3,1) 27: (1,2,1,1) 29: (1,1,2,1) 45: (2,1,2,1) 46: (2,1,1,2) 49: (1,4,1) 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) 61: (1,1,1,2,1) 76: (3,1,3) 77: (3,1,2,1) 82: (2,3,2) 86: (2,2,1,2) 89: (2,1,3,1)
Links
Crossrefs
Permutations of prime indices of this type are counted by A335460.
Compositions of this type are counted by A335548.
The anti-run case is A374254.
A011782 counts compositions.
A066099 lists compositions in standard order.
A333755 counts compositions by number of runs.
A335454 counts patterns matched by standard compositions.
A335456 counts patterns matched by compositions.
A335462 counts (1,2,1)- and (2,1,2)-matching permutations of prime indices.
A335465 counts minimal patterns avoided by a standard composition.
A373948 encodes run-compression using compositions in standard order.
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Select[Range[0,100],!UnsameQ@@First/@Split[stc[#]]&]
Comments