OFFSET
1,4
COMMENTS
a(n) is also the number of orderless same-trees of weight n with all leaves greater than 1.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
a(1) = 1, a(n>1) = Sum_{d|n, d>1} binomial(a(n/d)+d-1, d).
EXAMPLE
The a(12)=13 orderless same-trees with all leaves greater than 1 are: ((33)(33)), ((33)(222)), ((33)6), ((222)(222)), ((222)6), (66), ((22)(22)(22)), ((22)(22)4), ((22)44), (444), (3333), (222222), 12.
MAPLE
with(numtheory):
a:= proc(n) option remember; `if`(n=1, 1, add(
binomial(a(n/d)+d-1, d), d=divisors(n) minus {1}))
end:
seq(a(n), n=1..80); # Alois P. Heinz, Jul 05 2017
MATHEMATICA
a[n_]:=If[n===1, 1, Sum[Binomial[a[n/d]+d-1, d], {d, Rest[Divisors[n]]}]];
Array[a, 100]
PROG
(PARI) seq(n)={my(v=vector(n)); v[1]=1; for(n=2, n, v[n] = sumdiv(n, d, binomial(v[n/d]+d-1, d))); v} \\ Andrew Howroyd, Aug 20 2018
(Python)
from sympy import divisors, binomial
l=[0, 1]
for n in range(2, 101): l+=[sum([binomial(l[n//d] + d - 1, d) for d in divisors(n)[1:]]), ]
l[1:] # Indranil Ghosh, Jul 06 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 23 2017
STATUS
approved