A005195
Number of forests with n unlabeled nodes.
Original entry on oeis.org
1, 1, 2, 3, 6, 10, 20, 37, 76, 153, 329, 710, 1601, 3658, 8599, 20514, 49905, 122963, 307199, 775529, 1977878, 5086638, 13184156, 34402932, 90328674, 238474986, 632775648, 1686705630, 4514955632, 12132227370, 32717113805, 88519867048, 240235675303
Offset: 0
From _Gus Wiseman_, Apr 29 2024: (Start)
Edge-sets of non-isomorphic representatives of the a(0) = 1 through a(5) = 10 forests:
{} {} {} {} {} {}
{12} {12} {12} {12}
{13,23} {12,34} {12,34}
{13,23} {13,23}
{13,24,34} {12,35,45}
{14,24,34} {13,24,34}
{14,24,34}
{13,24,35,45}
{14,25,35,45}
{15,25,35,45}
(End)
- F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, pp. 58-59.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Alois P. Heinz, Table of n, a(n) for n = 0..1000 (first 201 terms from T. D. Noe)
- S. Hougardy, Classes of perfect graphs, Discr. Math. 306 (2006), 2529-2571.
- E. M. Palmer and A. J. Schwenk, On the number of trees in a random forest, J. Combin. Theory, B 27 (1979), 109-121.
- N. J. A. Sloane, Transforms
- Peter Steinbach, Field Guide to Simple Graphs, Volume 3, Part 12 (For Volumes 1, 2, 3, 4 of this book see A000088, A008406, A000055, A000664, respectively.)
- Peter Steinbach, Field Guide to Simple Graphs, Volume 4, Part 5 (For Volumes 1, 2, 3, 4 of this book see A000088, A008406, A000055, A000664, respectively.)
- Eric Weisstein's World of Mathematics, Forest.
- Index entries for sequences related to forests
-
EulerTransform[ seq_List ] := With[{m = Length[seq]}, CoefficientList[ Series[ Times @@ (1/(1 - x^Range[m])^seq), {x, 0, m}], x]];
b[n_] := b[n] = If[n <= 1, n, Sum[ Sum[ d*b[d], {d, Divisors[j]}]*b[n - j], {j, 1, n - 1}]/(n - 1)];
a55[n_] := a55[n] = If[n == 0, 1, b[n] - (Sum[ b[k]*b[n - k], {k, 0, n}] - If[Mod[n, 2] == 0, b[n/2], 0])/2]; A000055 = Table[ a55[n], {n, 1, 31}]; EulerTransform[ A000055 ] (* Jean-François Alcover, Mar 15 2012 *)
A138464
Triangle read by rows: T(n, k) is the number of forests on n labeled nodes with k edges. T(n, k) for n >= 1 and 0 <= k <= n-1.
Original entry on oeis.org
1, 1, 1, 1, 3, 3, 1, 6, 15, 16, 1, 10, 45, 110, 125, 1, 15, 105, 435, 1080, 1296, 1, 21, 210, 1295, 5250, 13377, 16807, 1, 28, 378, 3220, 18865, 76608, 200704, 262144, 1, 36, 630, 7056, 55755, 320544, 1316574, 3542940, 4782969, 1, 45, 990, 14070, 143325, 1092105, 6258000, 26100000, 72000000, 100000000
Offset: 1
Triangle begins:
[1] 1;
[2] 1, 1;
[3] 1, 3, 3;
[4] 1, 6, 15, 16;
[5] 1, 10, 45, 110, 125;
[6] 1, 15, 105, 435, 1080, 1296;
[7] 1, 21, 210, 1295, 5250, 13377, 16807;
For Ehrhart polynomials of integral Coxeter permutahedra of classical type cf. this sequence (type A),
A343805 (type B),
A343806 (type C),
A343807 (type D).
-
T:= proc(n) option remember; if n=0 then 0 else T(n-1) +n^(n-1) *x^n/n! fi end: TT:= proc(n) option remember; expand(T(n) -T(n)^2/2) end: f:= proc(k) option remember; if k=0 then 1 else unapply(f(k-1)(x) +x^k/k!, x) fi end: A:= proc(n,k) option remember; series(f(k)(TT(n)), x,n+1) end: aa:= (n,k)-> coeff(A(n,k), x,n) *n!: a:= (n,k)-> aa(n,n-k) -aa(n,n-k-1): seq(seq(a(n,k), k=0..n-1), n=1..10); # Alois P. Heinz, Sep 02 2008
alias(W = LambertW): EhrA := exp(-W(-t*x)/t - W(-t*x)^2/(2*t)):
ser := series(EhrA, x, 12): cx := n -> n!*coeff(ser, x, n):
T := n -> seq(coeff(cx(n), t, k), k=0..n-1):
seq(T(n), n = 1..10); # Peter Luschny, Apr 30 2021
-
t[0, 0] = 1; t[n_ /; n >= 1, k_] /; (0 <= k <= n-1) := t[n, k] = Sum[(i+1)^(i-1)*Binomial[n-1, i]*t[n-i-1, k-i], {i, 0, k}]; t[, ] = 0; Table[t[n, k], {n, 1, 10}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Jan 14 2014, after Peter Bala *)
gf := E^(-(ProductLog[-(t x)] (2 + ProductLog[-(t x)]))/(2 t));
ser := Series[gf, {x, 0, 12}]; cx[n_] := n! Coefficient[ser, x, n];
Table[CoefficientList[cx[n], t], {n, 1, 10}] // Flatten (* Peter Luschny, May 01 2021 *)
A095133
Triangle of numbers of forests on n nodes containing k trees.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 2, 1, 1, 6, 6, 4, 2, 1, 1, 11, 11, 7, 4, 2, 1, 1, 23, 23, 14, 8, 4, 2, 1, 1, 47, 46, 29, 15, 8, 4, 2, 1, 1, 106, 99, 60, 32, 16, 8, 4, 2, 1, 1, 235, 216, 128, 66, 33, 16, 8, 4, 2, 1, 1, 551, 488, 284, 143, 69, 34, 16, 8, 4, 2, 1, 1, 1301, 1121, 636, 315, 149, 70, 34, 16, 8, 4, 2, 1, 1
Offset: 1
Triangle begins:
1;
1, 1;
1, 1, 1;
2, 2, 1, 1;
3, 3, 2, 1, 1;
6, 6, 4, 2, 1, 1;
11, 11, 7, 4, 2, 1, 1;
23, 23, 14, 8, 4, 2, 1, 1;
47, 46, 29, 15, 8, 4, 2, 1, 1;
106, 99, 60, 32, 16, 8, 4, 2, 1, 1;
...
- Alois P. Heinz, Rows n = 1..141, flattened
- Peter Steinbach, Field Guide to Simple Graphs, Volume 3, Part 12 (For Volumes 1, 2, 3, 4 of this book see A000088, A008406, A000055, A000664, respectively.)
- Peter Steinbach, Field Guide to Simple Graphs, Volume 4, Part 6 (For Volumes 1, 2, 3, 4 of this book see A000088, A008406, A000055, A000664, respectively.)
- Eric Weisstein's World of Mathematics, Forest
Limiting sequence of reversed rows gives
A215930.
-
with(numtheory):
b:= proc(n) option remember; local d, j; `if` (n<=1, n,
(add(add(d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/(n-1))
end:
t:= proc(n) option remember; local k; `if` (n=0, 1,
b(n)-(add(b(k)*b(n-k), k=0..n)-`if`(irem(n, 2)=0, b(n/2), 0))/2)
end:
g:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
`if`(min(i, p)<1, 0, add(g(n-i*j, i-1, p-j) *
binomial(t(i)+j-1, j), j=0..min(n/i, p)))))
end:
a:= (n, k)-> g(n, n, k):
seq(seq(a(n, k), k=1..n), n=1..14); # Alois P. Heinz, Aug 20 2012
-
nn=30;s[n_,k_]:=s[n,k]=a[n+1-k]+If[n<2k,0,s[n-k,k]];a[1]=1;a[n_]:=a[n]=Sum[a[i]s[n-1,i]i,{i,1,n-1}]/(n-1);ft=Table[a[i]-Sum[a[j]a[i-j],{j,1,i/2}]+If[OddQ[i],0,a[i/2](a[i/2]+1)/2],{i,1,nn}];CoefficientList[Series[Product[1/(1-y x^i)^ft[[i]],{i,1,nn}],{x,0,20}],{x,y}]//Grid (* Geoffrey Critzer, Oct 13 2012, after code given by Robert A. Russell in A000055 *)
A105821
Triangle of the numbers of different forests with one or more isolated vertices. Those forests have order N and m trees.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 2, 1, 1, 0, 3, 3, 2, 1, 1, 0, 6, 6, 4, 2, 1, 1, 0, 11, 11, 7, 4, 2, 1, 1, 0, 23, 23, 14, 8, 4, 2, 1, 1, 0, 47, 46, 29, 15, 8, 4, 2, 1, 1, 0, 106, 99, 60, 32, 16, 8, 4, 2, 1, 1, 0, 235, 216, 128, 66, 33, 16, 8, 4, 2, 1, 1, 0, 551, 488, 284, 143, 69, 34, 16, 8, 4, 2, 1, 1
Offset: 1
a(5,2) = 2 because 5 vertices can be partitioned in two trees only in one way: one tree gets 4 nodes and the other tree gets 1. Since A000055(4) = 2 and A000055(1) = 1, there are 2 forests. The forests of order less than or equal to 5 are depicted in the Weisstein "Forest" link.
1;
0, 1;
0, 1, 1;
0, 1, 1, 1;
0, 2, 2, 1, 1;
0, 3, 3, 2, 1, 1;
0, 6, 6, 4, 2, 1, 1;
0, 11, 11, 7, 4, 2, 1, 1;
0, 23, 23, 14, 8, 4, 2, 1, 1;
0, 47, 46, 29, 15, 8, 4, 2, 1, 1;
0, 106, 99, 60, 32, 16, 8, 4, 2, 1, 1;
0, 235, 216, 128, 66, 33, 16, 8, 4, 2, 1, 1;
A215930
Number of forests on unlabeled nodes with n edges and no single node trees.
Original entry on oeis.org
1, 1, 2, 4, 8, 16, 34, 71, 154, 341, 768, 1765, 4134, 9838, 23766, 58226, 144353, 361899, 916152, 2339912, 6023447, 15617254, 40752401, 106967331, 282267774, 748500921, 1993727506, 5332497586, 14316894271, 38574473086, 104273776038, 282733466684, 768809041078
Offset: 0
a(0) = 1: ( ), the empty forest with 0 trees and 0 edges.
a(1) = 1: ( o-o ), 1 tree and 1 edge. o
a(2) = 2: ( o-o-o ), ( o-o o-o ). |
a(3) = 4: ( o-o-o-o ), ( o-o-o o-o ), ( o-o o-o o-o ), ( o-o-o ).
-
with(numtheory):
b:= proc(n) option remember; local d, j; `if`(n<=1, n,
(add(add(d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/(n-1))
end:
t:= proc(n) option remember; local k; `if` (n=0, 1, b(n)-
(add(b(k)*b(n-k), k=0..n)-`if`(irem(n, 2)=0, b(n/2), 0))/2)
end:
g:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
`if`(min(i, p)<1, 0, add(g(n-i*j, i-1, p-j)*
binomial(t(i)+j-1, j), j=0..min(n/i, p)))))
end:
a:= n-> g(2*n, 2*n, n):
seq(a(n), n=0..40);
-
nn = 30; t[x_] := Sum[a[n] x^n, {n, 1, nn}]; a[0] = 0;
a[1] = 1; sol =
SolveAlways[
0 == Series[
t[x] - x Product[1/(1 - x^i)^a[i], {i, 1, nn}], {x, 0, nn}], x];
b[x_] := Sum[a[n] x^n /. sol, {n, 0, nn}]; ft =
Drop[Flatten[
CoefficientList[Series[b[x] - (b[x]^2 - b[x^2])/2, {x, 0, nn}],
x]], 1]; Drop[
CoefficientList[
Series[Product[1/(1 - y ^(i - 1))^ft[[i]], {i, 2, nn}], {y, 0, nn}],
y], -1] (* Geoffrey Critzer, Nov 10 2014 *)
Showing 1-5 of 5 results.
Comments