A213920 Number of rooted trees with n nodes such that no more than two subtrees corresponding to children of any node have the same number of nodes.
0, 1, 1, 2, 3, 7, 15, 34, 79, 190, 457, 1132, 2823, 7126, 18136, 46541, 120103, 312109, 815012, 2137755, 5632399, 14895684, 39519502, 105198371, 280815067, 751490363, 2016142768, 5420945437, 14604580683, 39425557103, 106618273626, 288792927325, 783516425820
Offset: 0
Keywords
Examples
: o : o : o o : o o o : : : | : / \ | : | / \ | : : : o : o o o : o o o o : : : : | : / \ | | : : : : o : o o o o : : : : : | : : n=1 : n=2 : n=3 : n=4 o : :.....:.....:...........:.................: : o o o o o o o : : | | / \ / \ / \ /|\ | : : o o o o o o o o o o o o : : | / \ / \ | | | | | : : o o o o o o o o o o : : / \ | | | : : o o o o o : : | : : n=5 o : :.........................................:
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..2213
Programs
-
Maple
g:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, add( binomial(g((i-1)$2)+j-1, j)*g(n-i*j, i-1), j=0..min(2, n/i)))) end: a:= n-> g((n-1)$2): seq(a(n), n=0..40);
-
Mathematica
g[n_, i_] := g[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[g[i-1, i-1]+j-1, j]*g[n-i*j, i-1], {j, 0, Min[2, n/i]}]]]; a[n_] := g[n-1, n-1]; Table[ a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 21 2017, translated from Maple *)
Comments