OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..800
FORMULA
EXAMPLE
a(0) = 1: {}.
a(1) = 2: {aa}, {ab}.
a(2) = 7: {a,aaa}, {a,aab}, {a,aba}, {a,abc}, {aa,aa}, {aa,ab}, {ab,ab}.
MAPLE
g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
a:= proc(n) option remember; `if`(n=0, 1, add(add(d*
g(d+1), d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..30);
MATHEMATICA
g[n_] := g[n] = If[n < 2, 1, g[n-1] + (n-1)*g[n-2]];
a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*g[d+1], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 23 2023, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Oct 16 2017
STATUS
approved