OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..247
FORMULA
a(n) = n! * [x^n] 1 + g^(k+1)(x), where g(x) = exp(x)-1.
From Vaclav Kotesovec, Aug 14 2015: (Start)
Conjecture: a(n) ~ c * n^(2*n-5/6) / (2^(n-1) * exp(n)), where c = 7.7889...
a(n) ~ exp(1) * A139383(n).
(End)
EXAMPLE
a(2) = 3: 12->12->12, 12->12->1|2, 12->1|2->1|2.
a(3) = 22: 123->123->123->123, 123->123->123->12|3, 123->123->123->1|23, 123->123->123->13|2, 123->123->123->1|2|3, 123->123->12|3->12|3, 123->123->12|3->1|2|3, 123->123->1|23->1|23, 123->123->1|23->1|2|3, 123->123->13|2->13|2, 123->123->13|2->1|2|3, 123->123->1|2|3->1|2|3, 123->12|3->12|3->12|3, 123->12|3->12|3->1|2|3, 123->12|3->1|2|3->1|2|3, 123->1|23->1|23->1|23, 123->1|23->1|23->1|2|3, 123->1|23->1|2|3->1|2|3, 123->13|2->13|2->13|2, 123->13|2->13|2->1|2|3, 123->13|2->1|2|3->1|2|3, 123->1|2|3->1|2|3->1|2|3.
MAPLE
g:= x-> exp(x)-1:
egf:= k-> 1+(g@@(k+1))(x):
a:= n-> n! * coeff(series(egf(n), x, n+1), x, n):
seq(a(n), n=0..20);
# second Maple program:
A:= proc(n, k) option remember; `if`(n=0 or k=0, 1,
add(binomial(n-1, j-1)*A(j, k-1)*A(n-j, k), j=1..n))
end:
a:= n-> A(n$2):
seq(a(n), n=0..20);
# third Maple program:
b:= proc(n, t, m) option remember; `if`(t=0, 1, `if`(n=0,
b(m, t-1, 0), m*b(n-1, t, m)+b(n-1, t, m+1)))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..20); # Alois P. Heinz, Aug 04 2021
MATHEMATICA
Clear[t]; t[n_, k_]:=t[n, k] = If[n==0 || k==0, 1, Sum[Binomial[n-1, j-1]*t[j, k-1]*t[n-j, k], {j, 1, n}]]; Table[t[n, n], {n, 0, 20}] (* Vaclav Kotesovec, Aug 14 2015 after Alois P. Heinz *)
PROG
(Python)
from sympy.core.cache import cacheit
from sympy import binomial
@cacheit
def A(n, k): return 1 if n==0 or k==0 else sum(binomial(n - 1, j - 1)*A(j, k - 1)*A(n - j, k) for j in range(1, n + 1))
def a(n): return A(n, n)
print([a(n) for n in range(21)]) # Indranil Ghosh, Aug 07 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 14 2015
STATUS
approved