A194730
Number of 10-ary words either empty or beginning with the first character of the alphabet, that can be built by inserting n doublets into the initially empty word.
Original entry on oeis.org
1, 1, 19, 442, 11395, 312814, 8960878, 264735892, 8006545891, 246643289830, 7711583225338, 244082045341036, 7805301802531534, 251791585570781452, 8183989442287618300, 267755464909548758440, 8810802978165549384355, 291414010749705281701270
Offset: 0
a(2) = 19: aaaa, aabb, aacc, aadd, aaee, aaff, aagg, aahh, aaii, aajj, abba, acca, adda, aeea, affa, agga, ahha, aiia, ajja (with 10-ary alphabet {a,b,c,d,e,f,g,h,i,j}).
-
a:= n-> `if`(n=0, 1, add(binomial (2*n, j) *(n-j) *9^j, j=0..n-1) /n):
seq(a(n), n=0..20);
A213028
Number A(n,k) of 3n-length k-ary words that can be built by repeatedly inserting triples of identical letters into the initially empty word; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 8, 1, 0, 1, 4, 21, 38, 1, 0, 1, 5, 40, 183, 196, 1, 0, 1, 6, 65, 508, 1773, 1062, 1, 0, 1, 7, 96, 1085, 7240, 18303, 5948, 1, 0, 1, 8, 133, 1986, 20425, 110524, 197157, 34120, 1, 0, 1, 9, 176, 3283, 46476, 412965, 1766416, 2189799, 199316, 1, 0
Offset: 0
A(0,k) = 1: the empty word.
A(n,1) = 1: (aaa)^n.
A(2,2) = 8: there are 8 words of length 6 over alphabet {a,b} that can be built by repeatedly inserting triples of identical letters into the initially empty word: aaaaaa, aaabbb, aabbba, abbbaa, baaabb, bbaaab, bbbaaa, bbbbbb.
A(1,3) = 3: aaa, bbb, ccc.
A(2,3) = 21: aaaaaa, aaabbb, aaaccc, aabbba, aaccca, abbbaa, acccaa, baaabb, bbaaab, bbbaaa, bbbbbb, bbbccc, bbcccb, bcccbb, caaacc, cbbbcc, ccaaac, ccbbbc, cccaaa, cccbbb, cccccc.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 3, 4, 5, 6, ...
0, 1, 8, 21, 40, 65, 96, ...
0, 1, 38, 183, 508, 1085, 1986, ...
0, 1, 196, 1773, 7240, 20425, 46476, ...
0, 1, 1062, 18303, 110524, 412965, 1170066, ...
0, 1, 5948, 197157, 1766416, 8755985, 30921756, ...
-
A:= (n, k)-> `if`(n=0, 1,
k/n *add(binomial(3*n, j) *(n-j) *(k-1)^j, j=0..n-1)):
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
Unprotect[Power]; 0^0 = 1; A[n_, k_] := If[n==0, 1, k/n*Sum[Binomial[3*n, j]*(n-j)*(k-1)^j, {j, 0, n-1}]]; Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 22 2017, translated from Maple *)
A248828
Number of 2n-length words, either empty or beginning with the first character of an n-ary alphabet, that can be built by repeatedly inserting doublets into the initially empty word.
Original entry on oeis.org
1, 1, 3, 29, 523, 14289, 530526, 25066621, 1443039123, 98156060225, 7711583225338, 687676559089101, 68652814486950398, 7588068106131457489, 920064964125791788188, 121445943726500589053565, 17337678537189658091486851, 2661994674815094376005234945
Offset: 0
a(2) = 3: aaaa, aabb, abba (with alphabet {a,b}).
-
a:= n->`if`(n=0, 1, add(binomial(2*n, j)*(n-j)*(n-1)^j, j=0..n-1)/n):
seq(a(n), n = 0..20);
-
Flatten[{1,1,Table[Sum[Binomial[2*n, j]*(n-j)*(n-1)^j, {j,0,n-1}]/n,{n,2,20}]}] (* Vaclav Kotesovec, Oct 15 2014 *)
A194727
Number of 7-ary words either empty or beginning with the first character of the alphabet, that can be built by inserting n doublets into the initially empty word.
Original entry on oeis.org
1, 1, 13, 205, 3565, 65821, 1265677, 25066621, 507709165, 10466643805, 218878998733, 4631531585341, 98980721277613, 2133274258946845, 46313701181477005, 1011889827742935805, 22232378278653590125, 490899296804667191005, 10887346288742800406605
Offset: 0
a(2) = 13: aaaa, aabb, aacc, aadd, aaee, aaff, aagg, abba, acca, adda, aeea, affa, agga (with 7-ary alphabet {a,b,c,d,e,f,g}).
-
a:= n-> `if`(n=0, 1, add(binomial(2*n, j) *(n-j) *6^j, j=0..n-1)/n):
seq(a(n), n=0..20);
# second Maple program:
a:= proc(n) option remember; `if`(n<3, [1, 1, 13][n+1],
((73*n-36)*a(n-1) -(1176*n-1764)*a(n-2))/n)
end:
seq(a(n), n=0..30);
A194716
Number of n-ary words beginning with the first character of the alphabet, that can be built by inserting four doublets into the initially empty word.
Original entry on oeis.org
0, 1, 35, 181, 523, 1145, 2131, 3565, 5531, 8113, 11395, 15461, 20395, 26281, 33203, 41245, 50491, 61025, 72931, 86293, 101195, 117721, 135955, 155981, 177883, 201745, 227651, 255685, 285931, 318473, 353395, 390781, 430715, 473281, 518563, 566645, 617611
Offset: 0
a(2) = 35: aaaaaaaa, aaaaaabb, aaaaabba, aaaabaab, aaaabbaa, aaaabbbb, aaabaaba, aaabbaaa, aaabbabb, aaabbbba, aabaaaab, aabaabaa, aabaabbb, aababbab, aabbaaaa, aabbaabb, aabbabba, aabbbaab, aabbbbaa, aabbbbbb, abaaaaba, abaabaaa, abaababb, abaabbba, ababbaba, abbaaaaa, abbaaabb, abbaabba, abbabaab, abbabbaa, abbabbbb, abbbaaba, abbbbaaa, abbbbabb, abbbbbba (with 2-ary alphabet {a,b}).
A194717
Number of n-ary words beginning with the first character of the alphabet, that can be built by inserting five doublets into the initially empty word.
Original entry on oeis.org
0, 1, 126, 1181, 4966, 14289, 32966, 65821, 118686, 198401, 312814, 470781, 682166, 957841, 1309686, 1750589, 2294446, 2956161, 3751646, 4697821, 5812614, 7114961, 8624806, 10363101, 12351806, 14613889, 17173326, 20055101, 23285206, 26890641, 30899414, 35340541
Offset: 0
a(1) = 1: aaaaaaaaaa (with 1-ary alphabet {a}).
A194718
Number of n-ary words beginning with the first character of the alphabet, that can be built by inserting six doublets into the initially empty word.
Original entry on oeis.org
0, 1, 462, 7941, 48838, 185193, 530526, 1265677, 2654646, 5060433, 8960878, 14964501, 23826342, 36463801, 53972478, 77642013, 108971926, 149687457, 201755406, 267399973, 349118598, 449697801, 572229022, 720124461, 897132918, 1107355633, 1355262126, 1645706037
Offset: 0
a(1) = 1: aaaaaaaaaaaa (with 1-ary alphabet {a}).
-
a:= n-> `if`(n=0, 0, (x-> 1+(10+(44+(110+(165+132*x)*x)*x)*x)*x)(n-1)):
seq(a(n), n=0..30);
-
LinearRecurrence[{6,-15,20,-15,6,-1},{0,1,462,7941,48838,185193,530526},30] (* Harvey P. Dale, Oct 23 2015 *)
A194719
Number of n-ary words beginning with the first character of the alphabet, that can be built by inserting seven doublets into the initially empty word.
Original entry on oeis.org
0, 1, 1716, 54573, 492724, 2467137, 8786436, 25066621, 61189668, 133071009, 264735892, 490704621, 858686676, 1432583713, 2295801444, 3554870397, 5343375556, 7826194881, 11204046708, 15718346029, 21656369652, 29356730241, 39215159236, 51690598653, 67311601764
Offset: 0
a(1) = 1: a^14 (with 1-ary alphabet {a}).
-
a:= n-> `if`(n=0, 0, (x-> 1+(12+(65+(208+(429+(572+429*x)*x)*x)
*x)*x)*x)(n-1)):
seq(a(n), n=0..30);
A194720
Number of n-ary words beginning with the first character of the alphabet, that can be built by inserting eight doublets into the initially empty word.
Original entry on oeis.org
0, 1, 6435, 381333, 5068915, 33563481, 148733571, 507709165, 1443039123, 3581326065, 8006545891, 16475259141, 31690921395, 57644499913, 100028603715, 166732334301, 268424064211, 419229350625, 637511191203, 946759829365, 1376599316211, 1963918036281
Offset: 0
a(1) = 1: a^16 (with 1-ary alphabet {a}).
-
a:= n-> `if`(n=0, 0, (x-> 1+(14+(90+(350+(910+(1638+(2002+1430*x)*
x)*x)*x)*x)*x)*x)(n-1)):
seq(a(n), n=0..30);
A194721
Number of n-ary words beginning with the first character of the alphabet, that can be built by inserting nine doublets into the initially empty word.
Original entry on oeis.org
0, 1, 24310, 2699837, 52955950, 464221105, 2561439806, 10466643805, 34648845862, 98156060225, 246643289830, 563506356061, 1191627482750, 2363434581937, 4441172224750, 7969478316605, 13742556531766, 22888430598145, 36972962559062, 58126513174525, 89196318660430
Offset: 0
a(1) = 1: a^18 (with 1-ary alphabet {a}).
-
a:= n-> `if`(n=0, 0, (x-> 1+(16+(119+(544+(1700+(3808+(6188+(7072+4862
*x)*x)*x)*x)*x)*x)*x)*x)(n-1)):
seq(a(n), n=0..30);