cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A215861 #36 Mar 25 2021 15:36:41
%S A215861 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 A215861 125,15,1,0,17167,15029,6412,1610,245,21,1,0,264664,218627,90734,
%U A215861 23597,3990,434,28,1,0,4803129,3783582,1515097,394506,70707,8694,714,36,1
%N 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.
%C A215861 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 A215861 Alois P. Heinz, <a href="/A215861/b215861.txt">Rows n = 0..140, flattened</a>
%F A215861 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 A215861 T(4,2) = 19:
%e A215861   .1 2.  .1 2.  .1-2.  .1-2.  .1 2.  .1 2.  .1 2.  .1 2.  .1 2.  .1 2.
%e A215861   . /|.  .|\ .  .|/ .  . \|.  . /|.  .  |.  . / .  .|\ .  . \ .  .|  .
%e A215861   .4-3.  .4-3.  .4 3.  .4 3.  .4 3.  .4-3.  .4-3.  .4 3.  .4-3.  .4-3.
%e A215861   .
%e A215861   .1-2.  .1-2.  .1 2.  .1-2.  .1-2.  .1 2.  .1-2.  .1 2.  .1 2.
%e A215861   .|  .  . / .  .|/ .  . \ .  .  |.  . \|.  .   .  .| |.  . X .
%e A215861   .4 3.  .4 3.  .4 3.  .4 3.  .4 3.  .4 3.  .4-3.  .4 3.  .4 3.
%e A215861 Triangle T(n,k) begins:
%e A215861   1;
%e A215861   0,     1;
%e A215861   0,     1,     1;
%e A215861   0,     4,     3,    1;
%e A215861   0,    19,    19,    6,    1;
%e A215861   0,   137,   135,   55,   10,   1;
%e A215861   0,  1356,  1267,  540,  125,  15,   1;
%e A215861   0, 17167, 15029, 6412, 1610, 245,  21,  1;
%e A215861   ...
%p A215861 T:= proc(n, k) option remember; `if`(k<0 or k>n, 0,
%p A215861       `if`(n=0, 1, add(binomial(n-1, i)*T(n-1-i, k-1)*
%p A215861       `if`(i<2, 1, i!/2 +(i+1)^(i-1)), i=0..n-k)))
%p A215861     end:
%p A215861 seq(seq(T(n, k), k=0..n), n=0..12);
%p A215861 # Alternatively, with the function BellMatrix defined in A264428:
%p A215861 BellMatrix(n -> `if`(n<2, 1, n!/2+(n+1)^(n-1)), 8); # _Peter Luschny_, Jan 21 2016
%t A215861 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 A215861 (* Alternatively, with the function BellMatrix defined in A264428: *)
%t A215861 g[n_] =  If[n < 2, 1, n!/2 + (n+1)^(n-1)]; BellMatrix[g, 8] (* _Peter Luschny_, Jan 21 2016 *)
%t A215861 rows = 11;
%t A215861 t = Table[If[n<2, 1, n!/2 + (n+1)^(n-1)], {n, 0, rows}];
%t A215861 T[n_, k_] := BellY[n, k, t];
%t A215861 Table[T[n, k], {n, 0, rows}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Jun 22 2018, after _Peter Luschny_ *)
%o A215861 (Sage) # uses[bell_matrix from A264428]
%o A215861 bell_matrix(lambda n: factorial(n)//2 + (n+1)^(n-1) if n>=2 else 1, 8) # _Peter Luschny_, Jan 21 2016
%Y A215861 Columns k=0-10 give: A000007, A215851, A215852, A215853, A215854, A215855, A215856, A215857, A215858, A215859, A215860.
%Y A215861 Diagonal and lower diagonals give: A000012, A000217, A215862, A215863, A215864, A215865.
%Y A215861 Row sums give: A144164.
%Y A215861 T(2n,n) gives A309313.
%K A215861 nonn,tabl
%O A215861 0,8
%A A215861 _Alois P. Heinz_, Aug 25 2012