A351292
Number of patterns of length n with all distinct run-lengths.
Original entry on oeis.org
1, 1, 1, 5, 5, 9, 57, 61, 109, 161, 1265, 1317, 2469, 3577, 5785, 43901, 47165, 86337, 127665, 204853, 284197, 2280089, 2398505, 4469373, 6543453, 10570993, 14601745, 22502549, 159506453, 171281529, 314077353, 462623821, 742191037, 1031307185, 1580543969, 2141246229
Offset: 0
The a(1) = 1 through a(5) = 9 patterns:
(1) (1,1) (1,1,1) (1,1,1,1) (1,1,1,1,1)
(1,1,2) (1,1,1,2) (1,1,1,1,2)
(1,2,2) (1,2,2,2) (1,1,1,2,2)
(2,1,1) (2,1,1,1) (1,1,2,2,2)
(2,2,1) (2,2,2,1) (1,2,2,2,2)
(2,1,1,1,1)
(2,2,1,1,1)
(2,2,2,1,1)
(2,2,2,2,1)
The a(6) = 57 patterns grouped by sum:
111111 111112 111122 112221 111223 111233 112333 122333
111211 111221 122211 111322 111332 113332 133322
112111 122111 211122 112222 112223 122233 221333
211111 221111 221112 211222 113222 133222 223331
221113 122222 211333 333122
222112 211133 222133 333221
222211 221222 222331
223111 222113 233311
311122 222122 331222
322111 222221 332221
222311 333112
233111 333211
311222
322211
331112
332111
The version for runs instead of run-lengths is
A351200.
A005811 counts runs in binary expansion.
A032011 counts patterns with distinct multiplicities.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A131689 counts patterns by number of distinct parts.
A165413 counts distinct run-lengths in binary expansion, runs
A297770.
Counting words with all distinct runs:
-
A351202 = permutations of prime factors.
Cf.
A003242,
A098504,
A098859,
A106356,
A239455,
A242882,
A325545,
A328592,
A329740,
A351014,
A351293.
-
allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
Table[Length[Select[Join@@Permutations/@allnorm[n],UnsameQ@@Length/@Split[#]&]],{n,0,6}]
-
P(n) = {Vec(-1 + prod(k=1, n, 1 + y*x^k + O(x*x^n)))}
R(u,k) = {k*[subst(serlaplace(p)/y, y, k-1) | p<-u]}
seq(n)={my(u=P(n), c=poldegree(u[#u])); concat([1], sum(k=1, c, R(u, k)*sum(r=k, c, binomial(r, k)*(-1)^(r-k)) ))} \\ Andrew Howroyd, Feb 11 2022
A351637
Triangle read by rows: T(n,k) is the number of length n word structures with all distinct run-lengths using exactly k different symbols, n >= 0, k = 0..floor(sqrt(8*n+1)-1/2).
Original entry on oeis.org
1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 4, 0, 1, 10, 6, 0, 1, 12, 6, 0, 1, 18, 12, 0, 1, 26, 18, 0, 1, 56, 96, 24, 0, 1, 64, 102, 24, 0, 1, 100, 186, 48, 0, 1, 132, 264, 72, 0, 1, 192, 420, 120, 0, 1, 350, 1344, 864, 120, 0, 1, 434, 1572, 936, 120
Offset: 0
Triangle begins:
1;
0, 1;
0, 1;
0, 1, 2;
0, 1, 2;
0, 1, 4;
0, 1, 10, 6;
0, 1, 12, 6;
0, 1, 18, 12;
0, 1, 26, 18;
0, 1, 56, 96, 24;
0, 1, 64, 102, 24;
0, 1, 100, 186, 48;
0, 1, 132, 264, 72;
...
The T(6,1) = 1 word is 111111.
The T(6,2) = 10 words are 111112, 111122, 111211, 111221, 112111, 112221, 112222, 122111, 122211, 122222.
The T(6,3) = 6 words are 111223, 111233, 112333, 112223, 122333, 122233.
-
P(n) = {Vec(-1 + prod(k=1, n, 1 + y*x^k + O(x*x^n)))}
R(u, k) = {k*[subst(serlaplace(p)/y, y, k-1) | p<-u]}
T(n)={my(u=P(n), v=concat([1], sum(k=1, n, R(u, k)*sum(r=k, n, y^r*binomial(r, k)*(-1)^(r-k)/r!) ))); [Vecrev(p) | p<-v]}
{ my(A=T(16)); for(n=1, #A, print(A[n])) }
A351642
Number of length n word structures with all distinct runs using an infinite alphabet.
Original entry on oeis.org
1, 1, 2, 4, 10, 26, 74, 218, 668, 2116, 6928, 23254, 79998, 281694, 1011956, 3704900, 13815692, 52386978, 201787950, 789178950, 3130824160, 12589367840, 51287685476, 211557376938, 883067740514, 3728494418330, 15916998678040, 68672820917088, 299331260431104
Offset: 0
The a(4) = 10 words are 1111, 1112, 1121, 1122, 1211, 1222, 1123, 1223, 1233, 1234.
The initial terms are similar to
A206464.
-
\\ See A351641 for R, S.
seq(n)={my(q=S(n)); concat([1], sum(k=1, n, R(q^k-1)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)/r!) )); }
A242551
Number of n-length words on infinite alphabet {1,2,...} such that the maximal runs of consecutive equal integers have lengths that are at least as great as the integer.
Original entry on oeis.org
1, 1, 2, 5, 11, 24, 53, 118, 261, 577, 1276, 2823, 6246, 13819, 30572, 67635, 149630, 331029, 732344, 1620187, 3584388, 7929844, 17543415, 38811782, 85864379, 189960150, 420254129, 929739922, 2056889538, 4550514023, 10067228909, 22272010878, 49272989918, 109008007822, 241161451563, 533528195645
Offset: 0
a(3)=5 because we have: 111, 122, 221, 222, 333.
a(4)=11 because we have: 1111, 1122, 1221, 1222, 2211, 2221, 2222, 3331, 1333, 3333, 4444.
-
b:= proc(n, t) option remember; `if`(n=0, 1,
`if`(t=0, 0, b(n-1, t)) +add(
`if`(t=j, 0, b(n-j, j)), j=1..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..40); # Alois P. Heinz, Oct 07 2015
-
n=nn=35;CoefficientList[Series[1/(1-Sum[v[i]/(1+v[i])/.v[i]->z^i/(1-z),{i,1,n}]),{z,0,nn}],z]
-
C_x(N)={my(x='x+O('x^N), h = 1/(1-sum(i=1,N, x^i/(1 - x + x^i)))); Vec(h)}
C_x(40) \\ John Tyler Rascoe, Jul 23 2024
A351639
Number of length n word structures with all distinct run-lengths using at most 3 symbols.
Original entry on oeis.org
1, 1, 1, 3, 3, 5, 17, 19, 31, 45, 153, 167, 287, 397, 613, 1695, 2007, 3185, 4565, 6799, 9235, 24057, 27645, 44483, 61619, 92089, 122857, 179355, 385995, 468605, 713849, 996331, 1441447, 1947813, 2766657, 3659135, 7467623, 8930629, 13471885, 18283575, 26484639
Offset: 0
-
\\ See A351637 for P, R.
seq(n)={my(u=P(n)); concat([1], sum(k=1, n, R(u, k)*sum(r=k, 3, binomial(r, k)*(-1)^(r-k)/r!) ))}
A351732
Number of length n word structures using an infinite alphabet with all distinct run-lengths and the first run length of a symbol less than that of previous symbols.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 7, 8, 12, 17, 46, 51, 84, 114, 172, 437, 520, 810, 1153, 1699, 2298, 6075, 6955, 11219, 15561, 23308, 31133, 45544, 107379, 128475, 200201, 281480, 413389, 561028, 806643, 1071165, 2514418, 2952086, 4619012, 6364285, 9436458
Offset: 0
The a(3) = 2 word structures are 111, 112.
The a(4) = 2 word structures are 1111, 1112.
The a(5) = 3 word structures are 11111, 11112, 11122.
The a(6) = 7 word structures are 111111, 111112, 111122, 111221, 111211, 112111, 111223.
-
P(n) = {Vec(-1 + prod(k=1, n, 1 + y*x^k + O(x*x^n)))}
R(u, k) = {k*[subst(serlaplace(p)/y, y, k-1) | p<-u]}
seq(n)={my(u=P(n)); concat([1], sum(k=1, n, R(u, k)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)/(r!)^2) ))}
A384162
Number of length n words over an n-ary alphabet such that a single letter in every run of letters is marked.
Original entry on oeis.org
1, 6, 45, 460, 5945, 92736, 1694329, 35487432, 838341009, 22054058290, 639434542021, 20260243575936, 696512594466793, 25822887652517970, 1027054229302256625, 43622499402922710256, 1970666970910292873249, 94353519890358073478880, 4772755056209685781141981
Offset: 1
a(2) = 6 counts: (1#,1), (1,1#), (1#,2#), (2#,1#), (2#,2), (2,2#) where # denotes a mark.
Showing 1-7 of 7 results.
Comments