A293815
Number T(n,k) of sets of exactly k nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter; triangle T(n,k), n>=0, read by rows.
Original entry on oeis.org
1, 0, 1, 0, 2, 0, 4, 2, 0, 10, 5, 0, 26, 18, 1, 0, 76, 52, 8, 0, 232, 168, 30, 0, 764, 533, 114, 4, 0, 2620, 1792, 411, 22, 0, 9496, 6161, 1462, 116, 0, 35696, 22088, 5237, 482, 6, 0, 140152, 81690, 18998, 1966, 48, 0, 568504, 313224, 70220, 7682, 274
Offset: 0
T(0,0) = 1: {}.
T(3,1) = 4: {aaa}, {aab}, {aba}, {abc}.
T(3,2) = 2: {a,aa}, {a,ab}.
T(4,2) = 5: {a,aaa}, {a,aab}, {a,aba}, {a,abc}, {aa,ab}.
T(5,3) = 1: {a,aa,ab}.
Triangle T(n,k) begins:
1;
0, 1;
0, 2;
0, 4, 2;
0, 10, 5;
0, 26, 18, 1;
0, 76, 52, 8;
0, 232, 168, 30;
0, 764, 533, 114, 4;
0, 2620, 1792, 411, 22;
0, 9496, 6161, 1462, 116;
0, 35696, 22088, 5237, 482, 6;
0, 140152, 81690, 18998, 1966, 48;
...
Columns k=0-10 give:
A000007,
A000085 (for n>0),
A293964,
A293965,
A293966,
A293967,
A293968,
A293969,
A293970,
A293971,
A293972.
-
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0,
add(b(n-i*j, i-1)*binomial(g(i), j)*x^j, j=0..n/i))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
seq(T(n), n=0..15);
-
g[n_] := g[n] = If[n < 2, 1, g[n - 1] + (n - 1)*g[n - 2]];
b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i<1, 0, Sum[b[n - i*j, i-1]* Binomial[g[i], j]*x^j, {j, 0, n/i}]]]];
T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n, n]];
Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Jun 04 2018, from Maple *)
A293110
Number of multisets of nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
Original entry on oeis.org
1, 1, 3, 7, 20, 54, 164, 500, 1630, 5472, 19257, 70133, 265858, 1042346, 4235031, 17760943, 76913277, 342919431, 1573637985, 7415371293, 35860511131, 177641956111, 900782461170, 4668600610346, 24714284921937, 133467868645017, 734844788634269, 4120752558254581
Offset: 0
a(0) = 1: {}.
a(1) = 1: {a}
a(2) = 3: {a,a}, {aa}, {ab}.
a(3) = 7: {a,a,a}, {a,aa}, {a,ab}, {aaa}, {aab}, {aba}, {abc}.
-
g:= proc(n) option remember;
`if`(n<2, 1, g(n-1)+(n-1)*g(n-2))
end:
a:= proc(n) option remember; `if`(n=0, 1, add(add(g(d)
*d, d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..40);
-
g[n_] := g[n] = If[n < 2, 1, g[n - 1] + (n - 1)*g[n - 2]];
a[n_] := a[n] = If[n == 0, 1, Sum[Sum[g[d]*d, {d, Divisors[j]}]*a[n - j], {j, 1, n}]/n];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jun 07 2018, from Maple *)
A293809
Number of multisets of exactly n nonempty words with a total of 2n letters over 2n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
Original entry on oeis.org
1, 2, 7, 22, 73, 240, 818, 2824, 10004, 36252, 134594, 512632, 2002797, 8037634, 33122211, 140287074, 610344666, 2728599114, 12524559427, 59014996342, 285169596358, 1412357461074, 7161541766341, 37150562120334, 196945057245451, 1066104659977212
Offset: 0
a(0) = 1: {}.
a(1) = 2: {aa}, {ab}.
a(2) = 7: {a,aaa}, {a,aab}, {a,aba}, {a,abc}, {aa,aa}, {aa,ab}, {ab,ab}.
-
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
a:= proc(n) option remember; `if`(n=0, 1, add(add(d*
g(d+1), d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..30);
-
g[n_] := g[n] = If[n < 2, 1, g[n-1] + (n-1)*g[n-2]];
a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*g[d+1], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 23 2023, after Alois P. Heinz *)
A294004
Number of multisets of exactly two nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
Original entry on oeis.org
1, 2, 7, 18, 56, 168, 543, 1792, 6187, 22088, 81766, 313224, 1239764, 5068320, 21355894, 92714368, 413918310, 1899260064, 8941942444, 43168351136, 213385362136, 1079240048256, 5578228510556, 29443746273792, 158547033453372, 870370433845888, 4866859876496872
Offset: 2
-
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
b:= proc(n, i) option remember; series(`if`(n=0 or i=1, x^n,
add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)), x, 3)
end:
a:= n-> coeff(b(n$2), x, 2):
seq(a(n), n=2..30);
A294005
Number of multisets of exactly three nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
Original entry on oeis.org
1, 2, 7, 22, 68, 218, 721, 2438, 8491, 30478, 112524, 428382, 1678600, 6778708, 28169286, 120516092, 530081370, 2396797920, 11125584584, 52993063796, 258676491628, 1293160049244, 6612750833996, 34564483264256, 184470133103464, 1004514566402816
Offset: 3
-
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
b:= proc(n, i) option remember; series(`if`(n=0 or i=1, x^n,
add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)), x, 4)
end:
a:= n-> coeff(b(n$2), x, 3):
seq(a(n), n=3..30);
A294006
Number of multisets of exactly four nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
Original entry on oeis.org
1, 2, 7, 22, 73, 234, 791, 2702, 9507, 34258, 126807, 482306, 1885031, 7578028, 31316391, 133117500, 581531653, 2611112712, 12037781812, 56962049532, 276345797775, 1373655295948, 6988160240848, 36356528106984, 193225799686632, 1048279646446240
Offset: 4
-
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
b:= proc(n, i) option remember; series(`if`(n=0 or i=1, x^n,
add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)), x, 5)
end:
a:= n-> coeff(b(n$2), x, 4):
seq(a(n), n=4..35);
A294007
Number of multisets of exactly five nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
Original entry on oeis.org
1, 2, 7, 22, 73, 240, 811, 2792, 9857, 35644, 132119, 502832, 1964131, 7885792, 32523695, 137915764, 600865387, 2690302074, 12367812720, 58364059306, 282421855885, 1400551909446, 7109841300492, 36919536804334, 195890584265442, 1061185175436116
Offset: 5
-
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
b:= proc(n, i) option remember; series(`if`(n=0 or i=1, x^n,
add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)), x, 6)
end:
a:= n-> coeff(b(n$2), x, 5):
seq(a(n), n=5..35);
A294008
Number of multisets of exactly six nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
Original entry on oeis.org
1, 2, 7, 22, 73, 240, 818, 2816, 9967, 36080, 133875, 509676, 1990984, 7990628, 32936173, 139548808, 607402437, 2716780286, 12476624346, 58818236078, 284350933608, 1408898449946, 7146679566822, 37085526689402, 196654885016221, 1064783059174600
Offset: 6
-
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
b:= proc(n, i) option remember; series(`if`(n=0 or i=1, x^n,
add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)), x, 7)
end:
a:= n-> coeff(b(n$2), x, 6):
seq(a(n), n=6..35);
A294009
Number of multisets of exactly seven nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
Original entry on oeis.org
1, 2, 7, 22, 73, 240, 818, 2824, 9995, 36210, 134397, 511802, 1999360, 8023808, 33066865, 140066840, 609466485, 2725084766, 12510393090, 58957378290, 284932585092, 1411369884766, 7157365741706, 37132616218394, 196866561660145, 1065754768886044
Offset: 7
-
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
b:= proc(n, i) option remember; series(`if`(n=0 or i=1, x^n,
add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)), x, 8)
end:
a:= n-> coeff(b(n$2), x, 7):
seq(a(n), n=7..40);
A294010
Number of multisets of exactly eight nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
Original entry on oeis.org
1, 2, 7, 22, 73, 240, 818, 2824, 10004, 36242, 134547, 512410, 2001856, 8033716, 33106372, 140223388, 610090236, 2727581018, 12520472740, 58998480846, 285102284159, 1412080134386, 7160384929556, 37145667315382, 196924018956010, 1066012662681880
Offset: 8
-
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
b:= proc(n, i) option remember; series(`if`(n=0 or i=1, x^n,
add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)), x, 9)
end:
a:= n-> coeff(b(n$2), x, 8):
seq(a(n), n=8..40);
Showing 1-10 of 12 results.
Comments