|
|
A241555
|
|
Triangle read by rows: Number T(n,k) of 2-colored binary rooted trees with n nodes and exactly k <= n nodes of a specific color.
|
|
4
|
|
|
1, 1, 1, 1, 2, 1, 2, 5, 5, 2, 3, 11, 16, 11, 3, 6, 26, 50, 50, 26, 6, 11, 60, 143, 188, 143, 60, 11, 23, 142, 404, 656, 656, 404, 142, 23, 46, 334, 1105, 2143, 2652, 2143, 1105, 334, 46, 98, 794, 2995, 6737, 9934, 9934, 6737, 2995, 794, 98, 207, 1888, 7999, 20504, 35080, 41788, 35080, 20504, 7999, 1888, 207
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
T(n,k) = T(n,n-k) by definition.
|
|
LINKS
|
|
|
EXAMPLE
|
Triangle begins:
1;
1, 1;
1, 2, 1;
2, 5, 5, 2;
3, 11, 16, 11, 3;
6, 26, 50, 50, 26, 6;
11, 60, 143, 188, 143, 60, 11;
23, 142, 404, 656, 656, 404, 142, 23;
...
|
|
MATHEMATICA
|
B[m_] := Module[{u}, u = Table[0, {m}]; u[[1]] = 1; For[n = 1, n <= Length[u] - 1, n++, u[[n + 1]] = (1 + y)*(Sum[u[[i]]*u[[n + 1 - i]], {i, 1, n}] + If[OddQ[n], u[[Quotient[n, 2] + 1]] /. y -> y^2, 0])/2]; u];
|
|
PROG
|
(PARI)
B(n)={my(u=vector(n)); u[1]=1; for(n=1, #u-1, u[n+1]=(1+y)*(sum(i=1, n, u[i]*u[n+1-i]) + if(n%2, subst(u[n\2+1], y, y^2)))/2); u}
{ my(A=B(10)); for(n=1, #A, print(Vec(A[n]))) } \\ Andrew Howroyd, May 21 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Missing term inserted and a(45) and beyond from Andrew Howroyd, May 21 2018
|
|
STATUS
|
approved
|
|
|
|