A242249 Number A(n,k) of rooted trees with n nodes and k-colored non-root nodes; square array A(n,k), n>=0, k>=0, read by antidiagonals.
0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 2, 0, 0, 1, 3, 7, 4, 0, 0, 1, 4, 15, 26, 9, 0, 0, 1, 5, 26, 82, 107, 20, 0, 0, 1, 6, 40, 188, 495, 458, 48, 0, 0, 1, 7, 57, 360, 1499, 3144, 2058, 115, 0, 0, 1, 8, 77, 614, 3570, 12628, 20875, 9498, 286, 0, 0, 1, 9, 100, 966, 7284, 37476, 111064, 142773, 44947, 719, 0
Offset: 0
Examples
Square array A(n,k) begins: 0, 0, 0, 0, 0, 0, 0, 0, ... 1, 1, 1, 1, 1, 1, 1, 1, ... 0, 1, 2, 3, 4, 5, 6, 7, ... 0, 2, 7, 15, 26, 40, 57, 77, ... 0, 4, 26, 82, 188, 360, 614, 966, ... 0, 9, 107, 495, 1499, 3570, 7284, 13342, ... 0, 20, 458, 3144, 12628, 37476, 91566, 195384, ... 0, 48, 2058, 20875, 111064, 410490, 1200705, 2984142, ...
Links
- Alois P. Heinz, Antidiagonals n = 0..140, flattened
- L. Foissy, Algebraic structures on typed decorated rooted trees, arXiv:1811.07572 (2018), doi SIGMA 17 (2021)
Crossrefs
Programs
-
Maple
with(numtheory): A:= proc(n, k) option remember; `if`(n<2, n, (add(add(d* A(d, k), d=divisors(j))*A(n-j, k)*k, j=1..n-1))/(n-1)) end: seq(seq(A(n, d-n), n=0..d), d=0..12);
-
Mathematica
nn = 10; t[x_] := Sum[a[n] x^n, {n, 1, nn}]; Transpose[ Table[Flatten[ sol = SolveAlways[ 0 == Series[ t[x] - x Product[1/(1 - x^i)^(n a[i]), {i, 1, nn}], {x, 0, nn}], x]; Flatten[{0, Table[a[n], {n, 1, nn}]}] /. sol], {n, 0, nn}]] // Grid (* Geoffrey Critzer, Nov 11 2014 *) A[n_, k_] := A[n, k] = If[n<2, n, Sum[Sum[d*A[d, k], {d, Divisors[j]}] *A[n-j, k]*k, {j, 1, n-1}]/(n-1)]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Dec 04 2014, translated from Maple *)
-
PARI
\\ ColGf gives column generating function ColGf(N,k) = {my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = k/n * sum(i=1, n, sumdiv(i, d, d*A[d]) * A[n-i+1] ) ); x*Ser(A)} Mat(vector(8, k, concat(0, Col(ColGf(7, k-1))))) \\ Andrew Howroyd, May 12 2018
Formula
G.f. for column k: x*Product_{n>=1} 1/(1 - x^n)^(k*A(n,k)). - Geoffrey Critzer, Nov 13 2014
Comments