login
Number T(n,k) of undirected labeled graphs on n nodes with exactly k cycle graphs as connected components; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
15

%I #38 Mar 23 2020 12:10:46

%S 1,0,1,0,1,1,0,1,3,1,0,3,7,6,1,0,12,25,25,10,1,0,60,127,120,65,15,1,0,

%T 360,777,742,420,140,21,1,0,2520,5547,5446,3157,1190,266,28,1,0,20160,

%U 45216,45559,27342,10857,2898,462,36,1,0,181440,414144,427275,264925,109935,31899,6300,750,45,1

%N Number T(n,k) of undirected labeled graphs on n nodes with exactly k cycle graphs as connected components; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%C Also the Bell transform of A001710. 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="/A215771/b215771.txt">Rows n = 0..140, flattened</a>

%e T(4,1) = 3: .1-2. .1 2. .1-2.

%e . .| |. .|X|. . X .

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

%e .

%e T(4,2) = 7: .1 2. .1-2. .1 2. o1 2. .1 2o .1-2. .1-2.

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

%e . .3 4. .3-4. .3 4. .3-4. .3-4. o3 4. .3 4o

%e .

%e T(4,3) = 6: .1 2o .1-2. o1 2. o1 2o o1 2. .1 2o

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

%e . .3 4o o3 4o o3 4. .3-4. .3 4o o3 4.

%e .

%e T(4,4) = 1: o1 2o

%e . . .

%e . o3 4o

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 1, 1;

%e 0, 1, 3, 1;

%e 0, 3, 7, 6, 1;

%e 0, 12, 25, 25, 10, 1;

%e 0, 60, 127, 120, 65, 15, 1;

%e 0, 360, 777, 742, 420, 140, 21, 1;

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

%p add(binomial(n-1, i)*T(n-1-i, k-1)*ceil(i!/2), 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), 8); # _Peter Luschny_, Jan 21 2016

%t t[n_, k_] := t[n, k] = If[k < 0 || k > n, 0, If[n == 0, 1, Sum[Binomial[n-1, i]*t[n-1-i, k-1]*Ceiling[i!/2], {i, 0, n-k}]]]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Dec 18 2013, translated from Maple *)

%t rows = 10;

%t t = Table[If[n<2, 1, n!/2], {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 if n>=2 else 1, 8)

%Y Columns k=0-10 give: A000007, A001710(n-1) for n>0, A215772, A215763, A215764, A215765, A215766, A215767, A215768, A215769, A215770.

%Y Diagonal and lower diagonals give: A000012, A000217, A001296, A215773, A215774.

%Y Row sums give A002135.

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

%K nonn,tabl

%O 0,9

%A _Alois P. Heinz_, Aug 23 2012