The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A256116 Number T(n,k) of length 2n k-ary words, either empty or beginning with the first letter of the alphabet and using each letter at least once, that can be built by repeatedly inserting doublets into the initially empty word; triangle T(n,k), n>=0, 0<=k<=n, read by rows. 5

%I

%S 1,0,1,0,1,2,0,1,9,10,0,1,34,112,84,0,1,125,930,1800,1008,0,1,461,

%T 7018,26400,35640,15840,0,1,1715,51142,334152,816816,840840,308880,0,

%U 1,6434,368464,3944220,15550080,27824160,23063040,7207200

%N Number T(n,k) of length 2n k-ary words, either empty or beginning with the first letter of the alphabet and using each letter at least once, that can be built by repeatedly inserting doublets into the initially empty word; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%H Alois P. Heinz, <a href="/A256116/b256116.txt">Rows n = 0..140, flattened</a>

%F T(n,k) = (Sum_{i=0..k} (-1)^i * C(k,i) * A183135(n,k-i)) / A028310(k).

%F T(n,k) = (k-1)! * A256117(n,k) for k > 0.

%e T(3,2) = 9: aaaabb, aaabba, aabaab, aabbaa, aabbbb, abaaba, abbaaa, abbabb, abbbba.

%e T(3,3) = 10: aabbcc, aabccb, aacbbc, aaccbb, abbacc, abbcca, abccba, acbbca, accabb, accbba.

%e T(4,2) = 34: 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.

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 1, 2;

%e 0, 1, 9, 10;

%e 0, 1, 34, 112, 84;

%e 0, 1, 125, 930, 1800, 1008;

%e 0, 1, 461, 7018, 26400, 35640, 15840;

%e 0, 1, 1715, 51142, 334152, 816816, 840840, 308880;

%p A:= proc(n, k) option remember; `if`(n=0, 1, k/n*

%p add(binomial(2*n, j) *(n-j) *(k-1)^j, j=0..n-1))

%p end:

%p T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k)/

%p `if`(k=0, 1, k):

%p seq(seq(T(n, k), k=0..n), n=0..12);

%t Unprotect[Power]; 0^0 = 1; A[n_, k_] := A[n, k] = If[n==0, 1, k/n*Sum[ Binomial[2*n, j]*(n-j)*(k-1)^j, {j, 0, n-1}]];

%t T[n_, k_] := Sum[A[n, k-i]*(-1)^i*Binomial[k, i], {i, 0, k}]/If[k==0, 1, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Feb 22 2017, translated from Maple *)

%Y Columns k=0-2 give: A000007, A057427, A010763(n-1) for n>0.

%Y Main diagonal gives A065866(n-1) (for n>0).

%Y Row sums give A294603.

%Y Cf. A183135, A256117.

%K nonn,tabl

%O 0,6

%A _Alois P. Heinz_, Mar 15 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 20 17:56 EDT 2021. Contains 343135 sequences. (Running on oeis4.)