A384175
Number of subsets of {1..n} with all distinct lengths of maximal runs (increasing by 1).
Original entry on oeis.org
1, 2, 4, 7, 13, 24, 44, 77, 135, 236, 412, 713, 1215, 2048, 3434, 5739, 9559, 15850, 26086, 42605, 69133, 111634, 179602, 288069, 460553, 733370, 1162356, 1833371, 2878621, 4501856, 7016844, 10905449, 16904399, 26132460, 40279108, 61885621, 94766071, 144637928
Offset: 0
The subset {2,3,5,6,7,9} has maximal runs ((2,3),(5,6,7),(9)), with lengths (2,3,1), so is counted under a(9).
The a(0) = 1 through a(4) = 13 subsets:
{} {} {} {} {}
{1} {1} {1} {1}
{2} {2} {2}
{1,2} {3} {3}
{1,2} {4}
{2,3} {1,2}
{1,2,3} {2,3}
{3,4}
{1,2,3}
{1,2,4}
{1,3,4}
{2,3,4}
{1,2,3,4}
For equal instead of distinct lengths we have
A243815.
These subsets are ranked by
A328592.
The complement is counted by
A384176.
For permutations instead of subsets we have
A384891, equal instead of distinct
A384892.
A034839 counts subsets by number of maximal runs, for strict partitions
A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement
A336866.
Cf.
A000009,
A010027,
A044813,
A047993,
A242882,
A325325,
A329739,
A351202,
A383013,
A384889,
A384890.
-
Table[Length[Select[Subsets[Range[n]],UnsameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}]
-
lista(n)={my(o=(1-x^(n+1))/(1-x)*O(y^(n+2)),p=prod(i=1,n,1+o+x*y^(i+1)/(1-y),1/(1-y)));p=subst(serlaplace(p),x,1);Vec(p-1)} \\ Christian Sievers, Jun 18 2025
A384893
Triangle read by rows where T(n,k) is the number of subsets of {1..n} with k maximal anti-runs (increasing by more than 1).
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 7, 5, 2, 1, 1, 12, 10, 6, 2, 1, 1, 20, 20, 13, 7, 2, 1, 1, 33, 38, 29, 16, 8, 2, 1, 1, 54, 71, 60, 39, 19, 9, 2, 1, 1, 88, 130, 122, 86, 50, 22, 10, 2, 1, 1, 143, 235, 241, 187, 116, 62, 25, 11, 2, 1, 1, 232, 420, 468, 392, 267, 150, 75, 28, 12, 2, 1
Offset: 0
The subset {3,6,7,9,11,12} has maximal anti-runs ((3,6),(7,9,11),(12)), so is counted under T(12,3).
The subset {3,6,7,9,10,12} has maximal anti-runs ((3,6),(7,9),(10,12)), so is counted under T(12,3).
Row n = 5 counts the following subsets:
{} {1} {1,2} {1,2,3} {1,2,3,4} {1,2,3,4,5}
{2} {2,3} {2,3,4} {2,3,4,5}
{3} {3,4} {3,4,5}
{4} {4,5} {1,2,3,5}
{5} {1,2,4} {1,2,4,5}
{1,3} {1,2,5} {1,3,4,5}
{1,4} {1,3,4}
{1,5} {1,4,5}
{2,4} {2,3,5}
{2,5} {2,4,5}
{3,5}
{1,3,5}
Triangle begins:
1
1 1
1 2 1
1 4 2 1
1 7 5 2 1
1 12 10 6 2 1
1 20 20 13 7 2 1
1 33 38 29 16 8 2 1
1 54 71 60 39 19 9 2 1
1 88 130 122 86 50 22 10 2 1
1 143 235 241 187 116 62 25 11 2 1
1 232 420 468 392 267 150 75 28 12 2 1
1 376 744 894 806 588 363 188 89 31 13 2 1
For runs instead of anti-runs we have
A034839, for strict partitions
A116674.
For integer partitions instead of subsets we have
A268193, strict
A384905.
A384175 counts subsets with all distinct lengths of maximal runs, complement
A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts
A384878.
-
Table[Length[Select[Subsets[Range[n]],Length[Split[#,#2!=#1+1&]]==k&]],{n,0,10},{k,0,n}]
A384177
Number of subsets of {1..n} with all distinct lengths of maximal anti-runs (increasing by more than 1).
Original entry on oeis.org
1, 2, 3, 5, 10, 19, 35, 62, 109, 197, 364, 677, 1251, 2288, 4143, 7443, 13318, 23837, 42809, 77216, 139751, 253293, 458800, 829237, 1494169, 2683316, 4804083, 8580293, 15301324, 27270061, 48607667, 86696300, 154758265, 276453311, 494050894, 882923051
Offset: 0
The subset {1,2,4,5,7,10} has maximal anti-runs ((1),(2,4),(5,7,10)), with lengths (1,2,3), so is counted under a(10).
The a(0) = 1 through a(5) = 19 subsets:
{} {} {} {} {} {}
{1} {1} {1} {1} {1}
{2} {2} {2} {2}
{3} {3} {3}
{1,3} {4} {4}
{1,3} {5}
{1,4} {1,3}
{2,4} {1,4}
{1,2,4} {1,5}
{1,3,4} {2,4}
{2,5}
{3,5}
{1,2,4}
{1,2,5}
{1,3,4}
{1,3,5}
{1,4,5}
{2,3,5}
{2,4,5}
These subsets are ranked by
A384879.
For equal instead of distinct lengths we have
A384889, for runs
A243815.
A034839 counts subsets by number of maximal runs, for strict partitions
A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement
A336866.
Cf.
A000009,
A010027,
A044813,
A047993,
A106529,
A123513,
A242882,
A325325,
A328592,
A329739,
A351202,
A384890.
-
Table[Length[Select[Subsets[Range[n]],UnsameQ@@Length/@Split[#,#2!=#1+1&]&]],{n,0,10}]
-
lista(n)={my(o=(1-x^(n+1))/(1-x)*O(y*y^n),p=prod(i=1,(n+1)\2,1+o+x*y^(2*i-1)/(1-y)^(i-1)));p=subst(serlaplace(p),x,1);Vec((p-y)/(1-y)^2)} \\ Christian Sievers, Jun 18 2025
A384877
Irregular triangle read by rows where row k lists the lengths of maximal anti-runs (increasing by more than 1) in the binary indices of n.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 3, 1, 2, 1, 1, 2, 2, 3, 3, 1, 3, 1, 2, 2, 2
Offset: 0
The binary indices of 182 are {2,3,5,6,8}, with maximal anti-runs ((2),(3,5),(6,8)) so row 182 is (1,2,2).
Triangle begins:
0: ()
1: (1)
2: (1)
3: (1,1)
4: (1)
5: (2)
6: (1,1)
7: (1,1,1)
8: (1)
9: (2)
10: (2)
11: (1,2)
12: (1,1)
13: (2,1)
14: (1,1,1)
15: (1,1,1,1)
Positions of rows of the form (1,1,...) are
A023758.
Positions of first appearances of each distinct row appear to be
A052499.
A355394 counts partitions without a neighborless part, singleton case
A355393.
A356606 counts strict partitions without a neighborless part, complement
A356607.
A384175 counts subsets with all distinct lengths of maximal runs, complement
A384176.
Cf.
A044813,
A048793,
A069010,
A164707,
A243815,
A246029,
A328592,
A384177,
A384877,
A384879,
A384893.
-
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
Table[Length/@Split[bpe[n],#2!=#1+1&],{n,0,100}]
A384890
Number of maximal anti-runs (increasing by more than 1) in the binary indices of n.
Original entry on oeis.org
0, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 3, 2, 2, 2, 3, 3, 3, 4, 5, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 2, 2, 2, 3, 2, 2, 3, 4, 3, 3, 3, 4, 4, 4, 5, 6, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2
Offset: 0
The binary indices of 51 are {1,2,5,6}, with maximal anti-runs ((1),(2,5),(6)), so a(51) = 3.
For prime indices instead of binary indices we have
A384906.
A356606 counts strict partitions without a neighborless part, complement
A356607.
A384175 counts subsets with all distinct lengths of maximal runs, complement
A384176.
-
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
Table[Length[Split[bpe[n],#2!=#1+1&]],{n,0,100}]
A384905
Triangle read by rows where T(n,k) is the number of strict integer partitions of n with k maximal anti-runs (decreasing by more than 1).
Original entry on oeis.org
1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 2, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 5, 2, 1, 0, 0, 0, 0, 0, 0, 0, 6, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 7, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0
The T(10,2) = 3 strict partitions with 2 maximal anti-runs are: (7,2,1), (5,4,1), (5,3,2).
Triangle begins:
1
0 1
0 1 0
0 1 1 0
0 2 0 0 0
0 2 1 0 0 0
0 3 0 1 0 0 0
0 3 2 0 0 0 0 0
0 4 2 0 0 0 0 0 0
0 5 2 1 0 0 0 0 0 0
0 6 3 0 1 0 0 0 0 0 0
0 7 4 1 0 0 0 0 0 0 0 0
0 9 3 3 0 0 0 0 0 0 0 0 0
This is the strict case of
A268193.
A384175 counts subsets with all distinct lengths of maximal runs, complement
A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts
A384878.
-
Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Length[Split[#,#1!=#2+1&]]==k&]],{n,0,10},{k,0,n}]
A384886
Number of strict integer partitions of n with all equal lengths of maximal runs (decreasing by 1).
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 4, 4, 4, 7, 7, 8, 11, 11, 14, 17, 19, 20, 27, 27, 35, 38, 45, 47, 60, 63, 75, 84, 97, 104, 127, 134, 155, 175, 196, 218, 251, 272, 307, 346, 384, 424, 480, 526, 586, 658, 719, 798, 890, 979, 1078, 1201, 1315, 1451, 1603, 1762, 1934, 2137
Offset: 0
The strict partition y = (7,6,5,3,2,1) has maximal runs ((7,6,5),(3,2,1)), with lengths (3,3), so y is counted under a(24).
The a(1) = 1 through a(14) = 14 partitions (A-E = 10-14):
1 2 3 4 5 6 7 8 9 A B C D E
21 31 32 42 43 53 54 64 65 75 76 86
41 51 52 62 63 73 74 84 85 95
321 61 71 72 82 83 93 94 A4
81 91 92 A2 A3 B3
432 631 A1 B1 B2 C2
531 4321 641 543 C1 D1
731 642 742 752
741 751 842
831 841 851
5421 931 941
A31
5432
6521
For subsets instead of strict partitions we have
A243815, distinct lengths
A384175.
For distinct instead of equal lengths we have
A384178, for anti-runs
A384880.
Cf.
A000217,
A008284,
A044813,
A047966,
A089259,
A325324,
A325325,
A329739,
A382857,
A383013,
A383708,
A384176.
-
Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&SameQ@@Length/@Split[#,#2==#1-1&]&]],{n,0,15}]
-
A_q(N) = {Vec(1+sum(k=1,floor(-1/2+sqrt(2+2*N)), sum(i=1,(N/(k*(k+1)/2))+1, q^(k*(k+1)*i^2/2)/prod(j=1,i, 1 - q^(j*k)))) + O('q^(N+1)))} \\ John Tyler Rascoe, Aug 21 2025
A384878
Position of first appearance of n in the flattened version of the triangle A384877, whose m-th row lists the lengths of maximal anti-runs in the binary indices of m.
Original entry on oeis.org
1, 6, 34, 178, 882, 4210, 19570, 89202, 400498, 1776754
Offset: 1
The set of binary indices of each nonnegative integer and its partition into anti-runs begins:
0: {} {{}}
1: {1} {{1}}
2: {2} {{2}}
3: {1,2} {{1},{2}}
4: {3} {{3}}
5: {1,3} {{1,3}}
6: {2,3} {{2},{3}}
7: {1,2,3} {{1},{2},{3}}
The flattened version begins: {}, {1}, {2}, {1}, {2}, {3}, {1,3}, {2}, {3}, {1}, {2}, {3}. Of these sets, the first of length 2 is the sixth (starting with 0), so we have a(2) = 6.
For runs instead of anti-runs we have
A001792.
The unflattened version is
A052499.
A023758 lists differences of powers of 2.
A384175 counts subsets with all distinct lengths of maximal runs, complement
A384176.
-
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
q=Join@@Table[Length/@Split[bpe[n],#2!=#1+1&],{n,0,100}];
Table[Position[q,i][[1,1]],{i,mnrm[q]}]
A384884
Number of integer partitions of n with all distinct lengths of maximal gapless runs (decreasing by 0 or 1).
Original entry on oeis.org
1, 1, 2, 3, 4, 6, 9, 13, 18, 25, 35, 46, 60, 79, 104, 131, 170, 215, 271, 342, 431, 535, 670, 830, 1019, 1258, 1547, 1881, 2298, 2787, 3359, 4061, 4890, 5849, 7010, 8361, 9942, 11825, 14021, 16558, 19561, 23057, 27084, 31821, 37312, 43627, 50999, 59500, 69267
Offset: 0
The partition y = (6,6,4,3,3,2) has maximal gapless runs ((6,6),(4,3,3,2)), with lengths (2,4), so y is counted under a(24).
The a(1) = 1 through a(8) = 18 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (21) (22) (32) (33) (43) (44)
(111) (211) (221) (222) (322) (332)
(1111) (311) (321) (331) (422)
(2111) (411) (421) (431)
(11111) (2211) (511) (521)
(3111) (2221) (611)
(21111) (3211) (2222)
(111111) (4111) (3221)
(22111) (4211)
(31111) (5111)
(211111) (22211)
(1111111) (32111)
(41111)
(221111)
(311111)
(2111111)
(11111111)
For subsets instead of strict partitions we have
A384175.
For equal instead of distinct lengths we have
A384887.
A098859 counts Wilf partitions (distinct multiplicities), complement
A336866.
A355394 counts partitions without a neighborless part, singleton case
A355393.
A356236 counts partitions with a neighborless part, singleton case
A356235.
A356606 counts strict partitions without a neighborless part, complement
A356607.
Cf.
A008284,
A044813,
A047993,
A242882,
A287170,
A325324,
A325325,
A356226,
A356230,
A356233,
A356234,
A384176,
A384177,
A384886.
-
Table[Length[Select[IntegerPartitions[n],UnsameQ@@Length/@Split[#,#2>=#1-1&]&]],{n,0,15}]
A243815
Number of length n words on alphabet {0,1} such that the length of every maximal block of 0's (runs) is the same.
Original entry on oeis.org
1, 2, 4, 8, 14, 24, 39, 62, 97, 151, 233, 360, 557, 864, 1344, 2099, 3290, 5176, 8169, 12931, 20524, 32654, 52060, 83149, 133012, 213069, 341718, 548614, 881572, 1417722, 2281517, 3673830, 5918958, 9540577, 15384490, 24817031, 40045768, 64637963, 104358789
Offset: 0
0110 is a "good" word because the length of both its runs of 0's is 1.
Words of the form 11...1 are good words because the condition is vacuously satisfied.
a(5) = 24 because there are 32 length 5 binary words but we do not count: 00010, 00101, 00110, 01000, 01001, 01100, 10010, 10100.
For distinct instead of equal lengths we have
A384175, complement
A384176.
For anti-runs instead of runs we have
A384889, for partitions
A384888.
For permutations instead of subsets we have
A384892, distinct instead of equal
A384891.
The complement is counted by
A385214.
A034839 counts subsets by number of maximal runs, for strict partitions
A116674.
A384887 counts partitions with equal lengths of gapless runs, distinct
A384884.
-
a:= n-> 1 + add(add((d-> binomial(d+j, d))(n-(i*j-1))
, j=1..iquo(n+1, i)), i=2..n+1):
seq(a(n), n=0..50); # Alois P. Heinz, Jun 11 2014
-
nn=30;Prepend[Map[Total,Transpose[Table[Drop[CoefficientList[Series[ (1+x^k)/(1-x-x^(k+1))-1/(1-x),{x,0,nn}],x],1],{k,1,nn}]]],0]+1
Table[Length[Select[Subsets[Range[n]],SameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}] (* Gus Wiseman, Jun 23 2025 *)
Showing 1-10 of 25 results.
Comments