OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..200
FORMULA
a(n) ~ (1 - exp(-1)) * n^(n-1). - Vaclav Kotesovec, Oct 08 2019
MAPLE
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(g(i, k), j)*b(n-i*j, i-1, k), j=0..n/i)))
end:
g:= proc(n, k) option remember; k^(n-1)-b(n, n-1, k) end:
a:= n-> g(n$2):
seq(a(n), n=1..21);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0,
Sum[Binomial[g[i, k], j] b[n - i j, i - 1, k], {j, 0, n/i}]]];
g[n_, k_] := g[n, k] = k^(n - 1) - b[n, n - 1, k];
a[n_] := g[n, n];
Array[a, 21] (* Jean-François Alcover, Dec 29 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 23 2018
STATUS
approved