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!)
A215861 Number T(n,k) of simple labeled graphs on n nodes with exactly k connected components that are trees or cycles; triangle T(n,k), n>=0, 0<=k<=n, read by rows. 18

%I #36 Mar 25 2021 15:36:41

%S 1,0,1,0,1,1,0,4,3,1,0,19,19,6,1,0,137,135,55,10,1,0,1356,1267,540,

%T 125,15,1,0,17167,15029,6412,1610,245,21,1,0,264664,218627,90734,

%U 23597,3990,434,28,1,0,4803129,3783582,1515097,394506,70707,8694,714,36,1

%N Number T(n,k) of simple labeled graphs on n nodes with exactly k connected components that are trees or cycles; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%C Also the Bell transform of A215851(n+1). For the definition of the Bell transform see A264428 and the links given there. - _Peter Luschny_, Jan 21 2016

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

%F T(0,0) = 1, T(n,k) = 0 for k<0 or k>n, and otherwise T(n,k) = Sum_{i=0..n-k} C(n-1,i)*T(n-1-i,k-1)*h(i) with h(i) = 1 for i<2 and h(i) = i!/2 + (i+1)^(i-1) else.

%e T(4,2) = 19:

%e .1 2. .1 2. .1-2. .1-2. .1 2. .1 2. .1 2. .1 2. .1 2. .1 2.

%e . /|. .|\ . .|/ . . \|. . /|. . |. . / . .|\ . . \ . .| .

%e .4-3. .4-3. .4 3. .4 3. .4 3. .4-3. .4-3. .4 3. .4-3. .4-3.

%e .

%e .1-2. .1-2. .1 2. .1-2. .1-2. .1 2. .1-2. .1 2. .1 2.

%e .| . . / . .|/ . . \ . . |. . \|. . . .| |. . X .

%e .4 3. .4 3. .4 3. .4 3. .4 3. .4 3. .4-3. .4 3. .4 3.

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 1, 1;

%e 0, 4, 3, 1;

%e 0, 19, 19, 6, 1;

%e 0, 137, 135, 55, 10, 1;

%e 0, 1356, 1267, 540, 125, 15, 1;

%e 0, 17167, 15029, 6412, 1610, 245, 21, 1;

%e ...

%p T:= proc(n, k) option remember; `if`(k<0 or k>n, 0,

%p `if`(n=0, 1, add(binomial(n-1, i)*T(n-1-i, k-1)*

%p `if`(i<2, 1, i!/2 +(i+1)^(i-1)), i=0..n-k)))

%p end:

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

%p # Alternatively, with the function BellMatrix defined in A264428:

%p BellMatrix(n -> `if`(n<2, 1, n!/2+(n+1)^(n-1)), 8); # _Peter Luschny_, Jan 21 2016

%t t[0, 0] = 1; t[n_, k_] /; k < 0 || k > n = 0; t[n_, k_] := t[n, k] =Sum[ Binomial[n-1, i]*t[n-1-i, k-1]* If[i < 2, 1, i!/2 + (i+1)^(i-1)], {i, 0, n-k}]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Jun 07 2013 *)

%t (* Alternatively, with the function BellMatrix defined in A264428: *)

%t g[n_] = If[n < 2, 1, n!/2 + (n+1)^(n-1)]; BellMatrix[g, 8] (* _Peter Luschny_, Jan 21 2016 *)

%t rows = 11;

%t t = Table[If[n<2, 1, n!/2 + (n+1)^(n-1)], {n, 0, rows}];

%t T[n_, k_] := BellY[n, k, t];

%t Table[T[n, k], {n, 0, rows}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Jun 22 2018, after _Peter Luschny_ *)

%o (Sage) # uses[bell_matrix from A264428]

%o bell_matrix(lambda n: factorial(n)//2 + (n+1)^(n-1) if n>=2 else 1, 8) # _Peter Luschny_, Jan 21 2016

%Y Columns k=0-10 give: A000007, A215851, A215852, A215853, A215854, A215855, A215856, A215857, A215858, A215859, A215860.

%Y Diagonal and lower diagonals give: A000012, A000217, A215862, A215863, A215864, A215865.

%Y Row sums give: A144164.

%Y T(2n,n) gives A309313.

%K nonn,tabl

%O 0,8

%A _Alois P. Heinz_, Aug 25 2012

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 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)