OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
EXAMPLE
a(0) = 1: {}.
a(1) = 1: {a}.
a(2) = 4: {aa}, {ab}, {ba}, {a,b}.
a(3) = 27: {aaa}, {aab}, {aba}, {abb}, {abc}, {acb}, {baa}, {bab}, {bac}, {bba}, {bca}, {cab}, {cba}, {a,aa}, {a,ab}, {a,ba}, {a,bb}, {a,bc}, {a,cb}, {aa,b}, {ab,b}, {ab,c}, {ac,b}, {b,ba}, {b,ca}, {ba,c}, {a,b,c}.
MAPLE
h:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(h(n-i*j, i-1, k)*binomial(k^i, j), j=0..n/i)))
end:
a:= n-> add(add((-1)^i*binomial(k, i)*h(n$2, k-i), i=0..k), k=0..n):
seq(a(n), n=0..20);
MATHEMATICA
h[n_, i_, k_] := h[n, i, k] = If[n == 0, 1, If[i < 1, 0,
Sum[h[n - i*j, i - 1, k]*Binomial[k^i, j], {j, 0, n/i}]]];
a[n_] := Sum[Sum[(-1)^i*Binomial[k, i]*h[n, n, k-i], {i, 0, k}], {k, 0, n}];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Mar 10 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 21 2018
STATUS
approved