A304175 Number of leaf-balanced rooted plane trees with n nodes.
1, 1, 2, 5, 12, 27, 59, 128, 277, 597, 1280, 2730, 5794, 12248, 25836, 54508, 115222, 244144, 518104, 1099499, 2330326, 4930089, 10415135, 21992400, 46470911, 98353146, 208580686, 443186181, 942988423, 2007981801, 4276830431, 9109431322, 19404918449, 41357252072, 88236092543
Offset: 1
Keywords
Examples
The a(5) = 12 leaf-balanced plane trees: ((((o)))), (((oo))), (((o)o)), ((o(o))), ((ooo)), (((o))o), (o((o))), ((o)(o)), ((o)oo), (o(o)o), (oo(o)), (oooo). Missing from this list are ((oo)o) and (o(oo)).
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..500
Crossrefs
Programs
-
Mathematica
lbplane[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[lbplane/@c],SameQ@@(Count[#,{},{0,Infinity}]&/@#)&],{c,Join@@Permutations/@IntegerPartitions[n-1]}]]; Table[Length[lbplane[n]],{n,10}]
-
PARI
seq(n)={my(v=vector(n)); v[1]=x/(1-x) + O(x*x^n); for(k=2, n, v[k]=x*sumdiv(k, d, if(d
Andrew Howroyd, Dec 13 2020
Extensions
Terms a(17) and beyond from Andrew Howroyd, Dec 13 2020
Comments