A351204
Number of integer partitions of n such that every permutation has all distinct runs.
Original entry on oeis.org
1, 1, 2, 3, 4, 5, 8, 9, 11, 14, 18, 20, 25, 28, 34, 41, 47, 53, 64, 72, 84, 98, 113, 128, 148, 169, 194, 223, 255, 289, 333, 377, 428, 488, 554, 629, 715, 807, 913, 1033, 1166, 1313, 1483, 1667, 1875, 2111, 2369, 2655, 2977, 3332, 3729, 4170, 4657, 5195, 5797, 6459
Offset: 0
The a(1) = 1 through a(8) = 11 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (21) (22) (32) (33) (43) (44)
(111) (31) (41) (42) (52) (53)
(1111) (2111) (51) (61) (62)
(11111) (222) (421) (71)
(321) (2221) (431)
(3111) (4111) (521)
(111111) (211111) (2222)
(1111111) (5111)
(311111)
(11111111)
The version for run-lengths instead of runs is
A000005.
The version for normal multisets is 2^(n-1) -
A283353(n-3).
A005811 counts runs in binary expansion.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A098859 counts partitions with distinct multiplicities, ordered
A242882.
A297770 counts distinct runs in binary expansion.
A003242 counts anti-run compositions.
Counting words with all distinct runs:
-
A351202 = permutations of prime factors.
-
Table[Length[Select[IntegerPartitions[n],Select[Permutations[#],!UnsameQ@@Split[#]&]=={}&]],{n,0,15}]
-
\\ here Q(n) is A000009.
Q(n)={polcoef(prod(k=1, n, 1 + x^k + O(x*x^n)), n)}
a(n)={Q(n) + if(n, numdiv(n) - 1) + sum(k=1, (n-1)\3, sum(j=3, (n-1)\k, j%2==1 && n-k*j<>k))} \\ Andrew Howroyd, Feb 15 2022
A350952
The smallest number whose binary expansion has exactly n distinct runs.
Original entry on oeis.org
0, 1, 2, 11, 38, 311, 2254, 36079, 549790, 17593311, 549687102, 35179974591, 2225029922430, 284803830071167, 36240869367020798, 9277662557957324543, 2368116566113212692990, 1212475681849964898811391, 619877748107024946567312382, 634754814061593545284927880191
Offset: 0
The terms and their binary expansions begin:
0: ()
1: 1
2: 10
11: 1011
38: 100110
311: 100110111
2254: 100011001110
36079: 1000110011101111
549790: 10000110001110011110
For example, 311 has binary expansion 100110111 with 5 distinct runs: 1, 00, 11, 0, 111.
Subset of
A175413 (binary expansion has distinct runs), for lengths
A044813.
The version for standard compositions is
A351015.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A318928 gives runs-resistance of binary expansion.
A334028 counts distinct parts in standard compositions.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct runs:
-
A351202 = permutations of prime factors.
-
q=Table[Length[Union[Split[If[n==0,{},IntegerDigits[n,2]]]]],{n,0,1000}];Table[Position[q,i][[1,1]]-1,{i,Union[q]}]
-
a(n)={my(t=0); for(k=1, (n+1)\2, t=((t<Andrew Howroyd, Feb 15 2022
-
def a(n): # returns term by construction
if n == 0: return 0
q, r = divmod(n, 2)
if r == 0:
s = "".join("1"*i + "0"*(q-i+1) for i in range(1, q+1))
assert len(s) == n*(n//2+1)//2
else:
s = "1" + "".join("0"*(q-i+2) + "1"*i for i in range(2, q+2))
assert len(s) == ((n+1) + (n-1)*((n-1)//2+1))//2
return int(s, 2)
print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 14 2022
A351203
Number of integer partitions of n of whose permutations do not all have distinct runs.
Original entry on oeis.org
0, 0, 0, 0, 1, 2, 3, 6, 11, 16, 24, 36, 52, 73, 101, 135, 184, 244, 321, 418, 543, 694, 889, 1127, 1427, 1789, 2242, 2787, 3463, 4276, 5271, 6465, 7921, 9655, 11756, 14254, 17262, 20830, 25102, 30152, 36172, 43270, 51691, 61594, 73300, 87023, 103189, 122099, 144296, 170193, 200497
Offset: 0
The a(4) = 1 through a(9) = 16 partitions:
(211) (221) (411) (322) (332) (441)
(311) (2211) (331) (422) (522)
(21111) (511) (611) (711)
(3211) (3221) (3321)
(22111) (3311) (4221)
(31111) (4211) (4311)
(22211) (5211)
(32111) (22221)
(41111) (32211)
(221111) (33111)
(2111111) (42111)
(51111)
(222111)
(321111)
(2211111)
(3111111)
For example, the partition x = (2,1,1,1,1) has the permutation (1,1,2,1,1), with runs (1,1), (2), (1,1), which are not all distinct, so x is counted under a(6).
The version for run-lengths instead of runs is
A144300.
The version for normal multisets is
A283353.
The Heinz numbers of these partitions are
A351201.
The complement is counted by
A351204.
A005811 counts runs in binary expansion.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A098859 counts partitions with distinct multiplicities, ordered
A242882.
A297770 counts distinct runs in binary expansion.
Counting words with all distinct runs:
-
A351202 = permutations of prime factors.
Cf.
A000041,
A035363,
A047993,
A116608,
A238130 or
A238279,
A325545,
A329746,
A350842,
A351003,
A351004,
A351291.
-
Table[Length[Select[IntegerPartitions[n],MemberQ[Permutations[#],_?(!UnsameQ@@Split[#]&)]&]],{n,0,15}]
-
from sympy.utilities.iterables import partitions
from itertools import permutations, groupby
from collections import Counter
def A351203(n):
c = 0
for s, p in partitions(n,size=True):
for q in permutations(Counter(p).elements(),s):
if max(Counter(tuple(g) for k, g in groupby(q)).values(),default=0) > 1:
c += 1
break
return c # Chai Wah Wu, Oct 16 2023
A351592
Number of Look-and-Say partitions (A239455) of n without distinct multiplicities, i.e., those that are not Wilf partitions (A098859).
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 1, 0, 5, 2, 8, 9, 8, 6, 21, 14, 20, 26, 31, 24, 53, 35, 60, 68, 78, 76, 140, 115, 163, 183, 232, 218, 343, 301, 433, 432, 565, 542, 774, 728, 958, 977, 1251, 1220, 1612, 1561, 2053, 2090, 2618, 2609, 3326, 3378
Offset: 0
The a(9) = 1 through a(18) = 5 partitions are (empty columns not shown):
n=9: n=12: n=15: n=16: n=18:
--------------------------------------------------------------
(222111) (333111) (333222) (33331111) (444222)
(22221111) (444111) (555111)
(2222211111) (3322221111)
(32222211111)
(222222111111)
Non-Look-and-Say partitions are counted by
A351293, ranked by
A351295.
A032020 = number of binary expansions with all distinct run-lengths.
A044813 = numbers whose binary expansion has all distinct run-lengths.
A329738 = compositions with all equal run-lengths.
A329739 = compositions with all distinct run-lengths
A351013 = compositions with all distinct runs.
A351017 = binary words with all distinct run-lengths, for all runs
A351016.
A351292 = patterns with all distinct run-lengths, for all runs
A351200.
Cf.
A000041,
A008284,
A018783,
A047966,
A181819,
A182857,
A238130,
A305563,
A319149,
A351203,
A351204,
A351290.
-
Table[Length[Select[IntegerPartitions[n], !UnsameQ@@Length/@Split[#]&&Select[Permutations[#], UnsameQ@@Length/@Split[#]&]!={}&]],{n,0,15}]
A353390
Number of compositions of n whose own run-lengths are a subsequence (not necessarily consecutive).
Original entry on oeis.org
1, 1, 0, 0, 1, 2, 3, 2, 2, 8, 17, 26, 43, 77, 129, 210, 351, 569
Offset: 0
The a(0) = 1 through a(9) = 8 compositions (empty columns indicated by dots):
() (1) . . (22) (122) (1122) (11221) (21122) (333)
(221) (1221) (12211) (22112) (22113)
(2211) (22122)
(31122)
(121122)
(122112)
(211221)
(221121)
For example, the composition y = (2,2,3,3,1) has run-lengths (2,2,1), which form a (non-consecutive) subsequence, so y is counted under a(11).
The version for partitions is
A325702.
These compositions are ranked by
A353402.
The recursive consecutive version is
A353430.
A325705 counts partitions containing all of their distinct multiplicities.
A329739 counts compositions with all distinct run-lengths, for runs
A351013.
A353400 counts compositions with all run-lengths > 2.
Cf.
A005811,
A103295,
A114901,
A181591,
A238279,
A242882,
A324572,
A333755,
A351017,
A353401,
A353426.
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], MemberQ[Subsets[#],Length/@Split[#]]&]],{n,0,15}]
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[#]]&]
A353401
Number of integer compositions of n with all prime run-lengths.
Original entry on oeis.org
1, 0, 1, 1, 1, 1, 4, 3, 6, 9, 10, 18, 27, 35, 54, 83, 107, 176, 242, 354, 515, 774, 1070, 1648, 2332, 3429, 4984, 7326, 10521, 15591, 22517, 32908, 48048, 70044, 101903, 149081, 216973, 316289, 461959, 672664, 981356, 1431256, 2086901, 3041577, 4439226, 6467735
Offset: 0
The a(0) = 1 through a(9) = 9 compositions (empty column indicated by dot, 0 is the empty composition):
0 . 11 111 22 11111 33 11122 44 333
222 22111 1133 11133
1122 1111111 3311 33111
2211 11222 111222
22211 222111
112211 1111122
1112211
1122111
2211111
The case of runs equal to 2 is
A003242 aerated.
The version for parts instead of run-lengths is
A023360, both
A353429.
The version for partitions is
A055923.
A005811 counts runs in binary expansion.
A008466 counts compositions with some part > 2.
A167606 counts compositions with adjacent parts coprime.
Cf.
A078012,
A165413,
A175413,
A274174,
A333381,
A333755,
A353390,
A353391,
A353392,
A353402,
A353403.
-
b:= proc(n, h) option remember; `if`(n=0, 1, add(`if`(i<>h, add(
`if`(isprime(j), b(n-i*j, i), 0), j=2..n/i), 0), i=1..n/2))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..60); # Alois P. Heinz, May 18 2022
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[Length/@Split[#],_?(!PrimeQ[#]&)]&]],{n,0,15}]
A354580
Number of rucksack compositions of n: every distinct partial run has a different sum.
Original entry on oeis.org
1, 1, 2, 4, 6, 12, 22, 39, 68, 125, 227, 402, 710, 1280, 2281, 4040, 7196, 12780, 22623, 40136, 71121, 125863, 222616, 393305, 695059, 1227990, 2167059, 3823029, 6743268, 11889431, 20955548, 36920415, 65030404, 114519168, 201612634, 354849227
Offset: 0
The a(0) = 1 through a(5) = 12 compositions:
() (1) (2) (3) (4) (5)
(1,1) (1,2) (1,3) (1,4)
(2,1) (2,2) (2,3)
(1,1,1) (3,1) (3,2)
(1,2,1) (4,1)
(1,1,1,1) (1,1,3)
(1,2,2)
(1,3,1)
(2,1,2)
(2,2,1)
(3,1,1)
(1,1,1,1,1)
These compositions are ranked by
A354581.
A353836 counts partitions by number of distinct run-sums.
A353847 is the composition run-sum transformation.
A353851 counts compositions with all equal run-sums, ranked by
A353848.
Cf.
A143823,
A169942,
A242882,
A325545,
A325680,
A325682,
A325685,
A325687,
A329739,
A351017,
A353849.
-
Table[Length[Select[Join@@Permutations/@ IntegerPartitions[n],UnsameQ@@Total/@Union@@Subsets/@Split[#]&]],{n,0,15}]
A165933
Least integer, k, whose value is n in A165413.
Original entry on oeis.org
1, 4, 35, 536, 16775, 1060976, 135007759, 34460631520, 17617985239071, 18027600169142208, 36907002795598798911, 151143401509104346210176, 1238053384151947477501575295, 20283338091738780737237428502272, 664629209970464486086782992577855743
Offset: 1
a(1) in binary is 1, a(2) in binary is 100, a(3) in binary is 100011, a(4) in binary is 1000011000, etc.
From _Gus Wiseman_, Feb 21 2022: (Start)
The terms and their binary expansions begin:
n a(n)
1: 1 = 1
2: 4 = 100
3: 35 = 100011
4: 536 = 1000011000
5: 16775 = 100000110000111
6: 1060976 = 100000011000001110000
7: 135007759 = 1000000011000000111000001111
8: 34460631520 = 100000000110000000111000000111100000
9: 17617985239071 = 100000000011000000001110000000111100000011111
(End)
A subset of
A044813 (distinct run-lengths) and of
A175413 (distinct runs).
These are the positions of first appearances in
A165413.
The version for runs instead of run-lengths is
A350952, firsts of
A297770.
A005811 counts runs in binary expansion.
A242882 counts compositions with distinct multiplicities.
A318928 gives runs-resistance of binary expansion.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct run-lengths:
-
g[n_] := Table[ {Table[1, {i}], Table[0, {n - i + 1}]}, {i, Floor[(n + If[ OddQ@n, 1, 0])/2]}]; f[n_] := FromDigits[ If[ OddQ@n, Flatten@ Most@ Flatten[ g@n, 1], Flatten@ g@n], 2]; Array[f, 14]
s=Table[Length[Union[Length/@Split[IntegerDigits[n,2]]]],{n,0,1000}]; Table[Position[s,k][[1,1]]-1,{k,Union[s]}] (* Gus Wiseman, Feb 21 2022 *)
-
def a(n): # returns term by construction
if n == 1: return 1
q, r = divmod(n+1, 2)
s = "".join("1"*i + "0"*(n+1-i) for i in range(1, q+1))
if r == 0: s = s.rstrip("0")
return int(s, 2)
print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Feb 22 2022
A351205
Numbers whose binary expansion does not have all distinct runs.
Original entry on oeis.org
5, 9, 10, 17, 18, 20, 21, 22, 26, 27, 33, 34, 36, 37, 40, 41, 42, 43, 45, 46, 51, 53, 54, 58, 65, 66, 68, 69, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 93, 94, 99, 100, 101, 102, 105, 106, 107, 108, 109, 110, 117, 118, 119, 122, 129
Offset: 1
The terms together with their binary expansions begin:
5: 101 41: 101001 74: 1001010
9: 1001 42: 101010 75: 1001011
10: 1010 43: 101011 76: 1001100
17: 10001 45: 101101 77: 1001101
18: 10010 46: 101110 80: 1010000
20: 10100 51: 110011 81: 1010001
21: 10101 53: 110101 82: 1010010
22: 10110 54: 110110 83: 1010011
26: 11010 58: 111010 84: 1010100
27: 11011 65: 1000001 85: 1010101
33: 100001 66: 1000010 86: 1010110
34: 100010 68: 1000100 87: 1010111
36: 100100 69: 1000101 89: 1011001
37: 100101 72: 1001000 90: 1011010
40: 101000 73: 1001001 91: 1011011
For example, 77 has binary expansion 1001101, with runs 1, 00, 11, 0, 1, which are not all distinct, so 77 is in the sequence.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A318928 gives runs-resistance of binary expansion.
A325545 counts compositions with distinct differences.
A334028 counts distinct parts in standard compositions.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct runs:
-
A351202 = permutations of prime factors.
-
q:= proc(n) uses ListTools; (l-> is(nops(l)<>add(
nops(i), i={Split(`=`, l, 1)}) +add(
nops(i), i={Split(`=`, l, 0)})))(Bits[Split](n))
end:
select(q, [$1..200])[]; # Alois P. Heinz, Mar 14 2022
-
Select[Range[0,100],!UnsameQ@@Split[IntegerDigits[#,2]]&]
-
from itertools import groupby, product
def ok(n):
runs = [(k, len(list(g))) for k, g in groupby(bin(n)[2:])]
return len(runs) > len(set(runs))
print([k for k in range(130) if ok(k)]) # Michael S. Branicky, Feb 09 2022
Comments