A002991
Number of n-node trees with a forbidden limb of length 5.
Original entry on oeis.org
1, 1, 1, 1, 2, 3, 5, 10, 21, 43, 97, 215, 503, 1187, 2876, 7033, 17510, 43961, 111664, 285809, 737632, 1915993, 5008652, 13163785, 34774873, 92282214, 245930746, 657931603, 1766481135, 4758553683, 12858286083, 34844908142, 94681272368
Offset: 0
- A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
with(numtheory):
g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
`if`(d=5, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
end:
a:= n-> `if`(n=0, 1, g(n-1)+(`if`(irem(n, 2, 'r')=0,
g(r-1), 0)-add(g(i-1)*g(n-i-1), i=1..n-1))/2):
seq(a(n), n=0..40); # Alois P. Heinz, Jul 06 2014
-
g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 5, 1, 0]), {d, Divisors[j] }]*g[n-j], {j, 1, n}]/n]; a[n_] := If[n == 0, 1, g[n-1] + (If[Mod[n, 2 ] == 0, g[Quotient[n, 2]-1], 0] - Sum[g[i-1]*g[n-i-1], {i, 1, n-1}])/2]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 26 2015, after Alois P. Heinz *)
A052325
Number of asymmetric rooted trees with a forbidden limb of length 3.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 4, 8, 15, 30, 60, 122, 249, 513, 1061, 2210, 4620, 9708, 20472, 43337, 92023, 196018, 418653, 896485, 1924154, 4139014, 8921349, 19266067, 41679483, 90318082, 196020800, 426055601, 927317334, 2020949226, 4409764169
Offset: 1
-
b:= proc(n, i) option remember;
`if`(n=0, 1, `if`(i<1, 0, add(binomial(a(i)-
`if`(i=3, 1, 0), j)*b(n-i*j, i-1), j=0..n/i)))
end:
a:= n-> `if`(n<1, 1, b(n-1, n-1)):
seq(a(n), n=1..50); # Alois P. Heinz, Jul 06 2014
-
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[a[i]- If[i==3, 1, 0], j]*b[n-i*j, i-1], {j, 0, n/i}]]];
a[n_] := If[n<1, 1, b[n-1, n-1]];
Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Mar 01 2016, after Alois P. Heinz *)
A052327
Number of rooted trees with a forbidden limb of length 4.
Original entry on oeis.org
1, 1, 2, 4, 8, 18, 43, 102, 251, 625, 1584, 4055, 10509, 27451, 72307, 191697, 511335, 1370995, 3693452, 9991671, 27133149, 73934800, 202096673, 553999573, 1522651908, 4195087022, 11583820212, 32052475655, 88860186023
Offset: 1
-
with(numtheory):
g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
`if`(d=4, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
end:
a:= n-> g(n-1):
seq(a(n), n=1..35); # Alois P. Heinz, Jul 04 2014
-
g[n_] := g[n] = If[n == 0, 1, Sum[DivisorSum[j, #*(g[# - 1] - If[# == 4, 1, 0])&] * g[n - j], {j, 1, n}]/n];
a[n_] := g[n - 1];
Table[a[n], {n, 1, 35}] (* Jean-François Alcover, Apr 04 2017, after Alois P. Heinz *)
A052320
Number of labeled trimmed trees with n nodes.
Original entry on oeis.org
1, 1, 1, 0, 4, 5, 96, 1057, 14848, 235881, 4234240, 84815621, 1877090304, 45524670061, 1201345331200, 34283233751145, 1052350187831296, 34582597023733073, 1211614017182760960, 45088964565749965837
Offset: 0
-
CoefficientList[Series[1+x^3/2+x^4/2-LambertW[-x/E^(x^2)]-(LambertW[-x/E^(x^2)])^2/2, {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Mar 29 2014 *)
A052323
Number of labeled trees with a forbidden limb of length 3.
Original entry on oeis.org
1, 1, 1, 3, 4, 65, 576, 5887, 92464, 1680345, 34041520, 774906011, 19537590744, 540890740117, 16321259150392, 533305854910935, 18764822871806176, 707498057530634033, 28460428902580264416, 1216828054782241792435
Offset: 0
-
CoefficientList[Series[1+x^4/2+x^5/2+x^6/2-LambertW[-x*E^(-x^3)]-(LambertW[-x*E^(-x^3)])^2/2, {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Mar 29 2014 *)
A052326
Number of asymmetric trees with a forbidden limb of length 3.
Original entry on oeis.org
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 11, 25, 49, 105, 211, 444, 903, 1880, 3865, 8042, 16658, 34764, 72484, 151856, 318418, 669934, 1411637, 2982407, 6311760, 13387127, 28442458, 60543586, 129084965, 275683061, 589660911, 1263128375
Offset: 0
A002990
Number of n-node trees with a forbidden limb of length 4.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 5, 9, 19, 38, 86, 188, 439, 1026, 2472, 5997, 14835, 36964, 93246, 236922, 607111, 1565478, 4062797, 10599853, 27797420, 73224806, 193709710, 514406793, 1370937140, 3665714528, 9831891555, 26445886506, 71325268179
Offset: 0
- A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
with(numtheory):
g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
`if`(d=4, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
end:
a:= n-> `if`(n=0, 1, g(n-1)+(`if`(irem(n, 2, 'r')=0,
g(r-1), 0)-add(g(i-1)*g(n-i-1), i=1..n-1))/2):
seq(a(n), n=0..40); # Alois P. Heinz, Jul 06 2014
-
g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 4, 1, 0]), {d, Divisors[j] }]*g[n-j], {j, 1, n}]/n]; a[n_] := If[n == 0, 1, g[n-1] + (If[Mod[n, 2 ] == 0, g[Quotient[n, 2]-1], 0] - Sum[g[i-1]*g[n-i-1], {i, 1, n-1}])/2]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 26 2015, after Alois P. Heinz *)
A284417
Triangular array read by rows. T(n,k) is the number of rooted labeled trees on n nodes with exactly k vertices whose unique descendent is a leaf, n >= 1, 0 <= k <= floor((n-1)/2) + delta_{2,n}.
Original entry on oeis.org
1, 0, 2, 3, 6, 16, 48, 145, 420, 60, 1536, 4800, 1440, 19579, 65730, 31500, 840, 290816, 1053696, 698880, 53760, 4942305, 19332936, 16367400, 2388960, 15120, 94689280, 399052800, 410296320, 93542400, 2419200, 2020278931, 9146127870, 11044008360, 3526261200, 200415600, 332640, 47523053568, 230339788800, 319018106880, 133013422080, 12986265600, 127733760
Offset: 1
Triangle begins
1,
0, 2,
3, 6,
16, 48,
145, 420, 60,
1536, 4800, 1440,
19579, 65730, 31500, 840,
290816, 1053696, 698880, 53760,
...
T(3,1)=6 because there are 6 labeled rooted trees (paths) o-o-o and these 6 trees have 1 vertex whose only descendent is a leaf. T(3,0) = 3 because there are 3 labeled trees of the form
o
/ \
o o
and these 3 trees have no such vertices.
-
nn = 10; Range[0, nn]! CoefficientList[Series[-z^2 + u z^2 - ProductLog[-E^((-1 + u) z^2) z], {z, 0, nn}], {z, u}] // Grid
Comments