OFFSET
0,2
COMMENTS
An enriched p-tree of weight n > 0 is either a single node of weight n, or a finite sequence of at least two enriched p-trees whose weights are weakly decreasing and sum to n.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..500
FORMULA
a(n) = (1 - (-1)^n)/2 + Sum_y Product_{i in y} a(i) where the sum is over all non-singleton integer partitions of n with an odd number of parts.
EXAMPLE
The a(3) = 12 trees:
7,
(511), (331),
((111)31), (3(111)1), ((311)11), (31111),
((111)(111)1), (((111)11)11), ((11111)11), ((111)1111), (1111111).
MATHEMATICA
r[n_]:=r[n]=If[OddQ[n], 1, 0]+Sum[Times@@r/@y, {y, Select[IntegerPartitions[n], Length[#]>1&&OddQ[Length[#]]&]}];
Table[r[n], {n, 1, 40, 2}]
PROG
(PARI) seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 + polcoef(1/prod(k=1, n-1, 1 - v[k]*x^(2*k-1) + O(x^(2*n))) - 1/prod(k=1, n-1, 1 + v[k]*x^(2*k-1) + O(x^(2*n))), 2*n-1)/2); v} \\ Andrew Howroyd, Aug 26 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 10 2018
STATUS
approved