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.

Showing 1-8 of 8 results.

A143543 Triangle read by rows: T(n,k) = number of labeled graphs on n nodes with k connected components, 1<=k<=n.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 38, 19, 6, 1, 728, 230, 55, 10, 1, 26704, 5098, 825, 125, 15, 1, 1866256, 207536, 20818, 2275, 245, 21, 1, 251548592, 15891372, 925036, 64673, 5320, 434, 28, 1, 66296291072, 2343580752, 76321756, 3102204, 169113, 11088, 714, 36, 1
Offset: 1

Views

Author

Max Alekseyev, Aug 23 2008

Keywords

Comments

The Bell transform of A001187(n+1). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 17 2016

Examples

			The triangle T(n,k) starts as:
n=1:     1;
n=2:     1,    1;
n=3:     4,    3,   1;
n=4:    38,   19,   6,   1;
n=5:   728,  230,  55,  10,  1;
n=6: 26704, 5098, 825, 125, 15, 1;
...
		

Crossrefs

Cf. A001187 (first column), A006125 (row sums), A106240 (unlabeled variant).
Cf. A125207.
T(2n,n) gives A369827.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, 2^(n*(n-1)/2)-add(
          binomial(n, k)*2^((n-k)*(n-k-1)/2)*g(k)*k, k=1..n-1)/n)
        end:
    b:= proc(n) option remember; `if`(n=0, 1, add(expand(
          b(n-j)*binomial(n-1, j-1)*g(j)*x), j=1..n))
        end:
    T:= (n, k)-> coeff(b(n$2), x, k):
    seq(seq(T(n, k), k=1..n), n=1..10);  # Alois P. Heinz, Feb 02 2024
  • Mathematica
    a= Sum[2^Binomial[n,2] x^n/n!,{n,0,10}];
    Rest[Transpose[Table[Range[0, 10]! CoefficientList[Series[Log[a]^n/n!, {x, 0, 10}], x], {n, 1, 10}]]] // Grid (* Geoffrey Critzer, Mar 15 2011 *)
  • PARI
    T(n)={[Vecrev(p/y) | p <- Vec(serlaplace(exp(y*log(sum(k=0, n, 2^binomial(k,2)*x^k/k!, O(x*x^n))))))]}
    { foreach(T(8), row, print(row)) } \\ Andrew Howroyd, Jun 14 2025
  • Sage
    # uses[bell_matrix from A264428, A001187]
    # Adds a column 1,0,0,0, ... at the left side of the triangle.
    bell_matrix(lambda n: A001187(n+1), 9) # Peter Luschny, Jan 17 2016
    

Formula

SUM[n,k=0..oo] T(n,k) * x^n * y^k / n! = exp( y*( F(x) - 1 ) ) = ( SUM[n=0..oo] 2^binomial(n, 2)*x^n/n! )^y, where F(x) is e.g.f. of A001187.
T(n,k) = Sum_{q=0..n-1} C(n-1, q) T(q, k-1) 2^C(n-q,2) - Sum_{q=0..n-2} C(n-1, q) T(q+1, k) 2^C(n-1-q, 2) where T(0,0) = 1 and T(0,k) = 0 and T(n,0) = 0. - Marko Riedel, Feb 04 2019
Sum_{k=1..n} k * T(n,k) = A125207(n) - Alois P. Heinz, Feb 02 2024

A033185 Rooted tree triangle read by rows: a(n,k) = number of forests with n nodes and k rooted trees.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 9, 6, 3, 1, 1, 20, 16, 7, 3, 1, 1, 48, 37, 18, 7, 3, 1, 1, 115, 96, 44, 19, 7, 3, 1, 1, 286, 239, 117, 46, 19, 7, 3, 1, 1, 719, 622, 299, 124, 47, 19, 7, 3, 1, 1, 1842, 1607, 793, 320, 126, 47, 19, 7, 3, 1, 1, 4766, 4235, 2095, 858, 327, 127, 47, 19, 7, 3, 1, 1
Offset: 1

Views

Author

Keywords

Comments

Leading column: A000081, rows sums: A000081 shifted.
Also, number of multigraphs of k components, n nodes, and no cycles except one loop in each component. See link below to have a picture showing the bijection between rooted forests and multigraphs of this kind. - Washington Bomfim, Sep 04 2010
Number of rooted trees with n+1 nodes and degree of the root is k.- Michael Somos, Aug 20 2018

