A136605
Triangle read by rows: T(n,k) = number of forests on n unlabeled nodes with k edges (n>=1, 0<=k<=n-1).
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 3, 3, 1, 1, 2, 4, 6, 6, 1, 1, 2, 4, 7, 11, 11, 1, 1, 2, 4, 8, 14, 23, 23, 1, 1, 2, 4, 8, 15, 29, 46, 47, 1, 1, 2, 4, 8, 16, 32, 60, 99, 106, 1, 1, 2, 4, 8, 16, 33, 66, 128, 216, 235, 1, 1, 2, 4, 8, 16, 34, 69, 143, 284, 488, 551, 1, 1, 2, 4, 8, 16, 34, 70, 149, 315, 636, 1121, 1301
Offset: 1
Triangle begins:
1
1,1
1,1,1
1,1,2,2
1,1,2,3,3
1,1,2,4,6,6 <- T(6,3) = 4 forests on 6 nodes with 3 edges.
1,1,2,4,7,11,11
1,1,2,4,8,14,23,23
1,1,2,4,8,15,29,46,47
1,1,2,4,8,16,32,60,99,106
1,1,2,4,8,16,33,66,128,216,235
1,1,2,4,8,16,34,69,143,284,488,551
1,1,2,4,8,16,34,70,149,315,636,1121,1301
1,1,2,4,8,16,34,71,152,330,710,1467,2644,3159
- F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, pp. 58-59.
-
with(numtheory):
b:= proc(n) option remember; `if`(n<=1, n, (add(add(
d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/ (n-1))
end:
t:= n-> `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):
g:= proc(n, i) option remember; `if`(n=0, 1,
`if`(i<1, 0, expand(add(binomial(t(i)+j-1, j)*
g(n-i*j, i-1)*x^j, j=0..n/i))))
end:
T:= n-> (p-> seq(coeff(p, x, n-i), i=0..n-1))(g(n$2)):
seq(T(n), n=1..14); # Alois P. Heinz, Apr 11 2014
-
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)]; t[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]; g[n_, i_] := g[n, i] = If[n == 0, 1, If[i < 1, 0, Expand[Sum[Binomial[t[i] + j - 1, j]*g[n - i*j, i-1]*x^j, {j, 0, n/i}]]]]; T[n_] := CoefficientList[g[n, n], x] // Reverse // Most; Table[T[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, Apr 16 2014, after Alois P. Heinz *)
A144215
Triangle read by rows: T(n,k) is the number of forests on n unlabeled nodes with all nodes of degree <= k (n>=1, 0 <= k <= n-1).
Original entry on oeis.org
1, 1, 2, 1, 2, 3, 1, 3, 5, 6, 1, 3, 7, 9, 10, 1, 4, 11, 17, 19, 20, 1, 4, 15, 28, 34, 36, 37, 1, 5, 22, 52, 67, 73, 75, 76, 1, 5, 30, 90, 129, 144, 150, 152, 153, 1, 6, 42, 170, 264, 305, 320, 326, 328, 329, 1, 6, 56, 310, 542, 645, 686, 701, 707, 709, 710
Offset: 1
Triangle begins:
1
1 2
1 2 3
1 3 5 6
1 3 7 9 10
1 4 11 17 19 20
1 4 15 28 34 36 37
...
From _Andrew Howroyd_, Dec 18 2020: (Start)
Formatted as an array to show the full columns:
========================================================
n\k | 0 1 2 3 4 5 6 7 8 9 10
-----+--------------------------------------------------
1 | 1 1 1 1 1 1 1 1 1 1 1 ...
2 | 1 2 2 2 2 2 2 2 2 2 2 ...
3 | 1 2 3 3 3 3 3 3 3 3 3 ...
4 | 1 3 5 6 6 6 6 6 6 6 6 ...
5 | 1 3 7 9 10 10 10 10 10 10 10 ...
6 | 1 4 11 17 19 20 20 20 20 20 20 ...
7 | 1 4 15 28 34 36 37 37 37 37 37 ...
8 | 1 5 22 52 67 73 75 76 76 76 76 ...
9 | 1 5 30 90 129 144 150 152 153 153 153 ...
10 | 1 6 42 170 264 305 320 326 328 329 329 ...
11 | 1 6 56 310 542 645 686 701 707 709 710 ...
12 | 1 7 77 600 1161 1431 1536 1577 1592 1598 1600 ...
(End)
-
\\ Here V(n,k) gives column k of A144528.
EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
MSet(p,k)={my(n=serprec(p,x)-1); if(min(k,n)<1, 1 + O(x*x^n), polcoef(exp( sum(i=1, min(k,n), (y^i + O(y*y^k))*subst(p + O(x*x^(n\i)), x, x^i)/i ))/(1-y + O(y*y^k)), k, y))}
V(n,k)={my(g=1+O(x)); for(n=2, n, g=x*MSet(g, k-1)); Vec(1 + x*MSet(g, k) + (subst(g, x, x^2) - g^2)/2)}
M(n, m=n)={Mat(vector(m, k, EulerT(V(n,k-1)[2..1+n])~))}
{ my(T=M(12)); for(n=1, #T~, print(T[n, 1..n])) } \\ Andrew Howroyd, Dec 18 2020
A263294
Triangle read by rows: T(n,k) is the number of unlabeled simple graphs with n vertices and treewidth k.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 5, 4, 1, 1, 9, 17, 6, 1, 1, 19, 72, 53, 10, 1, 1, 36, 323, 501, 168, 14, 1, 1, 75, 1639, 5889, 4163, 557, 21, 1, 1, 152, 9203, 81786, 138923, 42596, 1977, 29, 1
Offset: 1
Triangle begins:
1;
1, 1;
1, 2, 1;
1, 5, 4, 1;
1, 9, 17, 6, 1;
1, 19, 72, 53, 10, 1;
1, 36, 323, 501, 168, 14, 1;
1, 75, 1639, 5889, 4163, 557, 21, 1;
1, 152, 9203, 81786, 138923, 42596, 1977, 29, 1;
...
A035056
Number of asymmetric forests with n nodes.
Original entry on oeis.org
1, 1, 0, 0, 0, 0, 0, 1, 2, 4, 9, 21, 44, 96, 206, 450, 981, 2159, 4757, 10571, 23563, 52835, 118939, 269047, 610878, 1392677, 3186001, 7313882, 16842202, 38900699, 90098260, 209229601, 487077685, 1136549747, 2657859059, 6228447488, 14624515804, 34402798404
Offset: 0
- Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 301 and 562.
-
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(b((i-1)$2), j)*b(n-i*j, i-1), j=0..n/i)))
end:
g:= n-> b((n-1)$2):
h:= proc(n) option remember; g(n)-add(g(i)*g(n-i), i=0..n)/2
-`if`(irem(n, 2)=1, 0, g(n/2))/2
end:
f:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(h(i), j)*f(n-i*j, i-1), j=0..n/i)))
end:
a:= n-> f(n, n):
seq(a(n), n=0..40); # Alois P. Heinz, May 20 2013
-
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[b[i-1, i-1], j]*b[n-i*j, i-1], {j, 0, n/i}]]]; g[n_] := b[n-1, n-1]; h[n_] := h[n] = g[n] - Sum[g[i]*g[n-i], {i, 0, n}]/2 - If[Mod[n, 2]==1, 0, g[n/2]]/2; f[n_, i_] := f[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[h[i], j]*f[n - i*j, i-1], {j, 0, n/i}]]]; a[n_] := f[n, n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 21 2016, after Alois P. Heinz *)
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 *)
A331693
Number of Tom graphs with n vertices.
Original entry on oeis.org
1, 1, 2, 3, 6, 10, 20, 37, 76, 153, 328, 705, 1576, 3551, 8179, 18980, 44559, 105111, 249426, 593484, 1416269, 3384581, 8099819, 19398194, 46487665, 111447044, 267260387, 641022947, 1537706522, 3688974818, 8850411933, 21234093757, 50946316856, 122234742311
Offset: 0
The graph
1---2---3
is a Tom graph: Tom can follow the sequence 2, 2 to guarantee that he catches Jerry.
The graph
1
/ \
2---3
is not a Tom graph: Jerry always has 2 vertices to go to, and whatever vertex Tom picks, Jerry can choose another to evade Tom.
A339788
Triangle read by rows: T(n,k) is the number of forests with n unlabeled vertices and maximum vertex degree k, (0 <= k < n).
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 4, 2, 1, 1, 3, 7, 6, 2, 1, 1, 3, 11, 13, 6, 2, 1, 1, 4, 17, 30, 15, 6, 2, 1, 1, 4, 25, 60, 39, 15, 6, 2, 1, 1, 5, 36, 128, 94, 41, 15, 6, 2, 1, 1, 5, 50, 254, 232, 103, 41, 15, 6, 2, 1, 1, 6, 70, 523, 561, 270, 105, 41, 15, 6, 2, 1
Offset: 1
Triangle begins:
1;
1, 1;
1, 1, 1;
1, 2, 2, 1;
1, 2, 4, 2, 1;
1, 3, 7, 6, 2, 1;
1, 3, 11, 13, 6, 2, 1;
1, 4, 17, 30, 15, 6, 2, 1;
1, 4, 25, 60, 39, 15, 6, 2, 1;
1, 5, 36, 128, 94, 41, 15, 6, 2, 1;
1, 5, 50, 254, 232, 103, 41, 15, 6, 2, 1;
...
-
\\ Here V(n, k) gives column k of A144528.
EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
MSet(p,k)={my(n=serprec(p,x)-1); if(min(k,n)<1, 1 + O(x*x^n), polcoef(exp( sum(i=1, min(k,n), (y^i + O(y*y^k))*subst(p + O(x*x^(n\i)), x, x^i)/i ))/(1-y + O(y*y^k)), k, y))}
V(n,k)={my(g=1+O(x)); for(n=2, n, g=x*MSet(g, k-1)); Vec(1 + x*MSet(g, k) + (subst(g, x, x^2) - g^2)/2)}
M(n, m=n)={my(v=vector(m, k, EulerT(V(n,k-1)[2..1+n])~)); Mat(vector(m, k, v[k]-if(k>1, v[k-1])))}
{ my(T=M(12)); for(n=1, #T~, print(T[n, 1..n])) }
A035054
Number of forests of identical trees.
Original entry on oeis.org
1, 1, 2, 2, 4, 4, 9, 12, 27, 49, 111, 236, 562, 1302, 3172, 7746, 19347, 48630, 123923, 317956, 823178, 2144518, 5623993, 14828075, 39300482, 104636894, 279794753, 751065509, 2023446206, 5469566586, 14830879661, 40330829031, 109972429568, 300628862717
Offset: 0
-
with(numtheory):
b:= proc(n) option remember; `if`(n<=1, n,
(add(add(d*b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
end:
g:= 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:
a:= n-> `if`(n=0, 1, add(g(d), d=divisors(n))):
seq(a(n), n=0..35); # Alois P. Heinz, May 18 2013
-
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)]; g[n_] := g[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]; a[n_] := If[n==0, 1, Sum[ g[d], {d, Divisors[n]}]]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Feb 19 2016, after Alois P. Heinz *)
A035055
Number of forests of different trees.
Original entry on oeis.org
1, 1, 1, 2, 3, 6, 12, 24, 49, 105, 231, 517, 1188, 2783, 6643, 16101, 39606, 98605, 248287, 631214, 1618878, 4183964, 10889305, 28517954, 75111521, 198851386, 528929895, 1412993746, 3789733399, 10201625514, 27555373561, 74664487653, 202908119046, 552939614498
Offset: 0
-
with(numtheory):
b:= proc(n) option remember; `if`(n<2, n,
(add(add(d*b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
end:
h:= proc(n) option remember; `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) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(h(i), j)*g(n-i*j, i-1), j=0..n/i)))
end:
a:= n-> g(n, n):
seq(a(n), n=0..40); # Alois P. Heinz, May 19 2013
-
nn = 20; t[x_] := Sum[a[n] x^n, {n, 1, nn}]; a[0] = 0;
b = Flatten[
sol = SolveAlways[
0 == Series[
t[x] - x Product[1/(1 - x^i)^ a[i], {i, 1, nn}], {x, 0, nn}],
x]; Table[a[n], {n, 0, nn}] /. sol];
r[x_] := Sum[b[[n]] x^(n - 1), {n, 1, nn + 1}]; c =
Drop[CoefficientList[
Series[r[x] - (r[x]^2/2 - r[x^2]/2), {x, 0, nn}], x],
1]; CoefficientList[
Series[Product[(1 + x^i)^c[[i]], {i, 1, nn}], {x, 0, nn}], x] (* Geoffrey Critzer, Nov 15 2014 *)
A286743
Number of (not necessarily connected) simple cyclic graphs on n vertices.
Original entry on oeis.org
0, 0, 1, 5, 24, 136, 1007, 12270, 274515, 12004839, 1018997154, 165091170991, 50502031364294, 29054155657226889, 31426485969804288254, 64001015704527557845023, 245935864153532932683596813, 1787577725145611700547877883649, 24637809253125004524383007490657239
Offset: 1
Cf.
A000088 (number of simple graphs on n vertices).
Cf.
A005195 (number of forests with n unlabeled nodes).
Cf.
A241841 (number of simple connected graphs on n nodes that are not trees, i.e., number of connected cyclic graphs).
Comments