OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..706
FORMULA
a(n) ~ 797*sqrt(3)*27^(n-1)/(16*Pi*n^4). - Vaclav Kotesovec, Aug 13 2013
For n > 1, a(n) = 3*(-4 + 108*n - 397*n^2 - 72*n^3 + 797*n^4) * (3*n-4)! / (2*(2*n-1)*(2*n+1) * (n-2)! * (n+1)! * (n+2)!). - Vaclav Kotesovec, Sep 02 2014
EXAMPLE
a(0) = 1: the empty word.
a(1) = 6: abc, acb, bac, bca, cab, cba, (all permutations of 3 letters).
a(2) = 15: aabbcc, aabcbc, aacbbc, ababcc, abacbc, abcabc, acabbc, acbabc, baabcc, baacbc, bacabc, bcaabc, caabbc, cababc, cbaabc.
MAPLE
a:= proc(n) option remember; `if`(n<2, [1, 6][n+1], (6*n-9) *(3*n-4)
*(3*n-5) *(797*n^4-72*n^3-397*n^2+108*n-4) *a(n-1) / ((n+1)
*(n+2) *(2*n+1) *(797*n^4-3260*n^3+4601*n^2-2502*n+360)))
end:
seq(a(n), n=0..20);
MATHEMATICA
Flatten[{1, 6, Table[3*(-4 + 108*n - 397*n^2 - 72*n^3 + 797*n^4) * (3*n-4)! / (2*(2*n-1)*(2*n+1) * (n-2)! * (n+1)! * (n+2)!), {n, 2, 20}]}] (* Vaclav Kotesovec, Sep 02 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 23 2012
STATUS
approved