Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #31 Jan 19 2019 04:14:58
%S 1,1,0,1,1,0,1,1,1,0,1,1,4,1,0,1,1,7,19,1,0,1,1,10,61,98,1,0,1,1,13,
%T 127,591,531,1,0,1,1,16,217,1810,6101,2974,1,0,1,1,19,331,4085,27631,
%U 65719,17060,1,0,1,1,22,469,7746,82593,441604,729933,99658,1,0
%N Number A(n,k) of 3n-length k-ary words, either empty or beginning with the first letter of the alphabet, 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, by antidiagonals.
%C In general, column k > 1 is asymptotic to a(n) ~ 3^(3*n+1/2) * (k-1)^(n+1) / (sqrt(Pi) * (2*k-3)^2 * 4^n * n^(3/2)). - _Vaclav Kotesovec_, Aug 31 2014
%H Alois P. Heinz, <a href="/A213027/b213027.txt">Antidiagonals n = 0..140, flattened</a>
%F A(n,k) = 1/n * Sum_{j=0..n-1} C(3*n,j) * (n-j) * (k-1)^j if n>0, k>1; A(0,k) = 1; A(n,k) = k if n>0, k<2.
%F A(n,k) = 1/k * A213028(n,k) if n>0, k>1; else A(n,k) = A213028(n,k).
%e A(0,k) = 1: the empty word.
%e A(n,1) = 1: (aaa)^n.
%e A(2,2) = 4: there are 4 words of length 6 over alphabet {a,b}, either empty or beginning with the first letter of the alphabet, that can be built by repeatedly inserting triples of identical letters into the initially empty word: aaaaaa, aaabbb, aabbba, abbbaa.
%e A(2,3) = 7: aaaaaa, aaabbb, aaaccc, aabbba, aaccca, abbbaa, acccaa.
%e A(3,2) = 19: aaaaaaaaa, aaaaaabbb, aaaaabbba, aaaabbbaa, aaabaaabb, aaabbaaab, aaabbbaaa, aaabbbbbb, aabaaabba, aabbaaaba, aabbbaaaa, aabbbabbb, aabbbbbba, abaaabbaa, abbaaabaa, abbbaaaaa, abbbaabbb, abbbabbba, abbbbbbaa.
%e Square array A(n,k) begins:
%e 1, 1, 1, 1, 1, 1, 1, ...
%e 0, 1, 1, 1, 1, 1, 1, ...
%e 0, 1, 4, 7, 10, 13, 16, ...
%e 0, 1, 19, 61, 127, 217, 331, ...
%e 0, 1, 98, 591, 1810, 4085, 7746, ...
%e 0, 1, 531, 6101, 27631, 82593, 195011, ...
%e 0, 1, 2974, 65719, 441604, 1751197, 5153626, ...
%p A:= (n, k)-> `if`(n=0, 1, `if`(k<2, k,
%p 1/n *add(binomial(3*n, j) *(n-j) *(k-1)^j, j=0..n-1))):
%p seq(seq(A(n, d-n), n=0..d), d=0..12);
%t a[0, _] = 1; a[_, k_ /; k < 2] := k; a[n_, k_] := 1/n*Sum[Binomial[3*n, j]*(n-j)*(k-1)^j, {j, 0, n-1}]; Table[a[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* _Jean-François Alcover_, Dec 11 2013 *)
%Y Columns k=0-10 give: A000007, A000012, A047099, A218473, A218474, A218475, A218476, A218477, A218478, A218479, A218480.
%Y Rows n=0-3 give: A000012, A057427, A016777(k-1), A127854(k-1).
%Y Main diagonal gives: A218472.
%Y Cf. A183134, A183135, A213028.
%K nonn,tabl
%O 0,13
%A _Alois P. Heinz_, Jun 03 2012