A375295
Numbers k such that the leaders of maximal weakly increasing runs in the k-th composition in standard order (row k of A066099) are not strictly decreasing.
Original entry on oeis.org
13, 25, 27, 29, 45, 49, 50, 51, 53, 54, 55, 57, 59, 61, 77, 82, 89, 91, 93, 97, 98, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 121, 123, 125, 141, 153, 155, 157, 162, 165, 173, 177, 178, 179, 181, 182, 183, 185, 187, 189
Offset: 1
The sequence together with corresponding compositions begins:
13: (1,2,1)
25: (1,3,1)
27: (1,2,1,1)
29: (1,1,2,1)
45: (2,1,2,1)
49: (1,4,1)
50: (1,3,2)
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)
77: (3,1,2,1)
82: (2,3,2)
89: (2,1,3,1)
91: (2,1,2,1,1)
93: (2,1,1,2,1)
For leaders of identical runs we have
A335485.
A374637 counts compositions by sum of leaders of weakly increasing runs.
All of the following pertain to compositions in standard order:
- Constant compositions are
A272919.
Cf.
A056823,
A106356,
A188919,
A189076,
A238343,
A261982,
A333213,
A335480,
A335482,
A373948,
A374746,
A374768,
A375123.
-
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],!Greater@@First/@Split[stc[#],LessEqual]&]
- or -
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],MatchQ[stc[#],{_,x_,_,z_,y_,_}/;x<=y
A334300
Number of distinct nonempty subsequences (not necessarily contiguous) in the n-th composition in standard order (A066099).
Original entry on oeis.org
0, 1, 1, 2, 1, 3, 3, 3, 1, 3, 2, 5, 3, 6, 5, 4, 1, 3, 3, 5, 3, 5, 6, 7, 3, 6, 5, 9, 5, 9, 7, 5, 1, 3, 3, 5, 2, 7, 7, 7, 3, 7, 3, 8, 7, 11, 10, 9, 3, 6, 7, 9, 7, 10, 11, 12, 5, 9, 8, 13, 7, 12, 9, 6, 1, 3, 3, 5, 3, 7, 7, 7, 3, 5, 5, 11, 6, 13, 11, 9, 3, 7, 6
Offset: 0
Triangle begins:
1
1 2
1 3 3 3
1 3 2 5 3 6 5 4
1 3 3 5 3 5 6 7 3 6 5 9 5 9 7 5
If the k-th composition in standard order is c, then we say that the STC-number of c is k. The n-th column below lists the STC-numbers of the nonempty subsequences of the composition with STC-number n:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 2 3 4 2 5 4 6 6 7
1 1 1 1 3 1 5 3 3
2 3 2 1
1 2 1
1
Looking only at contiguous subsequences gives
A124770.
The contiguous case with empty subsequences allowed is
A124771.
Allowing empty subsequences gives
A334299.
Compositions where every subinterval has a different sum are
A333222.
Contiguous positive subsequence-sums are counted by
A333224.
Contiguous subsequence-sums are counted by
A333257.
Subsequence-sums are counted by
A334968.
-
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Table[Length[Union[Rest[Subsets[stc[n]]]]],{n,0,100}]
-
from itertools import combinations
def comp(n):
# see A357625
return
def A334300(n):
A,C = set(),comp(n)
c = range(len(C))
for j in c:
for k in combinations(c, j):
A.add(tuple(C[i] for i in k))
return len(A) # John Tyler Rascoe, Mar 12 2025
A335374
Numbers k such that the k-th composition in standard order (A066099) is not co-unimodal.
Original entry on oeis.org
13, 25, 27, 29, 41, 45, 49, 50, 51, 53, 54, 55, 57, 59, 61, 77, 81, 82, 83, 89, 91, 93, 97, 98, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 121, 123, 125, 141, 145, 153, 155, 157, 161, 162, 163, 165, 166, 167, 169, 173, 177
Offset: 1
The sequence together with the corresponding compositions begins:
13: (1,2,1)
25: (1,3,1)
27: (1,2,1,1)
29: (1,1,2,1)
41: (2,3,1)
45: (2,1,2,1)
49: (1,4,1)
50: (1,3,2)
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)
77: (3,1,2,1)
81: (2,4,1)
82: (2,3,2)
83: (2,3,1,1)
89: (2,1,3,1)
This is the dual version of
A335373.
The case that is not unimodal either is
A335375.
Unimodal normal sequences are
A007052.
Non-unimodal permutations are
A059204.
Non-unimodal compositions are
A115981.
Non-unimodal normal sequences are
A328509.
Numbers with non-unimodal unsorted prime signature are
A332282.
Co-unimodal compositions are
A332578.
Numbers with non-co-unimodal unsorted prime signature are
A332642.
Non-co-unimodal compositions are
A332669.
Cf.
A112798,
A227038,
A329398,
A332281,
A332286,
A332287,
A332638,
A332639,
A332643,
A332670,
A332873,
A333146.
-
unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],!unimodQ[-stc[#]]&]
A335475
Numbers k such that the k-th composition in standard order (A066099) matches the pattern (1,2,2).
Original entry on oeis.org
26, 53, 54, 58, 90, 100, 106, 107, 109, 110, 117, 118, 122, 154, 164, 181, 182, 186, 201, 202, 204, 210, 212, 213, 214, 215, 218, 219, 221, 222, 228, 234, 235, 237, 238, 245, 246, 250, 282, 309, 310, 314, 329, 332, 346, 356, 362, 363, 365, 366, 373, 374, 378
Offset: 1
The sequence of terms together with the corresponding compositions begins:
26: (1,2,2)
53: (1,2,2,1)
54: (1,2,1,2)
58: (1,1,2,2)
90: (2,1,2,2)
100: (1,3,3)
106: (1,2,2,2)
107: (1,2,2,1,1)
109: (1,2,1,2,1)
110: (1,2,1,1,2)
117: (1,1,2,2,1)
118: (1,1,2,1,2)
122: (1,1,1,2,2)
154: (3,1,2,2)
164: (2,3,3)
The complement
A335525 is the avoiding version.
The (2,2,1)-matching version is
A335477.
Patterns matching this pattern are counted by
A335509 (by length).
Permutations of prime indices matching this pattern are counted by
A335453.
These compositions are counted by
A335472 (by sum).
Non-unimodal compositions are counted by
A115981 and ranked by
A335373.
Combinatory separations are counted by
A269134.
Patterns matched by standard compositions are counted by
A335454.
Minimal patterns avoided by a standard composition are counted by
A335465.
-
stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
Select[Range[0,100],MatchQ[stc[#],{_,x_,_,y_,_,y_,_}/;x
A335513
Numbers k such that the k-th composition in standard order (A066099) avoids the pattern (1,1,1).
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 32, 33, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 48, 49, 50, 52, 53, 54, 56, 58, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 88, 89
Offset: 1
The sequence of terms together with the corresponding compositions begins:
0: () 17: (4,1) 37: (3,2,1)
1: (1) 18: (3,2) 38: (3,1,2)
2: (2) 19: (3,1,1) 40: (2,4)
3: (1,1) 20: (2,3) 41: (2,3,1)
4: (3) 21: (2,2,1) 43: (2,2,1,1)
5: (2,1) 22: (2,1,2) 44: (2,1,3)
6: (1,2) 24: (1,4) 45: (2,1,2,1)
8: (4) 25: (1,3,1) 46: (2,1,1,2)
9: (3,1) 26: (1,2,2) 48: (1,5)
10: (2,2) 28: (1,1,3) 49: (1,4,1)
11: (2,1,1) 32: (6) 50: (1,3,2)
12: (1,3) 33: (5,1) 52: (1,2,3)
13: (1,2,1) 34: (4,2) 53: (1,2,2,1)
14: (1,1,2) 35: (4,1,1) 54: (1,2,1,2)
16: (5) 36: (3,3) 56: (1,1,4)
These compositions are counted by
A232432 (by sum).
The (1,1)-avoiding version is
A233564.
The complement
A335512 is the matching version.
Patterns avoiding (1,1,1) are counted by
A080599 (by length).
Non-unimodal compositions are counted by
A115981 and ranked by
A335373.
Combinatory separations are counted by
A269134.
Patterns matched by standard compositions are counted by
A335454.
Minimal patterns avoided by a standard composition are counted by
A335465.
Permutations of prime indices avoiding (1,1,1) are counted by
A335511.
-
stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
Select[Range[0,100],!MatchQ[stc[#],{_,x_,_,x_,_,x_,_}]&]
A276165
a(n) is the first-player score difference of a "Coins in a Row" game over the n-th row of A066099 using a minimax strategy.
Original entry on oeis.org
0, 1, 2, 0, 3, 1, 1, 1, 4, 2, 0, 2, 2, 0, 2, 0, 5, 3, 1, 3, 1, 1, 1, 1, 3, -1, 1, 1, 3, 1, 1, 1, 6, 4, 2, 4, 0, 2, 2, 2, 2, 0, 2, 0, 2, 2, 0, 2, 4, -2, 0, 2, 2, 0, 2, 0, 4, 2, 0, 0, 2, 0, 2, 0, 7, 5, 3, 5, 1, 3, 3, 3, 1, 1, 3, 1, 1, 3, 1, 3, 3, -1, 1, 1, 3, 1
Offset: 0
Let [R,L,L,L] represent a game in which the first player takes the right coin, the second player takes the left coin, the first player takes the left coin, and the second player takes the left (only remaining) coin.
A066099_Row(0) = [0]; a(0) = 0 via [L]
A066099_Row(1) = [1]; a(1) = 1 via [L]
A066099_Row(3) = [1,1]; a(3) = 0 via [R,L]
A066099_Row(22) = [2,1,2]; a(22) = 1 via [L,R,L]
A066099_Row(88) = [2,1,4]; a(88) = 3 via [R,L,L]
A066099_Row(1418) = [2,1,4,2,2]; a(1418) = -1 via [L,R,R,R,L]
- Peter Winkler, Mathematical Puzzles: A Connoisseur's Collection, A K Peters/CRC Press, 2003, pages 1-2.
A276166
a(n) is the first player's score in a "Coins in a Row" game over the n-th row of A066099 using a minimax strategy.
Original entry on oeis.org
0, 1, 2, 1, 3, 2, 2, 2, 4, 3, 2, 3, 3, 2, 3, 2, 5, 4, 3, 4, 3, 3, 3, 3, 4, 2, 3, 3, 4, 3, 3, 3, 6, 5, 4, 5, 3, 4, 4, 4, 4, 3, 4, 3, 4, 4, 3, 4, 5, 2, 3, 4, 4, 3, 4, 3, 5, 4, 3, 3, 4, 3, 4, 3, 7, 6, 5, 6, 4, 5, 5, 5, 4, 4, 5, 4, 4, 5, 4, 5, 5, 3, 4, 4, 5, 4, 4
Offset: 0
Let [R,L,L,L] represent a game in which the first player takes the right coin, the second player takes the left coin, the first player takes the left coin, and the second player takes the left (only remaining) coin.
A066099_Row(0) = [0]; a(0) = 0 via [L]
A066099_Row(1) = [1]; a(1) = 1 via [L]
A066099_Row(3) = [1,1]; a(3) = 1 via [R,L]
A066099_Row(22) = [2,1,2]; a(22) = 3 via [L,R,L]
A066099_Row(88) = [2,1,4]; a(88) = 5 via [R,L,L]
A066099_Row(1418) = [2,1,4,2,2]; a(1418) = 5 via [L,R,R,R,L]
- Peter Winkler, Mathematical Puzzles: A Connoisseur's Collection, A K Peters/CRC Press, 2003, pages 1-2.
A276167
a(n) is the second player's score in a "Coins in a Row" game over the n-th row of A066099 using a minimax strategy.
Original entry on oeis.org
0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 2, 1, 2, 0, 1, 2, 1, 2, 2, 2, 2, 1, 3, 2, 2, 1, 2, 2, 2, 0, 1, 2, 1, 3, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 2, 1, 4, 3, 2, 2, 3, 2, 3, 1, 2, 3, 3, 2, 3, 2, 3, 0, 1, 2, 1, 3, 2, 2, 2, 3, 3, 2, 3, 3, 2, 3, 2, 2, 4, 3, 3, 2, 3, 3
Offset: 0
Let [R,L,L,L] represent a game in which the first player takes the right coin, the second player takes the left coin, the first player takes the left coin, and the second player takes the left (only remaining) coin.
A066099_Row(0) = [0]; a(0) = 0 via [L]
A066099_Row(1) = [1]; a(1) = 0 via [L]
A066099_Row(3) = [1,1]; a(3) = 1 via [R,L]
A066099_Row(22) = [2,1,2]; a(22) = 2 via [L,R,L]
A066099_Row(88) = [2,1,4]; a(88) = 2 via [R,L,L]
A066099_Row(1418) = [2,1,4,2,2]; a(1418) = 6 via [L,R,R,R,L]
- Peter Winkler, Mathematical Puzzles: A Connoisseur's Collection, A K Peters/CRC Press, 2003, pages 1-2.
A334966
Numbers k such that the k-th composition in standard order (row k of A066099) has weakly decreasing non-adjacent parts.
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 47, 48, 49, 51, 55, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85, 86, 87
Offset: 1
The sequence together with the corresponding compositions begins:
0: () 17: (4,1) 37: (3,2,1)
1: (1) 18: (3,2) 38: (3,1,2)
2: (2) 19: (3,1,1) 39: (3,1,1,1)
3: (1,1) 20: (2,3) 40: (2,4)
4: (3) 21: (2,2,1) 41: (2,3,1)
5: (2,1) 22: (2,1,2) 42: (2,2,2)
6: (1,2) 23: (2,1,1,1) 43: (2,2,1,1)
7: (1,1,1) 24: (1,4) 45: (2,1,2,1)
8: (4) 25: (1,3,1) 47: (2,1,1,1,1)
9: (3,1) 27: (1,2,1,1) 48: (1,5)
10: (2,2) 31: (1,1,1,1,1) 49: (1,4,1)
11: (2,1,1) 32: (6) 51: (1,3,1,1)
12: (1,3) 33: (5,1) 55: (1,2,1,1,1)
13: (1,2,1) 34: (4,2) 63: (1,1,1,1,1,1)
15: (1,1,1,1) 35: (4,1,1) 64: (7)
16: (5) 36: (3,3) 65: (6,1)
For example, (2,3,1,2) is such a composition because the non-adjacent pairs are (2,1), (2,2), (3,2), all of which are weakly decreasing, so 166 is in the sequence
The case of normal sequences appears to be
A028859.
A version for ordered set partitions is
A332872.
These compositions are enumerated by
A333148.
The strict case is enumerated by
A333150.
-
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],!MatchQ[stc[#],{_,x_,,y_,_}/;y>x]&]
A335476
Numbers k such that the k-th composition in standard order (A066099) matches the pattern (1,1,2).
Original entry on oeis.org
14, 28, 29, 30, 46, 54, 56, 57, 58, 59, 60, 61, 62, 78, 84, 92, 93, 94, 102, 108, 109, 110, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 142, 156, 157, 158, 168, 169, 172, 174, 180, 182, 184, 185, 186, 187, 188, 189, 190, 198, 204
Offset: 1
The sequence of terms together with the corresponding compositions begins:
14: (1,1,2)
28: (1,1,3)
29: (1,1,2,1)
30: (1,1,1,2)
46: (2,1,1,2)
54: (1,2,1,2)
56: (1,1,4)
57: (1,1,3,1)
58: (1,1,2,2)
59: (1,1,2,1,1)
60: (1,1,1,3)
61: (1,1,1,2,1)
62: (1,1,1,1,2)
78: (3,1,1,2)
84: (2,2,3)
The complement
A335522 is the avoiding version.
The (2,1,1)-matching version is
A335478.
Patterns matching this pattern are counted by
A335509 (by length).
Permutations of prime indices matching this pattern are counted by
A335446.
These compositions are counted by
A335470 (by sum).
Non-unimodal compositions are counted by
A115981 and ranked by
A335373.
Combinatory separations are counted by
A269134.
Patterns matched by standard compositions are counted by
A335454.
Minimal patterns avoided by a standard composition are counted by
A335465.
-
stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
Select[Range[0,100],MatchQ[stc[#],{_,x_,_,x_,_,y_,_}/;x
Comments