%I #18 May 09 2021 12:46:51
%S 1,2,4,8,20,48,136,360,1040,2944,8704,25280,76320,226720,692992,
%T 2096640,6470016,19799936,61713152,190683520,598033152,1863995392,
%U 5879859200,18438913536,58464724992,184356152832,586898946048,1859875518464,5941384080384,18901502482432
%N Number of enriched r-trees of size n with no empty subtrees.
%C An enriched r-tree of size n > 0 with no empty subtrees is either a single node of size n, or a finite nonempty sequence of enriched r-trees with no empty subtrees and with weakly decreasing sizes summing to n - 1.
%H Alois P. Heinz, <a href="/A301467/b301467.txt">Table of n, a(n) for n = 1..1910</a>
%F O.g.f.: x^2/(1 - x) + x Product_{i > 0} 1/(1 - a(i) x^i).
%e The a(4) = 8 enriched r-trees with no empty subtrees: 4, (3), (21), ((2)), (111), ((11)), ((1)1), (((1))).
%e The a(5) = 20 enriched r-trees with no empty subtrees:
%e 5,
%e (4), ((3)), ((21)), (((2))), ((111)), (((11))), (((1)1)), ((((1)))),
%e (31), (22), (2(1)), ((2)1), ((1)2), ((11)1), ((1)(1)), (((1))1),
%e (211), ((1)11),
%e (1111).
%p b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
%p add(b(n-i*j, i-1)* a(i)^j, j=0..n/i)))
%p end:
%p a:= n-> `if`(n<2, n, 1+b(n-1$2)):
%p seq(a(n), n=1..30); # _Alois P. Heinz_, Jun 21 2018
%t pert[n_]:=pert[n]=If[n===1,1,1+Sum[Times@@pert/@y,{y,IntegerPartitions[n-1]}]];
%t Array[pert,30]
%t (* Second program: *)
%t b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0,
%t Sum[b[n - i*j, i - 1] a[i]^j, {j, 0, n/i}]]];
%t a[n_] := a[n] = If[n < 2, n, 1 + b[n-1, n-1]];
%t Array[a, 30] (* _Jean-François Alcover_, May 09 2021, after _Alois P. Heinz_ *)
%o (PARI) seq(n)={my(v=vector(n)); v[1]=1; for(n=2, n, v[n] = 1 + polcoef(1/prod(k=1, n-1, 1 - v[k]*x^k + O(x^n)), n-1)); v} \\ _Andrew Howroyd_, Aug 26 2018
%Y Cf. A000081, A004111, A032305, A055277, A093637, A127524, A196545, A289501, A300660, A301342-A301345, A301364-A301368, A301422, A301462, A301469, A301470.
%K nonn
%O 1,2
%A _Gus Wiseman_, Mar 21 2018
|