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.
Original entry on oeis.org
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
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, ...
Columns k=0-10 give:
A063524,
A000081,
A000151,
A006964,
A052763,
A052788,
A246235,
A246236,
A246237,
A246238,
A246239.
-
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);
-
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 *)
-
\\ 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
A052773
A simple grammar.
Original entry on oeis.org
1, 1, 5, 31, 229, 1832, 15583, 137791, 1255202, 11693697, 110905169, 1067181020, 10392861567, 102239342761, 1014484221699, 10141596951782, 102044286177390, 1032652191535027, 10503201188806574, 107313868098732336, 1100922685481490057, 11335843298568212815, 117111555943587032146, 1213575764038590524010
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
-
spec := [S,{S=Set(B),B=Prod(Z,S,S,S,S)},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
# second Maple program:
b:= proc(n) option remember; add(a(i)*a(n-i), i=0..n) end:
g:= proc(n) option remember; add(b(i)*b(n-i), i=0..n) end:
a:= proc(n) option remember; `if`(n=0, 1, add(add(
d*g(d-1), d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..25); # Alois P. Heinz, Jan 24 2017
-
b[n_] := b[n] = Sum[a[i]*a[n-i], {i, 0, n}];
g[n_] := g[n] = Sum[b[i]*b[n-i], {i, 0, n}];
a[n_] := a[n] = If[n==0, 1, Sum[DivisorSum[j, #*g[#-1]&]*a[n-j], {j, 1, n} ]/n];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 28 2017, after Alois P. Heinz *)
-
{a(n)=local(A=1+x+x*O(x^n));if(n==0,1,for(i=1,n, A=exp(sum(k=1,n,subst(x*A^4,x,x^k+x*O(x^n))/k)));polcoeff(A,n,x))} \\ Paul D. Hanna, Jul 13 2006
A136793
Number of unlabeled rooted trees with n 4-colored nodes.
Original entry on oeis.org
4, 16, 104, 752, 5996, 50512, 444256, 4027360, 37383044, 353486320, 3393093696, 32976302800, 323839605124, 3208549483216, 32033691247528, 321955764477936, 3254812520854980, 33075467402453872, 337670437247448728, 3461635652745799136, 35620112071990294784
Offset: 1
- F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 293 (4.1.60).
-
with(numtheory):
a:= proc(n) option remember; `if`(n<2, n*4, (add(add(d*
a(d), d=divisors(j))*a(n-j), j=1..n-1))/(n-1))
end:
seq(a(n), n=1..25); # Alois P. Heinz, May 16 2014
-
a[1] = 4; a[n_] := a[n] = Sum[ Sum[ d*a[d], {d, Divisors[j]}]*a[n-j], {j, 1, n-1}]/(n-1); Table[a[n], {n, 1, 25}] (* Jean-François Alcover, Feb 24 2015, after Alois P. Heinz *)
A136794
Number of unlabeled marked rooted trees with n nodes.
Original entry on oeis.org
2, 8, 52, 376, 2998, 25256, 222128, 2013680, 18691522, 176743160, 1696546848, 16488151400, 161919802562, 1604274741608, 16016845623764, 160977882238968, 1627406260427490, 16537733701226936
Offset: 1
- F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 293 (4.1.60).
A345242
G.f. A(x) satisfies: A(x) = x + x^2 * exp(4 * Sum_{k>=1} A(x^k) / k).
Original entry on oeis.org
1, 1, 4, 14, 52, 205, 832, 3492, 14960, 65322, 289384, 1298064, 5882712, 26897352, 123919576, 574718308, 2681028168, 12571650355, 59222213028, 280139215118, 1330101884932, 6336757979653, 30282375754944, 145124083402256, 697293746743760, 3358385599930269, 16210842955175380
Offset: 1
-
nmax = 27; A[] = 0; Do[A[x] = x + x^2 Exp[4 Sum[A[x^k]/k, {k, 1, nmax}]] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x] // Rest
a[1] = a[2] = 1; a[n_] := a[n] = (4/(n - 2)) Sum[Sum[d a[d], {d, Divisors[k]}] a[n - k], {k, 1, n - 2}]; Table[a[n], {n, 1, 27}]
Showing 1-5 of 5 results.
Comments