A344852 Number of rooted binary trees with n leaves with minimal Symmetry Nodes Index (SNI) or, equivalently, with the maximal number of symmetry nodes.
1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 3, 15, 1, 1, 1, 3, 1, 3, 3, 15, 1, 3, 3, 15, 3, 15, 15, 105, 1, 1, 1, 3, 1, 3, 3, 15, 1, 3, 3, 15, 3, 15, 15, 105, 1, 3, 3, 15, 3, 15, 15, 105, 3, 15, 15, 105, 15, 105, 105, 945, 1, 1, 1, 3, 1, 3, 3, 15, 1, 3, 3, 15, 3, 15, 15, 105, 1, 3, 3, 15, 3, 15, 15, 105, 3, 15, 15, 105, 15, 105, 105, 945, 1
Offset: 1
Keywords
Examples
a(7)=2, because both trees (((x,x),(x,x)),((x,x),x)) and (((x,x),(x,x),x),(x,x)) have four inner nodes which are symmetry nodes and only two inner nodes which are non-symmetry nodes. So the SNI of both trees equals 2, which is minimal for n=7. a(8)=1, because only the tree (((x,x),(x,x)),((x,x),(x,x))) is minimal: its SNI equals 0.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..16383
- S. J. Kersting and M. Fischer, Measuring tree balance using symmetry nodes - a new balance index and its extremal properties, arXiv:2105.00719 [q-bio.PE], 2021.
Programs
-
Maple
a:= n-> doublefactorial(2*add(i, i=convert(n, base, 2))-3): seq(a(n), n=1..100); # Georg Fischer, Jun 15 2021
-
Mathematica
a[n_] := (2*DigitCount[n, 2, 1] - 3)!!; Table[a[n], {n, 1, 100}]
-
PARI
a(n)={my(t=hammingweight(n)-1); (2*t)!/(2^t*t!)} \\ Andrew Howroyd, Jun 15 2021
Comments