A248748 Number of rooted binary trees with n leaves and each internal vertex colored in one of two colors.
1, 2, 4, 16, 48, 192, 704, 3072, 12032, 52736, 219136, 985088, 4218880, 19144704, 84066304, 387088384, 1725497344, 7989886976, 36128948224, 168658206720, 770103574528, 3611291549696, 16636941697024, 78453223194624, 363787840389120, 1721209150504960
Offset: 1
Keywords
Examples
a(5)=48 because there are three binary trees with 5 leaves, namely, (1,((1,1),(1,1))); (1,(1,(1,(1,1)))); ((1,1),(1,(1,1))); and each of their four (5-1) internal vertices can be colored in 2 ways, giving rise to 3*2^4 = 48 possibilities. The "coloring" can be indicated by means of two different kinds of parentheses, for example (1,[(1,1),[1,1]]). It also implies that 5 identical impedances can be wired together in 48 ways, iterating only simple series/parallel bondings. Also, given two different means f(x,y) and g(x,y) of two numbers (e.g., an arithmetic and a geometric one), these can be combined to form 48 distinct means of 5 arguments x1,x2,x3,x4,x5. One such mean, for example, is f(x1,g(f(x2,x3),g(x4,x5))), corresponding to (1,[(1,1),[1,1]]).
Links
- Stanislav Sykora, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A000992.
Programs
-
PARI
v=vector(1000); v[1]=1; \\ Use any desired size for(n=2,#v, v[n]=sum(k=1,n\2,v[k]*v[n-k])); \\ v = A000992 for(n=1,#v, v[n]*=2^(n-1)); v \\ Final multiplication and result display
Formula
a(n) = A000992(n)*2^(n-1).
Comments