login
Number of words of length 3n such that all letters of the ternary alphabet occur at least once and are introduced in ascending order and which can be built by repeatedly inserting triples into the initially empty word.
2

%I #6 Oct 26 2018 15:53:01

%S 12,198,2520,29886,347907,4048966,47431488,560528820,6684500548,

%T 80402461416,974694481735,11899112853684,146175947513247,

%U 1805742311925206,22417900292210960,279556262002954608,3500139320096264886,43982137867266022438,554494988892196104240

%N Number of words of length 3n such that all letters of the ternary alphabet occur at least once and are introduced in ascending order and which can be built by repeatedly inserting triples into the initially empty word.

%H Alois P. Heinz, <a href="/A321033/b321033.txt">Table of n, a(n) for n = 3..889</a>

%p b:= (n, k)-> `if`(n=0, 1, k/n*add(binomial(3*n, j)*(n-j)*(k-1)^j, j=0..n-1)):

%p a:= n-> (k-> add((-1)^i*b(n, k-i)/(i!*(k-i)!), i=0..k))(3):

%p seq(a(n), n=3..25);

%Y Column k=3 of A256311.

%K nonn

%O 3,1

%A _Alois P. Heinz_, Oct 26 2018