A353402
Numbers k such that the k-th composition in standard order has its own run-lengths as a subsequence (not necessarily consecutive).
Original entry on oeis.org
0, 1, 10, 21, 26, 43, 53, 58, 107, 117, 174, 186, 292, 314, 346, 348, 349, 373, 430, 442, 570, 585, 586, 629, 676, 693, 696, 697, 698, 699, 804, 826, 858, 860, 861, 885, 954, 1082, 1141, 1173, 1210, 1338, 1353, 1387, 1392, 1393, 1394, 1396, 1397, 1398, 1466
Offset: 0
The initial terms, their binary expansions, and the corresponding standard compositions:
0: 0 ()
1: 1 (1)
10: 1010 (2,2)
21: 10101 (2,2,1)
26: 11010 (1,2,2)
43: 101011 (2,2,1,1)
53: 110101 (1,2,2,1)
58: 111010 (1,1,2,2)
107: 1101011 (1,2,2,1,1)
117: 1110101 (1,1,2,2,1)
174: 10101110 (2,2,1,1,2)
186: 10111010 (2,1,1,2,2)
292: 100100100 (3,3,3)
314: 100111010 (3,1,1,2,2)
346: 101011010 (2,2,1,2,2)
348: 101011100 (2,2,1,1,3)
349: 101011101 (2,2,1,1,2,1)
373: 101110101 (2,1,1,2,2,1)
430: 110101110 (1,2,2,1,1,2)
442: 110111010 (1,2,1,1,2,2)
These compositions are counted by
A353390.
A005811 counts runs in binary expansion.
A333769 lists run-lengths of compositions in standard order.
Statistics of standard compositions:
Classes of standard compositions:
Cf.
A114640,
A165413,
A181819,
A318928,
A325705,
A329738,
A333224/
A333257,
A333755,
A353393,
A353403,
A353430.
-
stc[n_]:=Differences[Prepend[Join@@Position[ Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
rosQ[y_]:=Length[y]==0||MemberQ[Subsets[y],Length/@Split[y]];
Select[Range[0,100],rosQ[stc[#]]&]
A329862
Positive integers whose binary expansion has cuts-resistance 2.
Original entry on oeis.org
3, 4, 6, 9, 11, 12, 13, 18, 19, 20, 22, 25, 26, 37, 38, 41, 43, 44, 45, 50, 51, 52, 53, 74, 75, 76, 77, 82, 83, 84, 86, 89, 90, 101, 102, 105, 106, 149, 150, 153, 154, 165, 166, 169, 171, 172, 173, 178, 179, 180, 181, 202, 203, 204, 205, 210, 211, 212, 213
Offset: 1
The sequence of terms together with their binary expansions begins:
3: 11
4: 100
6: 110
9: 1001
11: 1011
12: 1100
13: 1101
18: 10010
19: 10011
20: 10100
22: 10110
25: 11001
26: 11010
37: 100101
38: 100110
41: 101001
43: 101011
44: 101100
45: 101101
50: 110010
Numbers whose binary expansion has cuts-resistance 1 are
A000975.
Binary words with cuts-resistance 2 are conjectured to be
A027383.
Compositions with cuts-resistance 2 are
A329863.
Cuts-resistance of binary expansion without first digit is
A319420.
Compositions counted by cuts-resistance are
A329861.
-
degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
Select[Range[100],degdep[IntegerDigits[#,2]]==2&]
A353431
Numbers k such that the k-th composition in standard order is empty, a singleton, or has its own run-lengths as a subsequence (not necessarily consecutive) that is already counted.
Original entry on oeis.org
0, 1, 2, 4, 8, 10, 16, 32, 43, 58, 64, 128, 256, 292, 349, 442, 512, 586, 676, 697, 826, 1024, 1210, 1338, 1393, 1394, 1396, 1594, 2048, 2186, 2234, 2618, 2696, 2785, 2786, 2792, 3130, 4096, 4282, 4410, 4666, 5178, 5569, 5570, 5572, 5576, 5584, 6202, 8192
Offset: 1
The initial terms, their binary expansions, and the corresponding standard compositions:
0: 0 ()
1: 1 (1)
2: 10 (2)
4: 100 (3)
8: 1000 (4)
10: 1010 (2,2)
16: 10000 (5)
32: 100000 (6)
43: 101011 (2,2,1,1)
58: 111010 (1,1,2,2)
64: 1000000 (7)
128: 10000000 (8)
256: 100000000 (9)
292: 100100100 (3,3,3)
349: 101011101 (2,2,1,1,2,1)
442: 110111010 (1,2,1,1,2,2)
512: 1000000000 (10)
586: 1001001010 (3,3,2,2)
676: 1010100100 (2,2,3,3)
697: 1010111001 (2,2,1,1,3,1)
The non-recursive version for partitions is
A325755, counted by
A325702.
These compositions are counted by
A353391.
A005811 counts runs in binary expansion.
Statistics of standard compositions:
Classes of standard compositions:
Cf.
A032020,
A044813,
A114640,
A165413,
A181819,
A329739,
A318928,
A325705,
A333224,
A353427,
A353403.
-
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
rorQ[y_]:=Length[y]<=1||MemberQ[Subsets[y],Length/@Split[y]]&& rorQ[Length/@Split[y]];
Select[Range[0,100],rorQ[stc[#]]&]
A353432
Numbers k such that the k-th composition in standard order has its own run-lengths as a consecutive subsequence.
Original entry on oeis.org
0, 1, 10, 21, 26, 43, 58, 107, 117, 174, 186, 292, 314, 346, 348, 349, 373, 430, 442, 570, 585, 586, 629, 676, 696, 697, 804, 826, 860, 861, 885, 1082, 1141, 1173, 1210, 1338, 1387, 1392, 1393, 1394, 1396, 1594, 1653, 1700, 1720, 1721, 1882, 2106, 2165, 2186
Offset: 1
The initial terms, their binary expansions, and the corresponding standard compositions:
0: 0 ()
1: 1 (1)
10: 1010 (2,2)
21: 10101 (2,2,1)
26: 11010 (1,2,2)
43: 101011 (2,2,1,1)
58: 111010 (1,1,2,2)
107: 1101011 (1,2,2,1,1)
117: 1110101 (1,1,2,2,1)
174: 10101110 (2,2,1,1,2)
186: 10111010 (2,1,1,2,2)
292: 100100100 (3,3,3)
314: 100111010 (3,1,1,2,2)
346: 101011010 (2,2,1,2,2)
348: 101011100 (2,2,1,1,3)
349: 101011101 (2,2,1,1,2,1)
373: 101110101 (2,1,1,2,2,1)
430: 110101110 (1,2,2,1,1,2)
442: 110111010 (1,2,1,1,2,2)
These compositions are counted by
A353392.
A005811 counts runs in binary expansion.
Statistics of standard compositions:
Classes of standard compositions:
Cf.
A044813,
A165413,
A181819,
A318928,
A325702,
A325705,
A325755,
A333224,
A333755,
A353389,
A353393,
A353403.
-
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
rorQ[y_]:=Length[y]==0||MemberQ[Join@@Table[Take[y,{i,j}],{i,Length[y]},{j,i,Length[y]}],Length/@Split[y]];
Select[Range[0,10000],rorQ[stc[#]]&]
A353929
Number of distinct sums of runs (of 0's or 1's) in the binary expansion of n.
Original entry on oeis.org
1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 3, 2, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 3, 2, 2, 3, 2, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 3, 2, 3, 2, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 3, 2, 2, 3
Offset: 0
The binary expansion of 183 is (1,0,1,1,0,1,1,1), with runs (1), (0), (1,1), (0), (1,1,1), with sums 1, 0, 2, 0, 3, of which four are distinct, so a(183) = 4.
Numbers whose binary expansion has distinct runs are
A175413.
Positions of first appearances are
A353930.
A005811 counts runs in binary expansion.
A044813 lists numbers with distinct run-lengths in binary expansion.
A318928 gives runs-resistance of binary expansion.
A351014 counts distinct runs in standard compositions.
-
Table[Length[Union[Total/@Split[IntegerDigits[n,2]]]],{n,0,100}]
-
from itertools import groupby
def A353929(n): return len(set(sum(map(int,y[1])) for y in groupby(bin(n)[2:]))) # Chai Wah Wu, Jun 26 2022
A329750
Triangle read by rows where T(n,k) is the number of compositions of n >= 1 with runs-resistance n - k, 1 <= k <= n.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 2, 3, 2, 1, 2, 6, 6, 1, 1, 0, 4, 9, 15, 3, 1, 0, 2, 16, 22, 22, 1, 1, 0, 0, 8, 37, 38, 41, 3, 1, 0, 0, 0, 26, 86, 69, 72, 2, 1, 0, 0, 0, 2, 78, 175, 124, 129, 3, 1, 0, 0, 0, 0, 14, 202, 367, 226, 213, 1, 1, 0, 0, 0, 0, 0, 52, 469, 750, 376, 395, 5, 1
Offset: 1
Triangle begins:
1
1 1
2 1 1
2 3 2 1
2 6 6 1 1
0 4 9 15 3 1
0 2 16 22 22 1 1
0 0 8 37 38 41 3 1
0 0 0 26 86 69 72 2 1
0 0 0 2 78 175 124 129 3 1
0 0 0 0 14 202 367 226 213 1 1
0 0 0 0 0 52 469 750 376 395 5 1
Row n = 6 counts the following compositions:
(1,1,3,1) (1,1,4) (1,5) (3,3) (6)
(1,3,1,1) (4,1,1) (2,4) (2,2,2)
(1,1,1,2,1) (1,1,1,3) (4,2) (1,1,1,1,1,1)
(1,2,1,1,1) (1,2,2,1) (5,1)
(2,1,1,2) (1,2,3)
(3,1,1,1) (1,3,2)
(1,1,1,1,2) (1,4,1)
(1,1,2,1,1) (2,1,3)
(2,1,1,1,1) (2,3,1)
(3,1,2)
(3,2,1)
(1,1,2,2)
(1,2,1,2)
(2,1,2,1)
(2,2,1,1)
The version with rows reversed is
A329744.
-
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],runsres[#]==n-k&]],{n,10},{k,n}]
A329864
Number of compositions of n with the same runs-resistance as cuts-resistance.
Original entry on oeis.org
1, 0, 0, 0, 0, 2, 5, 10, 17, 27, 68, 107, 217, 420, 884, 1761, 3679, 7469, 15437, 31396, 64369
Offset: 0
The a(5) = 2 through a(8) = 17 compositions:
(1112) (1113) (1114) (1115)
(2111) (1122) (1222) (1133)
(2211) (2221) (3311)
(3111) (4111) (5111)
(11211) (11122) (11222)
(11311) (11411)
(21112) (12221)
(22111) (21113)
(111121) (22211)
(121111) (31112)
(111131)
(111221)
(112112)
(112211)
(122111)
(131111)
(211211)
For example, the runs-resistance of (111221) is 3 because we have: (111221) -> (321) -> (111) -> (3), while the cuts-resistance is also 3 because we have: (111221) -> (112) -> (1) -> (), so (111221) is counted under a(8).
The version for binary expansion is
A329865.
Compositions counted by runs-resistance are
A329744.
Compositions counted by cuts-resistance are
A329861.
Compositions with runs-resistance = cuts-resistance minus 1 are
A329869.
Cf.
A003242,
A098504,
A114901,
A242882,
A318928,
A319411,
A319416,
A319420,
A319421,
A329867,
A329868.
-
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],runsres[#]==degdep[#]&]],{n,0,10}]
A329867
Runs-resistance minus cuts-resistance of the binary expansion of n.
Original entry on oeis.org
0, -1, 1, -1, 1, 1, 1, -2, 0, 1, 1, 2, 0, 2, 0, -3, -1, 0, 3, 2, 2, 1, 3, 1, 0, 2, 2, 0, 0, 1, -1, -4, -2, -1, 2, 0, 0, 3, 2, 0, 1, 3, 1, 2, 1, 2, 2, 0, -1, 0, 1, 0, 2, 2, 0, -1, -1, 0, 1, -1, -1, 0, -2, -5, -3, -2, 1, -1, -1, 2, 0, 1, -1, 0, 3, 4, 2, 3, 0
Offset: 0
The sequence of binary expansions together with their runs-resistances and cuts-resistances, and their differences, begins:
0 (): 0 - 0 = 0
1 (1): 0 - 1 = -1
2 (10): 2 - 1 = 1
3 (11): 1 - 2 = -1
4 (100): 3 - 2 = 1
5 (101): 2 - 1 = 1
6 (110): 3 - 2 = 1
7 (111): 1 - 3 = -2
8 (1000): 3 - 3 = 0
9 (1001): 3 - 2 = 1
10 (1010): 2 - 1 = 1
11 (1011): 4 - 2 = 2
12 (1100): 2 - 2 = 0
13 (1101): 4 - 2 = 2
14 (1110): 3 - 3 = 0
15 (1111): 1 - 4 = -3
16 (10000): 3 - 4 = -1
17 (10001): 3 - 3 = 0
18 (10010): 5 - 2 = 3
19 (10011): 4 - 2 = 2
20 (10100): 4 - 2 = 2
Sorted positions of first appearances are
A329868.
Compositions with runs-resistance equal to cuts-resistance are
A329864.
Compositions with runs-resistance = cuts-resistance minus 1 are
A329869.
Runs-resistance of binary expansion is
A318928.
Cuts-resistance of binary expansion is
A319416.
Compositions counted by runs-resistance are
A329744.
Compositions counted by cuts-resistance are
A329861.
-
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
Table[If[n==0,0,runsres[IntegerDigits[n,2]]-degdep[IntegerDigits[n,2]]],{n,0,100}]
A353427
Numbers k such that the k-th composition in standard order has all run-lengths > 1.
Original entry on oeis.org
0, 3, 7, 10, 15, 31, 36, 42, 43, 58, 63, 87, 122, 127, 136, 147, 170, 171, 175, 228, 234, 235, 250, 255, 292, 295, 343, 351, 471, 484, 490, 491, 506, 511, 528, 547, 586, 591, 676, 682, 683, 687, 698, 703, 904, 915, 938, 939, 943, 983, 996, 1002, 1003, 1018
Offset: 1
The terms and corresponding compositions begin:
0: ()
3: (1,1)
7: (1,1,1)
10: (2,2)
15: (1,1,1,1)
31: (1,1,1,1,1)
36: (3,3)
42: (2,2,2)
43: (2,2,1,1)
58: (1,1,2,2)
63: (1,1,1,1,1,1)
87: (2,2,1,1,1)
122: (1,1,1,2,2)
127: (1,1,1,1,1,1,1)
The version for parts instead of lengths is
A022340, counted by
A212804.
These compositions are counted by
A114901.
The case of all run-lengths = 2 is
A351011.
The case of all run-lengths > 2 is counted by
A353400.
A005811 counts runs in binary expansion.
Statistics of standard compositions:
Cf.
A044813,
A128695,
A165413,
A240085,
A244164,
A274174,
A318928,
A333489,
A333755,
A353402,
A353432.
-
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],!MemberQ[Length/@Split[stc[#]],1]&]
A353854
Length of the trajectory of the composition run-sum transformation (condensation) of the n-th composition in standard order.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 3, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 3, 2, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 2, 2, 1, 1, 3, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 3, 1, 1, 3, 2, 1, 1, 1, 2, 2, 2, 2
Offset: 0
The trajectory of 94685 and the a(94685) = 5 corresponding compositions:
94685: (2,1,1,4,1,1,2,1,1,2,1)
86357: (2,2,4,2,2,2,2,1)
69889: (4,4,8,1)
65793: (8,8,1)
65537: (16,1)
Positions of first appearances are
A072639.
The version for partitions is
A353841.
The last part of the same trajectory is
A353855.
This is the rank statistic counted by
A353859.
A005811 counts runs in binary expansion.
A066099 lists compositions in standard order.
A318928 gives runs-resistance of binary expansion.
A333627 represents the run-lengths of standard compositions.
A353832 represents the run-sum transformation of a partition.
A353847 represents the run-sum transformation of a composition.
A353932 lists run-sums of standard compositions, represented by
A353847.
-
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Table[Length[FixedPointList[Total/@Split[#]&,stc[n]]]-1,{n,0,100}]
Comments