login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A144289 Triangle T(n,k), n >= 0, 0 <= k <= n, read by rows: Number T(n,k) of forests of labeled rooted trees on n or fewer nodes using a subset of labels 1..n and k edges. 3

%I #30 Nov 01 2019 03:22:41

%S 1,2,0,4,2,0,8,12,9,0,16,48,84,64,0,32,160,480,820,625,0,64,480,2160,

%T 6120,10230,7776,0,128,1344,8400,34720,94500,155274,117649,0,256,3584,

%U 29568,165760,647920,1712592,2776200,2097152,0,512,9216,96768,701568,3669120,13783392,35630784,57138120,43046721,0

%N Triangle T(n,k), n >= 0, 0 <= k <= n, read by rows: Number T(n,k) of forests of labeled rooted trees on n or fewer nodes using a subset of labels 1..n and k edges.

%H Alois P. Heinz, <a href="/A144289/b144289.txt">Rows n = 0..140, flattened</a>

%H <a href="/index/Ro#rooted">Index entries for sequences related to rooted trees</a>

%F T(n,0) = 2^n, T(n,k) = 0 if k < 0 or n <= k, otherwise T(n,k) = n^(n-1) if k=n-1, otherwise T(n,k) = Sum_{j=0..k} C(n-1,j)*T(j+1,j)*T(n-1-j,k-j).

%e T(3,1) = 12, because there are 12 forests of labeled rooted trees on 3 or fewer nodes using a subset of labels 1..3 and 1 edge:

%e .1<2. .2<1. .1<3. .3<1. .2<3. .3<2. .1<2. .2<1. .1<3. .3<1. .2<3. .3<2.

%e ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... .....

%e ..... ..... ..... ..... ..... ..... .3... .3... .2... .2... .1... .1...

%e Triangle begins:

%e 1;

%e 2, 0;

%e 4, 2, 0;

%e 8, 12, 9, 0;

%e 16, 48, 84, 64, 0;

%e 32, 160, 480, 820, 625, 0;

%p T:= proc(n,k) option remember;

%p if k=0 then 2^n

%p elif k<0 or n<=k then 0

%p elif k=n-1 then n^(n-1)

%p else add(binomial(n-1, j) *T(j+1, j) *T(n-1-j, k-j), j=0..k)

%p fi

%p end:

%p seq(seq(T(n, k), k=0..n), n=0..11);

%t T[n_, k_] := T[n, k] = Which[k == 0, 2^n, k<0 || n <= k, 0, k == n-1, n^(n-1), True, Sum[Binomial[n-1, j]*T[j+1, j]*T[n-1-j, k-j], {j, 0, k}]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 11}] // Flatten (* _Jean-François Alcover_, Jan 21 2014, translated from _Alois P. Heinz_'s Maple code *)

%Y Columns 0, 1 give A000079, A001815.

%Y First lower diagonal gives A000169 with first term 2.

%Y Row sums give A088957.

%Y Cf. A007318, A000142.

%K nonn,tabl

%O 0,2

%A _Alois P. Heinz_, Sep 17 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)