A000106
2nd power of rooted tree enumerator; number of linear forests of 2 rooted trees.
Original entry on oeis.org
1, 2, 5, 12, 30, 74, 188, 478, 1235, 3214, 8450, 22370, 59676, 160140, 432237, 1172436, 3194870, 8741442, 24007045, 66154654, 182864692, 506909562, 1408854940, 3925075510, 10959698606, 30665337738, 85967279447, 241433975446, 679192039401, 1913681367936, 5399924120339
Offset: 2
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 150.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
a000106 n = a000106_list !! (n-2)
a000106_list = drop 2 $ conv a000081_list [] where
conv (v:vs) ws = (sum $ zipWith (*) ws' $ reverse ws') : conv vs ws'
where ws' = v : ws
-- Reinhard Zumkeller, Jun 17 2013
-
b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-1)^2, x=0, n+1), x,n): seq(a(n), n=2..35); # Alois P. Heinz, Aug 21 2008
-
<Jean-François Alcover, Nov 02 2011 *)
b[n_] := b[n] = If[n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[b[n+1-j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum[b[k]*x^k, {k, 1, n}]; a[n_] := SeriesCoefficient[B[n-1]^2, {x, 0, n}]; Table[a[n], {n, 2, 35}] (* Jean-François Alcover, Dec 01 2016, after Alois P. Heinz *)
A339067
Triangle read by rows: T(n,k) is the number of linear forests with n nodes and k rooted trees.
Original entry on oeis.org
1, 1, 1, 2, 2, 1, 4, 5, 3, 1, 9, 12, 9, 4, 1, 20, 30, 25, 14, 5, 1, 48, 74, 69, 44, 20, 6, 1, 115, 188, 186, 133, 70, 27, 7, 1, 286, 478, 503, 388, 230, 104, 35, 8, 1, 719, 1235, 1353, 1116, 721, 369, 147, 44, 9, 1, 1842, 3214, 3651, 3168, 2200, 1236, 560, 200, 54, 10, 1
Offset: 1
Triangle begins:
1;
1, 1;
2, 2, 1;
4, 5, 3, 1;
9, 12, 9, 4, 1;
20, 30, 25, 14, 5, 1;
48, 74, 69, 44, 20, 6, 1;
115, 188, 186, 133, 70, 27, 7, 1;
286, 478, 503, 388, 230, 104, 35, 8, 1;
719, 1235, 1353, 1116, 721, 369, 147, 44, 9, 1;
...
-
b:= proc(n) option remember; `if`(n<2, n, (add(add(d*b(d),
d=numtheory[divisors](j))*b(n-j), j=1..n-1))/(n-1))
end:
T:= proc(n, k) option remember; `if`(k=1, b(n), (t->
add(T(j, t)*T(n-j, k-t), j=1..n-1))(iquo(k, 2)))
end:
seq(seq(T(n, k), k=1..n), n=1..12); # Alois P. Heinz, Dec 04 2020
# Using function PMatrix from A357368. Adds row and column for n, k = 0.
PMatrix(10, A000081); # Peter Luschny, Oct 07 2022
-
b[n_] := b[n] = If[n < 2, n, (Sum[Sum[d*b[d], {d, Divisors[j]}]*b[n - j], {j, 1, n - 1}])/(n - 1)];
T[n_, k_] := T[n, k] = If[k == 1, b[n], With[{t = Quotient[k, 2]}, Sum[T[j, t]*T[n - j, k - t], {j, 1, n - 1}]]];
Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Jan 03 2021, after Alois P. Heinz *)
-
\\ TreeGf is A000081.
TreeGf(N) = {my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
ColSeq(n,k)={my(t=TreeGf(max(0,n+1-k))); Vec(t^k, -n)}
M(n, m=n)=Mat(vector(m, k, ColSeq(n,k)~))
{ my(T=M(12)); for(n=1, #T~, print(T[n,1..n])) }
A000242
3rd power of rooted tree enumerator; number of linear forests of 3 rooted trees.
Original entry on oeis.org
1, 3, 9, 25, 69, 186, 503, 1353, 3651, 9865, 26748, 72729, 198447, 543159, 1491402, 4107152, 11342826, 31408719, 87189987, 242603970, 676524372, 1890436117, 5292722721, 14845095153, 41708679697, 117372283086, 330795842217
Offset: 3
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 150.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-2)^3, x=0, n+1), x,n): seq(a(n), n=3..29); # Alois P. Heinz, Aug 21 2008
-
max = 29; b[n_] := b[n] = If[n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[ b[n+1-j*k], {j, 1, Quotient[n, k]}]; f[x_] := Sum[ b[k]*x^k, {k, 0, max}]; Drop[ CoefficientList[ Series[f[x]^3, {x, 0, max}], x], 3] (* Jean-François Alcover, Oct 25 2011, after Alois P. Heinz *)
A000300
4th power of rooted tree enumerator: linear forests of 4 rooted trees.
Original entry on oeis.org
1, 4, 14, 44, 133, 388, 1116, 3168, 8938, 25100, 70334, 196824, 550656, 1540832, 4314190, 12089368, 33911543, 95228760, 267727154, 753579420, 2123637318, 5991571428, 16923929406, 47857425416, 135478757308, 383929643780, 1089118243128, 3092612497260
Offset: 4
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 150.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-3)^4, x=0, n+1), x,n): seq(a(n), n=4..30); # Alois P. Heinz, Aug 21 2008
-
b[n_] := b[n] = If[ n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[ b[n + 1 - j*k], {j, 1, n/k}]; bb[n_] := bb[n] = Sum[b[k]*x^k, {k, 1, n}]; a[n_] := Coefficient[ Series[ bb[n - 3]^4, {x, 0, n + 1}], x, n]; Table[a[n], {n, 4, 31}] (* Jean-François Alcover, Jan 25 2013, translated from Alois P. Heinz's Maple program *)
A000343
5th power of rooted tree enumerator; number of linear forests of 5 rooted trees.
Original entry on oeis.org
1, 5, 20, 70, 230, 721, 2200, 6575, 19385, 56575, 163952, 472645, 1357550, 3888820, 11119325, 31753269, 90603650, 258401245, 736796675, 2100818555, 5990757124, 17087376630, 48753542665, 139155765455, 397356692275, 1135163887190, 3244482184720, 9277856948255
Offset: 5
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 150.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-4)^5, x=0, n+1), x,n): seq(a(n), n=5..29); # Alois P. Heinz, Aug 21 2008
-
b[n_] := b[n] = If[n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[b[n+1-j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum[b[k]*x^k, {k, 1, n}]; a[n_] := Coefficient[Series[B[n-4]^5, {x, 0, n+1}], x, n]; Table[a[n], {n, 5, 32}] (* Jean-François Alcover, Mar 05 2014, after Alois P. Heinz *)
Showing 1-5 of 5 results.
Comments