Examples

			Triangle begins:
     1;
     1,    1;
     2,    1,   1;
     4,    3,   1,   1;
     9,    6,   3,   1,   1;
    20,   16,   7,   3,   1,  1;
    48,   37,  18,   7,   3,  1,  1;
   115,   96,  44,  19,   7,  3,  1,  1;
   286,  239, 117,  46,  19,  7,  3,  1,  1;
   719,  622, 299, 124,  47, 19,  7,  3,  1,  1;
  1842, 1607, 793, 320, 126, 47, 19,  7,  3,  1,  1;
		

Crossrefs

Cf. A000081, A005197, A106240, A181360, A027852 (2nd column), A000226 (3rd column), A029855 (4th column), A336087.

Programs

  • Maple
    with(numtheory):
    t:= proc(n) option remember; local d, j; `if` (n<=1, n,
          (add(add(d*t(d), d=divisors(j))*t(n-j), j=1..n-1))/(n-1))
        end:
    b:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
          `if`(min(i, p)<1, 0, add(b(n-i*j, i-1, p-j) *
           binomial(t(i)+j-1, j), j=0..min(n/i, p)))))
        end:
    a:= (n, k)-> b(n, n, k):
    seq(seq(a(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Aug 20 2012
  • Mathematica
    nn=10;f[x_]:=Sum[a[n]x^n,{n,0,nn}];sol=SolveAlways[0 == Series[f[x]-x Product[1/(1-x^i)^a[i],{i,1,nn}],{x,0,nn}],x];a[0]=0;g=Table[a[n],{n,1,nn}]/.sol//Flatten;h[list_]:=Select[list,#>0&];Map[h,Drop[CoefficientList[Series[x Product[1/(1-y x^i)^g[[i]],{i,1,nn}],{x,0,nn}],{x,y}],2]]//Grid  (* Geoffrey Critzer, Nov 17 2012 *)
    t[1] = 1; t[n_] := t[n] = Module[{d, j}, Sum[Sum[d*t[d], {d, Divisors[j]}]*t[n-j], {j, 1, n-1}]/(n-1)]; b[1, 1, 1] = 1; b[n_, i_, p_] := b[n, i, p] = If[p>n, 0, If[n == 0, 1, If[Min[i, p]<1, 0, Sum[b[n-i*j, i-1, p-j]*Binomial[t[i]+j-1, j], {j, 0, Min[n/i, p]}]]]]; a[n_, k_] := b[n, n, k]; Table[a[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 13 2014, after Alois P. Heinz *)

Formula

G.f.: 1/Product_{i>=1} (1-x*y^i)^A000081(i). - Vladeta Jovovic, Apr 28 2005
a(n, k) = sum over the partitions of n, 1M1 + 2M2 + ... + nMn, with exactly k parts, of Product_{i=1..n} binomial(A000081(i)+Mi-1, Mi). - Washington Bomfim, May 12 2005

A105599 Triangle read by rows: T(n, m) = number of forests with n nodes and m labeled trees. Also number of forests with exactly n - m edges on n labeled nodes.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 16, 15, 6, 1, 125, 110, 45, 10, 1, 1296, 1080, 435, 105, 15, 1, 16807, 13377, 5250, 1295, 210, 21, 1, 262144, 200704, 76608, 18865, 3220, 378, 28, 1, 4782969, 3542940, 1316574, 320544, 55755, 7056, 630, 36, 1, 100000000, 72000000, 26100000, 6258000, 1092105, 143325, 14070, 990, 45, 1
Offset: 1

Views

Author

Washington Bomfim, Apr 14 2005; revised May 19 2005

Keywords

Comments

Row sums equal A001858 (number of forests of labeled trees with n nodes).
Also the Bell transform of A000272(n+1). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 27 2016
The permutohedron (convex hull of permutations on 1,...,n in R^n) has Ehrhart polynomial Sum_{k=0..n-1} T(n,n-k) t^k. - Matthieu Josuat-Vergès, Mar 31 2018

Examples

			T(3, 2) = 3 because there are 3 such forests with 3 nodes and 2 trees.
Triangle begins:
      1;
      1,     1;
      3,     3,    1;
     16,    15,    6,    1;
    125,   110,   45,   10,   1;
   1296,  1080,  435,  105,  15,  1;
  16807, 13377, 5250, 1295, 210, 21, 1;
		

References

  • B. Bollobas, Graph Theory - An Introductory Course (Springer-Verlag, New York, 1979)

Crossrefs

Rows reflected give A138464. - Alois P. Heinz, Sep 10 2008
T(2n,n) gives A302112.

Programs

  • GAP
    Flat(List([1..11],n->List([1..n],m->(1/Factorial(m)*Sum([0..m],j->(-1/2)^j*Binomial(m,j)*Binomial(n-1,m+j-1)*n^(n-m-j)*Factorial(m+j)))))); # Muniru A Asiru, Apr 01 2018
  • Maple
    T:= proc(n,m) option remember;
          if n<0 then 0
        elif n=m then 1
        elif m<1 or m>n then 0
        else add(binomial(n-1,j-1)*j^(j-2)*T(n-j,m-1), j=1..n-m+1)
          fi
        end:
    seq(seq(T(n, m), m=1..n), n=1..12); # Alois P. Heinz, Sep 10 2008
    # The function BellMatrix is defined in A264428.
    # Adds (1,0,0,0, ..) as column 0.
    BellMatrix(n -> (n+1)^(n-1), 9); # Peter Luschny, Jan 27 2016
  • Mathematica
    f[list_]:=Select[list,#>0&];Flatten[Map[f, Transpose[Table[t = Sum[n^(n - 2) x^n/n!, {n, 1, 20}];Drop[Range[0, 8]! CoefficientList[Series[t^k/k!, {x, 0, 8}], x],1], {k, 1, 8}]]]] (* Geoffrey Critzer, Nov 22 2011 *)
    T[n_, m_] := Sum[(-1/2)^j*Binomial[m, j]*Binomial[n-1, m+j-1]*n^(n-m-j)*(m + j)!, {j, 0, m}]/m!; Table[T[n, m], {n, 1, 10}, {m, 1, n}] // Flatten (* Jean-François Alcover, Jan 09 2016, after Max Alekseyev *)
    rows = 10;
    t = Table[(n+1)^(n-1), {n, 0, rows}];
    T[n_, k_] := BellY[n, k, t];
    Table[T[n, k], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 22 2018, after Peter Luschny *)
  • PARI
    { T(n,m) = sum(j=0,m, (-1/2)^j * binomial(m,j) * binomial(n-1,m+j-1) * n^(n-m-j)* (m+j)! )/m! } /* Max Alekseyev, Oct 08 2014 */
    

Formula

T(n,m) = Sum_{k=1..n-m+1} binomial(n-1,k-1)*k^(k-2)*T(n-k,m-1), T(n,0) = 0 if n > 0, T(0,0) = 1. - Vladeta Jovovic and Washington Bomfim
The value of T(n, m) can be calculated by the formula in Bollobas, pp. 172, exercise 44. Also T(n, m) = sum N/D over the partitions of n, 1*K(1) + 2*K(2) + ... + n*K(n), with exactly m parts, where N = n! * Product_{i = 1..n} i^( (i-2) * K(i) ) and D = Product_{i = 1..n} ( K(i)! * (i!)^K(i) ).
From Peter Bala, Aug 14 2012: (Start)
E.g.f.: A(x,t) := exp(t*F(x)) = 1 + t*x + (t + t^2)*x^2/2! + (3*t + 3*t^2 + t^3)*x^3/3! + ..., where F(x) = sum {n >= 1} n^(n-2)*x^n/n! is the e.g.f. for labeled trees (see A000272). The row polynomials R(n,t) are thus a sequence of binomial type polynomials.
Differentiating A(x,t) w.r.t. x yields A'(x,t) = t*A(x,t)*F'(x) leading to the recurrence equation for the row polynomials R(n,t) = t*sum {k = 0..n-1} (k+1)^(k-1)*binomial(n-1,k)*R(n-k-1,t) with R(0,t) = 1 and R(1,t) = t: the above recurrence for the table entries follows from this.
(End)
T(n,m) = (1/m!) * Sum_{j=0..m} (-1/2)^j * binomial(m,j) * binomial(n-1,m+j-1) * n^(n-m-j)* (m+j)!. Due to A. Renyi. - Max Alekseyev, Oct 08 2014
T(n,m) = (n!/m!)*Sum_{k_1+...+k_m=n, k_i>=1} Product_{j=1..m} k_j^(k_j-2)/k_j!. See Britikov reference. - Roland Vincze, Apr 18 2020

A095133 Triangle of numbers of forests on n nodes containing k trees.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 2, 1, 1, 6, 6, 4, 2, 1, 1, 11, 11, 7, 4, 2, 1, 1, 23, 23, 14, 8, 4, 2, 1, 1, 47, 46, 29, 15, 8, 4, 2, 1, 1, 106, 99, 60, 32, 16, 8, 4, 2, 1, 1, 235, 216, 128, 66, 33, 16, 8, 4, 2, 1, 1, 551, 488, 284, 143, 69, 34, 16, 8, 4, 2, 1, 1, 1301, 1121, 636, 315, 149, 70, 34, 16, 8, 4, 2, 1, 1
Offset: 1

Views

Author

Eric W. Weisstein, May 29 2004

Keywords

Comments

Row sums are A005195.
For k > n/2, T(n,k) = T(n-1,k-1). - Geoffrey Critzer, Oct 13 2012

Examples

			Triangle begins:
    1;
    1,  1;
    1,  1,  1;
    2,  2,  1,  1;
    3,  3,  2,  1,  1;
    6,  6,  4,  2,  1, 1;
   11, 11,  7,  4,  2, 1, 1;
   23, 23, 14,  8,  4, 2, 1, 1;
   47, 46, 29, 15,  8, 4, 2, 1, 1;
  106, 99, 60, 32, 16, 8, 4, 2, 1, 1;
  ...
		

Crossrefs

Cf. A005195 (row sums), A005196, A106240, A000055 (first column), A274937 (2nd column), A105821.
Limiting sequence of reversed rows gives A215930.
Reflected table is A136605. - Alois P. Heinz, Apr 11 2014

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; local d, j; `if` (n<=1, n,
          (add(add(d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/(n-1))
        end:
    t:= proc(n) option remember; local k; `if` (n=0, 1,
          b(n)-(add(b(k)*b(n-k), k=0..n)-`if`(irem(n, 2)=0, b(n/2), 0))/2)
        end:
    g:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
          `if`(min(i, p)<1, 0, add(g(n-i*j, i-1, p-j) *
           binomial(t(i)+j-1, j), j=0..min(n/i, p)))))
        end:
    a:= (n, k)-> g(n, n, k):
    seq(seq(a(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Aug 20 2012
  • Mathematica
    nn=30;s[n_,k_]:=s[n,k]=a[n+1-k]+If[n<2k,0,s[n-k,k]];a[1]=1;a[n_]:=a[n]=Sum[a[i]s[n-1,i]i,{i,1,n-1}]/(n-1);ft=Table[a[i]-Sum[a[j]a[i-j],{j,1,i/2}]+If[OddQ[i],0,a[i/2](a[i/2]+1)/2],{i,1,nn}];CoefficientList[Series[Product[1/(1-y x^i)^ft[[i]],{i,1,nn}],{x,0,20}],{x,y}]//Grid (* Geoffrey Critzer, Oct 13 2012, after code given by Robert A. Russell in A000055 *)

Formula

T(n, k) = sum over the partitions of n, 1M1 + 2M2 + ... + nMn, with exactly k parts, of Product_{i=1..n} binomial(A000055(i) + Mi - 1, Mi). - Washington Bomfim, May 12 2005

Extensions

More terms from Vladeta Jovovic, Jun 03 2004

A201922 Triangle read by rows: T(n,m) = number of unlabeled graphs on n nodes with m connected components, m = 1,2,...,n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 6, 3, 1, 1, 21, 8, 3, 1, 1, 112, 30, 9, 3, 1, 1, 853, 145, 32, 9, 3, 1, 1, 11117, 1028, 154, 33, 9, 3, 1, 1, 261080, 12320, 1065, 156, 33, 9, 3, 1, 1, 11716571, 274806, 12513, 1074, 157, 33, 9, 3, 1, 1, 1006700565, 12007355, 276114, 12550, 1076, 157, 33, 9, 3, 1, 1
Offset: 1

Views

Author

Max Alekseyev, Dec 06 2011

Keywords

Examples

			Triangle starts:
    1
    1   1
    2   1   1
    6   3   1   1
   21   8   3   1   1
  112  30   9   3   1   1
  853 145  32   9   3   1   1 ...
		

Crossrefs

Cf. A001349 (first column), A000088 (row sum), A201968 (limits in the diagonals), A106240, A274934 (2nd column).

Programs

  • Mathematica
    nn=10; c=(A000088=Table[NumberOfGraphs[n], {n,0,nn}]; f[x_] = 1-Product[1/(1-x^k)^a[k], {k,1,nn}]; a[0]=a[1]=a[2]=1; coes=CoefficientList[Series[f[x], {x,0,nn}], x]; sol=First[Solve[Thread[Rest[coes+A000088]==0]]]; Table[a[n], {n,0,nn}]/.sol); f[list_]:=Select[list,#>0&]; g=Product[1/(1-y x^n)^c[[n+1]], {n,1,nn}]; Map[f, Drop[CoefficientList[Series[g, {x,0,nn}], {x,y}],1]] //Flatten (* Geoffrey Critzer, Apr 19 2012  (c in above Mma code is given by Jean Francois Alcover in A001349) *)

Formula

T(n,m) = sum over the partitions of n with m parts: 1*K1 + 2*K2 + ... + n*Kn = n, K1 + K2 + ... + Kn = m, of Product_{i=1..n} binomial(A001349(i) + Ki - 1, Ki).
O.g.f.: Product_{n>=1} 1/(1 - y*x^n)^A001349(n). - Geoffrey Critzer, Apr 19 2012

A058737 Main diagonal of A058735.

Original entry on oeis.org

1, 1, 3, 7, 20, 55, 162, 477, 1450, 4446, 13858, 43589, 138515, 443487, 1430261, 4640312, 15137893, 49620637, 163360133, 539904503, 1790699059, 5958280016, 19883532941, 66532519727, 223177199775, 750340752081, 2528058240115
Offset: 2

Views

Author

N. J. A. Sloane, Jan 01 2001

Keywords

Comments

Also the number of unlabeled cographs on n nodes with two components. - Vladeta Jovovic, May 07 2005

References

  • J. Riordan, The blossoming of Schroeder's fourth problem, Acta Math., 137 (1976), 1-16.

Crossrefs

Formula

G.f.: A(x) = (B(x)^2 + B(x^2))/2, where B(x) = g.f. for A000669. - Vladeta Jovovic, May 07 2005

Extensions

More terms from Vladeta Jovovic, May 07 2005

A106834 Triangle read by rows: T(n, m) = number of painted forests on labeled vertex set [n] with m trees. Also number of painted forests with exactly n - m edges.

Original entry on oeis.org

1, 1, 2, 3, 6, 3, 16, 30, 18, 4, 125, 220, 135, 40, 5, 1296, 2160, 1305, 420, 75, 6, 16807, 26754, 15750, 5180, 1050, 126, 7, 262144, 401408, 229824, 75460, 16100, 2268, 196, 8, 4782969, 7085880, 3949722, 1282176, 278775, 42336, 4410, 288, 9
Offset: 1

Views

Author

Washington Bomfim, May 19 2005

Keywords

Comments

Row sums equal A101313 (Number of painted forests - exactly one of its trees is painted - on labeled vertex set [n].).

Examples

			T(4,3) = 18 because there are 18 such forests with 4 nodes and 3 trees. (See the illustration of this sequence).
Triangle begins:
1;
1,         2;
3,         6,     3;
16,       30,    18,    4;
125,     220,   135,   40,    5;
1296,   2160,  1305,  420,   75,   6;
16807, 26754, 15750, 5180, 1050, 126,  7;
		

Crossrefs

Programs

  • Maple
    f:= proc(n,m) option remember;
          if n<0 then 0
        elif n=m then 1
        elif m<1 or m>n then 0
        else add(binomial(n-1,j-1) *j^(j-2) *f(n-j,m-1), j=1..n-m+1)
          fi
        end:
    T:= (n,m)-> m*f(n,m):
    seq(seq(T(n, m), m=1..n), n=1..12); # Alois P. Heinz, Sep 10 2008
  • Mathematica
    f[n_, m_] := f[n, m] = Which[n<0, 0, n == m, 1, m<1 || m>n, 0, True, Sum[ Binomial[n-1, j-1]*j^(j-2)*f[n-j, m-1], {j, 1, n-m+1}]]; T[n_, m_] := m*f[n, m]; Table[Table[T[n, m], {m, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Feb 25 2015, after Alois P. Heinz *)

Formula

T(n, m)= m * f(n, m), where f(n, m) = number of forests with n nodes and m labeled trees, A105599.
E.g.f.: y*B(x)*exp(y*B(x)), where B(x) is e.g.f. for A000272. - Vladeta Jovovic, May 24 2005

A106606 G.f.: 1/Product_{k>0} (1-x^k)^A000669(k+1).

Original entry on oeis.org

1, 1, 3, 8, 23, 66, 199, 601, 1861, 5815, 18396, 58684, 188764, 611103, 1990361, 6515786, 21429510, 70767468, 234565319, 780086526, 2602209961, 8704547698, 29191435328, 98125474137, 330558122499, 1115795428615, 3773380090126, 12782934685768, 43374552366876
Offset: 0

Views

Author

Washington Bomfim and Vladeta Jovovic, May 10 2005

Keywords

Comments

k-th row of A058735 as k tends to infinity.

Crossrefs

Cf. A106240.

Extensions

More terms from R. J. Mathar, Feb 13 2008
Showing 1-8 of 8 results.