OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..447
FORMULA
a(n) = Sum_{k=0..n} A256117(n,k).
a(n) ~ Bell(n-1)*Catalan(n) ~ n^n * exp(n/LambertW(n)-1-n) * 4^n / (sqrt(Pi) * sqrt(1+LambertW(n)) * LambertW(n)^(n-1) * n^(5/2)). - Vaclav Kotesovec, Jun 02 2015
EXAMPLE
a(3) = 15: aaaaaa, aaaabb, aaabba, aabaab, aabbaa, aabbbb, abaaba, abbaaa, abbabb, abbbba, aabbcc, aabccb, abbacc, abbcca, abccba.
MAPLE
A:= proc(n, k) option remember; `if`(n=0, 1, k/n*
add(binomial(2*n, j)*(n-j)*(k-1)^j, j=0..n-1))
end:
T:= (n, k)-> add((-1)^i*A(n, k-i)/(i!*(k-i)!), i=0..k):
a:= n-> add(T(n, k), k=0..n):
seq(a(n), n=0..25);
MATHEMATICA
A[n_, k_] := A[n, k] = If[n == 0, 1, k/n*Sum[Binomial[2*n, j]*(n - j)*If[j == 0, 1, (k - 1)^j], {j, 0, n - 1}]];
T[n_, k_] := Sum[(-1)^i*A[n, k - i]/(i!*(k - i)!), {i, 0, k}];
a[n_] := Sum[T[n, k], {k, 0, n}];
a /@ Range[0, 25] (* Jean-François Alcover, Jan 01 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 31 2015
STATUS
approved