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-10 of 22 results. Next

A000272 Number of trees on n labeled nodes: n^(n-2) with a(0)=1.

Original entry on oeis.org

1, 1, 1, 3, 16, 125, 1296, 16807, 262144, 4782969, 100000000, 2357947691, 61917364224, 1792160394037, 56693912375296, 1946195068359375, 72057594037927936, 2862423051509815793, 121439531096594251776, 5480386857784802185939, 262144000000000000000000, 13248496640331026125580781
Offset: 0

Views

Author

Keywords

Comments

Number of spanning trees in complete graph K_n on n labeled nodes.
Robert Castelo, Jan 06 2001, observes that n^(n-2) is also the number of transitive subtree acyclic digraphs on n-1 vertices.
a(n) is also the number of ways of expressing an n-cycle in the symmetric group S_n as a product of n-1 transpositions, see example. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 12 2001
Also counts parking functions, critical configurations of the chip firing game, allowable pairs sorted by a priority queue [Hamel].
The parking functions of length n can be described as all permutations of all words [d(1),d(2), ..., d(n)] where 1 <= d(k) <= k; see example. There are (n+1)^(n-1) = a(n+1) parking functions of length n. - Joerg Arndt, Jul 15 2014
a(n+1) is the number of endofunctions with no cycles of length > 1; number of forests of rooted labeled trees on n vertices. - Mitch Harris, Jul 06 2006
a(n) is also the number of nilpotent partial bijections (of an n-element set). Equivalently, the number of nilpotents in the partial symmetric semigroup, P sub n. - Abdullahi Umar, Aug 25 2008
a(n) is also the number of edge-labeled rooted trees on n nodes. - Nikos Apostolakis, Nov 30 2008
a(n+1) is the number of length n sequences on an alphabet of {1,2,...,n} that have a partial sum equal to n. For example a(4)=16 because there are 16 length 3 sequences on {1,2,3} in which the terms (beginning with the first term and proceeding sequentially) sum to 3 at some point in the sequence. {1, 1, 1}, {1, 2, 1}, {1, 2, 2}, {1, 2, 3}, {2, 1, 1}, {2, 1, 2}, {2, 1, 3}, {3, 1, 1}, {3, 1, 2}, {3, 1, 3}, {3, 2, 1}, {3, 2, 2}, {3, 2, 3}, {3, 3, 1}, {3, 3, 2}, {3, 3, 3}. - Geoffrey Critzer, Jul 20 2009
a(n) is the number of acyclic functions from {1,2,...,n-1} to {1,2,...,n}. An acyclic function f satisfies the following property: for any x in the domain, there exists a positive integer k such that (f^k)(x) is not in the domain. Note that f^k denotes the k-fold composition of f with itself, e.g., (f^2)(x)=f(f(x)). - Dennis P. Walsh, Mar 02 2011
a(n) is the absolute value of the discriminant of the polynomial x^{n-1}+...+x+1. More precisely, a(n) = (-1)^{(n-1)(n-2)/2} times the discriminant. - Zach Teitler, Jan 28 2014
For n > 2, a(n+2) is the number of nodes in the canonical automaton for the affine Weyl group of type A_n. - Tom Edgar, May 12 2016
The tree formula a(n) = n^(n-2) is due to Cayley (see the first comment). - Jonathan Sondow, Jan 11 2018
a(n) is the number of topologically distinct lines of play for the game Planted Brussels Sprouts on n vertices. See Ji and Propp link. - Caleb Ji, May 11 2018
a(n+1) is also the number of bases of R^n, that can be made from the n(n+1)/2 vectors of the form [0 ... 0 1 ... 1 0 ... 0]^T, where the initial or final zeros are optional, but at least one 1 has to be included. - Nicolas Nagel, Jul 31 2018
Cooper et al. show that every connected k-chromatic graph contains at least k^(k-2) spanning trees. - Michel Marcus, May 14 2020

Examples

			a(7)=matdet([196, 175, 140, 98, 56, 21; 175, 160, 130, 92, 53, 20; 140, 130, 110, 80, 47, 18; 98, 92, 80, 62, 38, 15; 56, 53, 47, 38, 26, 11; 21, 20, 18, 15, 11, 6])=16807
a(3)=3 since there are 3 acyclic functions f:[2]->[3], namely, {(1,2),(2,3)}, {(1,3),(2,1)}, and {(1,3),(2,3)}.
From _Joerg Arndt_ and Greg Stevenson, Jul 11 2011: (Start)
The following products of 3 transpositions lead to a 4-cycle in S_4:
  (1,2)*(1,3)*(1,4);
  (1,2)*(1,4)*(3,4);
  (1,2)*(3,4)*(1,3);
  (1,3)*(1,4)*(2,3);
  (1,3)*(2,3)*(1,4);
  (1,4)*(2,3)*(2,4);
  (1,4)*(2,4)*(3,4);
  (1,4)*(3,4)*(2,3);
  (2,3)*(1,2)*(1,4);
  (2,3)*(1,4)*(2,4);
  (2,3)*(2,4)*(1,2);
  (2,4)*(1,2)*(3,4);
  (2,4)*(3,4)*(1,2);
  (3,4)*(1,2)*(1,3);
  (3,4)*(1,3)*(2,3);
  (3,4)*(2,3)*(1,2).  (End)
The 16 parking functions of length 3 are 111, 112, 121, 211, 113, 131, 311, 221, 212, 122, 123, 132, 213, 231, 312, 321. - _Joerg Arndt_, Jul 15 2014
G.f. = 1 + x + x^2 + 3*x^3 + 16*x^4 + 125*x^5 + 1296*x^6 + 16807*x^7 + ...
		

References

  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 1999; see p. 142.
  • Anders Björner and Francesco Brenti, Combinatorics of Coxeter groups. Graduate Texts in Mathematics, 231. Springer, New York, 2005.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 311.
  • J. Dénes, The representation of a permutation as the product of a minimal number of transpositions and its connection with the theory of graphs, Pub. Math. Inst. Hung. Acad. Sci., 4 (1959), 63-70.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983, ex. 3.3.33.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 524.
  • F. Harary, J. A. Kabell, and F. R. McMorris (1992), Subtree acyclic digraphs, Ars Comb., vol. 34:93-95.
  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.2.37)
  • H. Prüfer, Neuer Beweis eines Satzes über Permutationen, Archiv der Mathematik und Physik, (3) 27 (1918), 142-144.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 128.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see page 25, Prop. 5.3.2.
  • J. H. van Lint and R. M. Wilson, A Course in Combinatorics, Cambridge Univ. Press, 1992.

Crossrefs

a(n) = A033842(n-1, 0) (first column of triangle).
a(n) = A058127(n-1, n) (right edge of triangle).
Cf. A000272 (labeled trees), A036361 (labeled 2-trees), A036362 (labeled 3-trees), A036506 (labeled 4-trees), A000055 (unlabeled trees), A054581 (unlabeled 2-trees).
Column m=1 of A105599. - Alois P. Heinz, Apr 10 2014

Programs

  • Haskell
    a000272 0 = 1; a000272 1 = 1
    a000272 n = n ^ (n - 2)  -- Reinhard Zumkeller, Jul 07 2013
    
  • Magma
    [ n^(n-2) : n in [1..10]]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Maple
    A000272 := n -> ifelse(n=0, 1, n^(n-2)): seq(A000272(n), n = 0..20); # Peter Luschny, Jun 12 2022
  • Mathematica
    << DiscreteMath`Combinatorica` Table[NumberOfSpanningTrees[CompleteGraph[n]], {n, 1, 20}] (* Artur Jasinski, Dec 06 2007 *)
    Join[{1},Table[n^(n-2),{n,20}]] (* Harvey P. Dale, Nov 28 2012 *)
    a[ n_] := If[ n < 1, Boole[n == 0], n^(n - 2)]; (* Michael Somos, May 25 2014 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ 1 - LambertW[-x] - LambertW[-x]^2 / 2, {x, 0, n}]]; (* Michael Somos, May 25 2014 *)
    a[ n_] := If[ n < 1, Boole[n == 0], With[ {m = n - 1}, m! SeriesCoefficient[ Exp[ -LambertW[-x]], {x, 0, m}]]]; (* Michael Somos, May 25 2014 *)
    a[ n_] := If[ n < 2, Boole[n >= 0], With[ {m = n - 1}, m! SeriesCoefficient[ InverseSeries[ Series[ Log[1 + x] / (1 + x), {x, 0, m}]], m]]]; (* Michael Somos, May 25 2014 *)
    a[ n_] := If[ n < 1, Boole[n == 0], With[ {m = n - 1}, m! SeriesCoefficient[ Nest[ 1 + Integrate[ #^2 / (1 - x #), x] &, 1 + O[x], m], {x, 0, m}]]]; (* Michael Somos, May 25 2014 *)
  • Maxima
    A000272[n]:=if n=0 then 1 else n^(n-2)$
    makelist(A000272[n],n,0,30); /* Martin Ettl, Oct 29 2012 */
    
  • PARI
    {a(n) = if( n<1, n==0, n^(n-2))}; /* Michael Somos, Feb 16 2002 */
    
  • PARI
    {a(n) = my(A); if( n<1, n==0, n--; A = 1 + O(x); for(k=1, n, A = 1 + intformal( A^2 / (1 - x * A))); n! * polcoeff( A, n))}; /* Michael Somos, May 25 2014 */
    
  • PARI
    /* GP Function for Determinant of Hermitian (square symmetric) matrix for univariate polynomial of degree n by Gerry Martens: */
    Hn(n=2)= {local(H=matrix(n-1,n-1),i,j); for(i=1,n-1, for(j=1,i, H[i,j]=(n*i^3-3*n*(n+1)*i^2/2+n*(3*n+1)*i/2+(n^4-n^2)/2)/6-(i^2-(2*n+1)*i+n*(n+1))*(j-1)*j/4; H[j,i]=H[i,j]; ); ); print("a(",n,")=matdet(",H,")"); print("Determinant H =",matdet(H)); return(matdet(H)); } { print(Hn(7)); } /* Gerry Martens, May 04 2007 */
    
  • Python
    def A000272(n): return 1 if n <= 1 else n**(n-2) # Chai Wah Wu, Feb 03 2022

Formula

E.g.f.: 1 + T - (1/2)*T^2; where T=T(x) is Euler's tree function (see A000169, also A001858). - Len Smiley, Nov 19 2001
Number of labeled k-trees on n nodes is binomial(n, k) * (k*(n-k)+1)^(n-k-2).
E.g.f. for b(n)=a(n+2): ((W(-x)/x)^2)/(1+W(-x)), where W is Lambert's function (principal branch). [Equals d/dx (W(-x)/(-x)). - Wolfdieter Lang, Oct 25 2022]
Determinant of the symmetric matrix H generated for a polynomial of degree n by: for(i=1,n-1, for(j=1,i, H[i,j]=(n*i^3-3*n*(n+1)*i^2/2+n*(3*n+1)*i/2+(n^4-n^2)/2)/6-(i^2-(2*n+1)*i+n*(n+1))*(j-1)*j/4; H[j,i]=H[i,j]; ); );. - Gerry Martens, May 04 2007
a(n+1) = Sum_{i=1..n} i * n^(n-1-i) * binomial(n, i). - Yong Kong (ykong(AT)curagen.com), Dec 28 2000
For n >= 1, a(n+1) = Sum_{i=1..n} n^(n-i)*binomial(n-1,i-1). - Geoffrey Critzer, Jul 20 2009
E.g.f. for b(n)=a(n+1): exp(-W(-x)), where W is Lambert's function satisfying W(x)*exp(W(x))=x. Proof is contained in link "Notes on acyclic functions..." - Dennis P. Walsh, Mar 02 2011
From Sergei N. Gladkovskii, Sep 18 2012: (Start)
E.g.f.: 1 + x + x^2/(U(0) - x) where U(k) = x*(k+1)*(k+2)^k + (k+1)^k*(k+2) - x*(k+2)^2*(k+3)*((k+1)*(k+3))^k/U(k+1); (continued fraction).
G.f.: 1 + x + x^2/(U(0)-x) where U(k) = x*(k+1)*(k+2)^k + (k+1)^k - x*(k+2)*(k+3)*((k+1)*(k+3))^k/E(k+1); (continued fraction). (End)
Related to A000254 by Sum_{n >= 1} a(n+1)*x^n/n! = series reversion( 1/(1 + x)*log(1 + x) ) = series reversion(x - 3*x^2/2! + 11*x^3/3! - 50*x^4/4! + ...). Cf. A052750. - Peter Bala, Jun 15 2016
For n >= 3 and 2 <= k <= n-1, the number of trees on n vertices with exactly k leaves is binomial(n,k)*S(n-2,n-k)(n-k)! where S(a,b) is the Stirling number of the second kind. Therefore a(n) = Sum_{k=2..n-1} binomial(n,k)*S(n-2,n-k)(n-k)! for n >= 3. - Jonathan Noel, May 05 2017

A088956 Triangle, read by rows, of coefficients of the hyperbinomial transform.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 16, 9, 3, 1, 125, 64, 18, 4, 1, 1296, 625, 160, 30, 5, 1, 16807, 7776, 1875, 320, 45, 6, 1, 262144, 117649, 27216, 4375, 560, 63, 7, 1, 4782969, 2097152, 470596, 72576, 8750, 896, 84, 8, 1, 100000000, 43046721, 9437184, 1411788, 163296, 15750
Offset: 0

Views

Author

Paul D. Hanna, Oct 26 2003

Keywords

Comments

The hyperbinomial transform of a sequence {b} is defined to be the sequence {d} given by d(n) = Sum_{k=0..n} T(n,k)*b(k), where T(n,k) = (n-k+1)^(n-k-1)*C(n,k).
Given a table in which the n-th row is the n-th binomial transform of the first row, then the hyperbinomial transform of any diagonal results in the next lower diagonal in the table.
The simplest example of a table of iterated binomial transforms is A009998, with a main diagonal of {1,2,9,64,625,...}; and the hyperbinomial transform of this diagonal gives the next lower diagonal, {1,3,16,125,1296,...}, since 1=(1)*1, 3=(1)*1+(1)*2, 16=(3)*1+(2)*2+(1)*9, 125=(16)*1+(9)*2+(3)*9+(1)*64, etc.
Another example: the hyperbinomial transform maps A065440 into A055541, since HYPERBINOMIAL([1,1,1,8,81,1024,15625]) = [1,2,6,36,320,3750,54432] where e.g.f.: A065440(x)+x = x-x/( LambertW(-x)*(1+LambertW(-x)) ), e.g.f.: A055541(x) = x-x*LambertW(-x).
The m-th iteration of the hyperbinomial transform is given by the triangle of coefficients defined by T_m(n,k) = m*(n-k+m)^(n-k-1)*binomial(n,k).
Example: PARI code for T_m: {a=[1,1,1,8,81,1024,15625]; m=1; b=vector(length(a)); for(n=0,length(a)-1, b[n+1]=sum(k=0,n, m*(n-k+m)^(n-k-1)*binomial(n,k)*a[k+1]); print1(b[n+1],","))} RETURNS b=[1,2,6,36,320,3750,54432].
The INVERSE hyperbinomial transform is thus given by m=-1: {a=[1,2,6,36,320,3750,54432]; m=-1; b=vector(length(a)); for(n=0,length(a)-1, b[n+1]=sum(k=0,n, m*(n-k+m)^(n-k-1)*binomial(n,k)*a[k+1]); print1(b[n+1],","))} RETURNS b=[1,1,1,8,81,1024,15625].
Simply stated, the HYPERBINOMIAL transform is to -LambertW(-x)/x as the BINOMIAL transform is to exp(x).
Let A[n] be the set of all forests of labeled rooted trees on n nodes. Build a superset B[n] of A[n] by designating "some" (possibly all or none) of the isolated nodes in each forest. T(n,k) is the number of elements in B[n] with exactly k designated nodes. See A219034. - Geoffrey Critzer, Nov 10 2012

Examples

			Rows begin:
       {1},
       {1,      1},
       {3,      2,     1},
      {16,      9,     3,    1},
     {125,     64,    18,    4,   1},
    {1296,    625,   160,   30,   5,  1},
   {16807,   7776,  1875,  320,  45,  6, 1},
  {262144, 117649, 27216, 4375, 560, 63, 7, 1}, ...
		

Crossrefs

Cf. A088957 (row sums), A000272 (first column), A009998, A105599, A132440, A215534 (matrix inverse), A215652.
Cf. A227325 (central terms).

Programs

  • Haskell
    a088956 n k =  a095890 (n + 1) (k + 1) * a007318' n k `div` (n - k + 1)
    a088956_row n = map (a088956 n) [0..n]
    a088956_tabl = map a088956_row [0..]
    -- Reinhard Zumkeller, Jul 07 2013
  • Mathematica
    nn=8; t=Sum[n^(n-1)x^n/n!, {n,1,nn}]; Range[0,nn]! CoefficientList[Series[Exp[t+y x] ,{x,0,nn}], {x,y}] //Grid (* Geoffrey Critzer, Nov 10 2012 *)

Formula

T(n, k) = (n-k+1)^(n-k-1)*C(n, k).
E.g.f.: -LambertW(-x)*exp(x*y)/x. - Vladeta Jovovic, Oct 27 2003
From Peter Bala, Sep 11 2012: (Start)
Let T(x) = Sum_{n >= 0} n^(n-1)*x^n/n! denote the tree function of A000169. The e.g.f. is (T(x)/x)*exp(t*x) = exp(T(x))*exp(t*x) = 1 + (1 + t)*x + (3 + 2*t + t^2)*x^2/2! + .... Hence the triangle is the exponential Riordan array [T(x)/x,x] belonging to the exponential Appell group.
The matrix power (A088956)^r has the e.g.f. exp(r*T(x))*exp(t*x) with triangle entries given by r*(n-k+r)^(n-k-1)*binomial(n,k) for n and k >= 0. See A215534 for the case r = -1.
Let A(n,x) = x*(x+n)^(n-1) be an Abel polynomial. The present triangle is the triangle of connection constants expressing A(n,x+1) as a linear combination of the basis polynomials A(k,x), 0 <= k <= n. For example, A(4,x+1) = 125*A(0,x) + 64*A(1,x) + 18*A(2,x) + 4*A(3,x) + A(4,x) gives row 4 as [125,64,18,4,1].
Let S be the array with the sequence [1,2,3,...] on the main subdiagonal and zeros elsewhere. S is the infinitesimal generator for Pascal's triangle (see A132440). Then the infinitesimal generator for this triangle is S*A088956; that is, A088956 = Exp(S*A088956), where Exp is the matrix exponential.
With T(x) the tree function as above, define E(x) = T(x)/x. Then A088956 = E(S) = Sum_{n>=0} (n+1)^(n-1)*S^n/n!.
For commuting lower unit triangular matrices A and B, we define A raised to the matrix power B, denoted A^^B, to be the matrix Exp(B*log(A)), where the matrix logarithm Log(A) is defined as Sum_{n >= 1} (-1)^(n+1)*(A-1)^n/n. Let P denote Pascal's triangle A007318. Then the present triangle, call it X, solves the matrix equation P^^X = X . See A215652 for the solution to X^^P = P. Furthermore, if we denote the inverse of X by Y then X^^Y = P. As an infinite tower of matrix powers, A088956 = P^^(P^^(P^^(...))).
A088956 augmented with the sequence (x,x,x,...) on the first superdiagonal is the production matrix for the row polynomials of A105599.
(End)
T(n,k) = A095890(n+1,k+1) * A007318(n,k) / (n-k+1), 0 <= k <= n. - Reinhard Zumkeller, Jul 07 2013
Sum_{k = 0..n} T(n,n-k)*(x - k - 1)^(n-k) = x^n. Setting x = n + 1 gives Sum_{k = 0..n} T(n,k)*k^k = (n + 1)^n. - Peter Bala, Feb 17 2017
As lower triangular matrices, this entry, T, equals unsigned A137542 * A007318 * signed A059297. The Pascal matrix is sandwiched between a pair of inverse matrices, so this entry is conjugate to the Pascal matrix, allowing convergent analytic expressions of T, say f(T), to be computed as f(A007318) sandwiched between the inverse pair. - Tom Copeland, Dec 06 2021

A138464 Triangle read by rows: T(n, k) is the number of forests on n labeled nodes with k edges. T(n, k) for n >= 1 and 0 <= k <= n-1.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 09 2008

Keywords

Comments

The rows of the triangle give the coefficients of the Ehrhart polynomials of integral Coxeter permutahedra of type A. These polynomials count lattice points in a dilated lattice polytope. For a definition see Ardila et al. (p. 1158), the generating functions of these polynomials for the classical root systems are given in theorem 5.2 (p. 1163). - Peter Luschny, May 01 2021

Examples

			Triangle begins:
[1]  1;
[2]  1,  1;
[3]  1,  3,   3;
[4]  1,  6,  15,   16;
[5]  1, 10,  45,  110,  125;
[6]  1, 15, 105,  435, 1080,  1296;
[7]  1, 21, 210, 1295, 5250, 13377, 16807;
		

Crossrefs

Row sums give A001858. Rightmost diagonal gives A000272. Cf. A136605.
Rows reflected give A105599. - Alois P. Heinz, Oct 28 2011
Cf. A088956.
Lower diagonals give: A083483, A239910, A240681, A240682, A240683, A240684, A240685, A240686, A240687. - Alois P. Heinz, Apr 11 2014
T(2n,n) gives A302112.
For Ehrhart polynomials of integral Coxeter permutahedra of classical type cf. this sequence (type A), A343805 (type B), A343806 (type C), A343807 (type D).

Programs

  • Maple
    T:= proc(n) option remember; if n=0 then 0 else T(n-1) +n^(n-1) *x^n/n! fi end: TT:= proc(n) option remember; expand(T(n) -T(n)^2/2) end: f:= proc(k) option remember; if k=0 then 1 else unapply(f(k-1)(x) +x^k/k!, x) fi end: A:= proc(n,k) option remember; series(f(k)(TT(n)), x,n+1) end: aa:= (n,k)-> coeff(A(n,k), x,n) *n!: a:= (n,k)-> aa(n,n-k) -aa(n,n-k-1): seq(seq(a(n,k), k=0..n-1), n=1..10);  # Alois P. Heinz, Sep 02 2008
    alias(W = LambertW): EhrA := exp(-W(-t*x)/t - W(-t*x)^2/(2*t)):
    ser := series(EhrA, x, 12): cx := n -> n!*coeff(ser, x, n):
    T := n -> seq(coeff(cx(n), t, k), k=0..n-1):
    seq(T(n), n = 1..10); # Peter Luschny, Apr 30 2021
  • Mathematica
    t[0, 0] = 1; t[n_ /; n >= 1, k_] /; (0 <= k <= n-1) := t[n, k] = Sum[(i+1)^(i-1)*Binomial[n-1, i]*t[n-i-1, k-i], {i, 0, k}]; t[, ] = 0; Table[t[n, k], {n, 1, 10}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Jan 14 2014, after Peter Bala *)
    gf := E^(-(ProductLog[-(t x)] (2 + ProductLog[-(t x)]))/(2 t));
    ser := Series[gf, {x, 0, 12}]; cx[n_] := n! Coefficient[ser, x, n];
    Table[CoefficientList[cx[n], t], {n, 1, 10}] // Flatten  (* Peter Luschny, May 01 2021 *)

Formula

From Peter Bala, Aug 14 2012: (Start)
T(n+1,k) = Sum_{i=0..k} (i+1)^(i-1)*binomial(n,i)*T(n-i,k-i) with T(0,0)=1.
Recurrence equation for row polynomials R(n,t): R(n,t) = Sum_{k=0..n-1} (k+1)^(k-1)*binomial(n-1,k)*t^k*R(n-k-1,t) with R(0,t) = R(1,t) = 1.
The production matrix for the row polynomials of the triangle is obtained from A088956 and starts:
1 t
1 1 t
3 2 1 t
16 9 3 1 t
125 64 18 4 1 t
(End)
E.g.f.: exp( Sum_{n >= 1} n^(n-2)*t^(n-1)*x^n/n! ). - Peter Bala, Nov 08 2015
T(n, k) = [t^k] n! [x^n] exp(-W(-t*x)/t - W(-t*x)^2/(2*t)), where W denotes the Lambert function. - Peter Luschny, Apr 30 2021 [Typo corrected after note from Andrew Howroyd, Peter Luschny, Jun 20 2021]

Extensions

More terms from Alois P. Heinz, Sep 02 2008

A105784 Number of different forests of unrooted trees, without isolated vertices, on n labeled nodes.

Original entry on oeis.org

0, 1, 3, 19, 155, 1641, 21427, 334377, 6085683, 126745435, 2975448641, 77779634571, 2241339267037, 70604384569005, 2414086713172695, 89049201691604881, 3525160713653081279, 149075374211881719939, 6707440248292609651513, 319946143503599791200675
Offset: 1

Views

Author

Washington Bomfim, Apr 21 2005

Keywords

Comments

Number of labeled acyclic graphs covering n vertices. The unlabeled version is A144958. This is the covering case A001858. The connected case is A000272. - Gus Wiseman, Apr 28 2024

Examples

			a(4) = 19 because there are 19 different such forests on 4 labeled nodes: 4^2 are trees, 3 have two trees and none can have more than two trees.
From _Gus Wiseman_, Apr 28 2024: (Start)
Edge-sets of the a(2) = 1 through a(4) = 19 forests:
    12    12,13    12,34
          12,23    13,24
          13,23    14,23
                   12,13,14
                   12,13,24
                   12,13,34
                   12,14,23
                   12,14,34
                   12,23,24
                   12,23,34
                   12,24,34
                   13,14,23
                   13,14,24
                   13,23,24
                   13,23,34
                   13,24,34
                   14,23,24
                   14,23,34
                   14,24,34
(End)
		

Crossrefs

The connected case is A000272, rooted A000169.
This is the covering case of A001858, unlabeled A005195.
The unlabeled version is A144958.
For triangles instead of cycles we have A372168, covering case of A213434.
For a unique cycle we have A372195, covering case of A372193.
A002807 counts cycles in a complete graph.
A006125 counts simple graphs, unlabeled A000088.
A006129 counts covering graphs, unlabeled A002494.
A372170 counts simple graphs by triangles, covering A372167.

Programs

  • Maple
    b:= n-> add(add(binomial(m, j) *binomial(n-1, n-m-j)
            *n^(n-m-j) *(m+j)!/ (-2)^j, j=0..m)/m!, m=0..n):
    a:= n-> add(b(k) *(-1)^(n-k) *binomial(n, k), k=0..n):
    seq(a(n), n=1..17);  # Alois P. Heinz, Sep 10 2008
  • Mathematica
    Unprotect[Power]; 0^0 = 1; b[n_] := Sum[Sum[Binomial[m, j]*Binomial[n-1, n -m-j]*n^(n-m-j)*(m+j)!/(-2)^j, {j, 0, m}]/m!, {m, 0, n}]; a[n_] := Sum[ b[k]*(-1)^(n-k)*Binomial[n, k], {k, 0, n}]; Table[a[n], {n, 1, 17}] (* Jean-François Alcover, Jan 08 2016, after Alois P. Heinz *)

Formula

a(n)= sum N/D over all the partitions of n: 1K1 + 2K2 + ... + nKn, with smallest part greater than 1, where N = n!*Product_{i=1..n}i^((i-2)Ki) and D = Product_{i=1..n}(Ki!(i!)^Ki).
Inverse binomial transform of A001858. E.g.f.: exp(-x-LambertW(-x) -LambertW(-x)^2/2). - Vladeta Jovovic, Apr 22 2005
a(n) ~ exp(-exp(-1)+1/2) * n^(n-2). - Vaclav Kotesovec, Aug 16 2013

A302112 Number of forests with 2n nodes and n labeled trees. Also number of forests with exactly n edges on 2n labeled nodes.

Original entry on oeis.org

1, 1, 15, 435, 18865, 1092105, 79170399, 6899167275, 702495121185, 81857181636945, 10742799174110575, 1568060617808784099, 251983549987815976785, 44207398164005846558425, 8407483858740005340602175, 1722961754698440157865926875, 378507890849998531093971032385
Offset: 0

Views

Author

Alois P. Heinz, Apr 01 2018

Keywords

Comments

From Washington Bomfim, Mar 20 2020: (Start)
Considering the uniform model of graph evolution [see the Flajolet link] with 2n vertices initially isolated, the probability of the occurrence of an acyclic graph at the critical point n is P(n) = a(n) * n! * 2^n / (2n)^(2n). Concerning the permutation model [see same link] the corresponding probability is Pp(n) = a(n) / A331505(2n).
By Kotesovec's approximation of a(n), P(n) ~ c1/n^(1/6), and Pp(n) ~ e^(3/4)* P(n), c1 = 0.577983047665... = (2/3)^(1/3) * sqrt(Pi) / Gamma(1/3).
In both models the presence of cycles in graphs evolving near the critical time should be estimated by the above approximations. (End)

Crossrefs

Programs

  • Maple
    T:= proc(n, m) option remember; `if`(n<0, 0, `if`(n=m, 1,
          `if`(m<1 or m>n, 0, add(binomial(n-1, j-1)*j^(j-2)*
           T(n-j, m-1), j=1..n-m+1))))
        end:
    a:= n-> T(2*n, n):
    seq(a(n), n=0..20);
  • Mathematica
    Flatten[{1, Table[Sum[(-1)^k * Binomial[n, k] * Binomial[2*n - 1, n - k] * 2^(n - 2*k) * n^(n - k) * (n + k)!, {k, 0, n} ] / n!, {n, 1, 20}]}] (* Vaclav Kotesovec, Jul 19 2019 *)
    Table[(-1)^n * HypergeometricPFQ[{1 - 2*n, -n}, {1, -2*n}, 4*n] * (2*n)! / (n!*2^n), {n, 0, 20}] (* Vaclav Kotesovec, Jul 19 2019 *)
    Table[(-1)^n * 2^n * Gamma[n + 1/2] * (2*n*Hypergeometric1F1[1 - n, 2, 4*n] + LaguerreL[n, 4*n]) / Sqrt[Pi], {n, 0, 20}] (* Vaclav Kotesovec, Feb 19 2020 *)

Formula

a(n) = A105599(2*n,n) = A138464(2*n,n).
a(n) ~ c * 2^n * exp(n) * n^(n - 2/3), where c = 0.2305818... = 1 / (2^(1/6) * 3^(1/3) * Gamma(1/3)) [symbolic expression for c is conjectural]. - Vaclav Kotesovec, Jul 20 2019, updated Feb 20 2020
a(n) = (1/n!) * Sum_{j=0..n} (-1/2)^j * binomial(n,j) * binomial(2*n-1,n+j-1) * (2*n)^(n-j) * (n+j)!. - Jon E. Schoenfield, Jan 13 2020
a(n) = (-1)^n * (2*n)! * (Laguerre(n, 4*n) + 2*n*hypergeometric1F1(1 - n, 2, 4*n)) / (n! * 2^n). - Vaclav Kotesovec, Feb 19 2020
a(n) = (A332679(n) - 2*n*A332680(n)) * binomial(2*n, n) / 2^n. - Vaclav Kotesovec, Feb 20 2020
a(n) = (2*n)! * Sum_{P(2*n,n)} Product_{p=1..2*n} f(p)^c_p / (c_p! * p!^c_p), where f(n) = A000272(n) = n^(n-2) and P(2*n,n) are the partitions of 2*n with n parts, 1*c_1 + 2*c_2 + ... + (2*n)*c_n; c_1, c_2, ..., c_(2*n) >= 0.
- Washington Bomfim, Apr 05 2020

A083483 Number of forests with two connected components in the complete graph K_{n}.

Original entry on oeis.org

0, 1, 3, 15, 110, 1080, 13377, 200704, 3542940, 72000000, 1656409535, 42568187904, 1208912928522, 37603105146880, 1271514111328125, 46443371157258240, 1822442358054692408, 76461926986744528896, 3415753581721829617275
Offset: 1

Views

Author

Woong Kook (andrewk(AT)math.uri.edu), Jun 08 2003

Keywords

Comments

Note that the above sequence is dominated by the sequence n^{n-2} (n > 0), A000272, which enumerates the number of spanning trees in K_{n} : 1, 1, 3, 16, 125, 1296, 16807, 262144, ... This is a consequence of the result in [EKT] which shows that the sequence of independent set numbers of cycle matroid of K_{n} is (strictly) monotone increasing (when n > 3).

References

  • W. Kook, Categories of acyclic graphs and automorphisms of free groups, Ph.D. thesis (G. Carlsson, advisor), Stanford University, 1996.

Crossrefs

Column m=2 of A105599. A diagonal of A138464. - Alois P. Heinz, Apr 10 2014

Programs

  • Magma
    [n^(n-4)*(n-1)*(n+6)/2 : n in [1..20]]; // Vincenzo Librandi, Apr 10 2014
    
  • Maple
    f:=n->(n-1)!*n^(n-4)*(n+6)/(2*(n-2)!); [seq(f(n),n=2..30)]; # N. J. A. Sloane, Apr 09 2014
  • Mathematica
    (* first 20 terms starting with n=1 *) T := Sum[i^(i - 2)*(x^i)/i!, {i, 1, 20}]; T2 := Expand[(T^{2})/2! ]; C2[i_] := Coefficient[T2, x^{i}]*i!; M := MatrixForm[Table[C2[i], {i, 20}]]; M
    Table[n^(n - 4) (n - 1) (n + 6)/2, {n, 1, 40}] (* Vincenzo Librandi, Apr 10 2014 *)
  • PARI
    for(n=1,30, print1(n^(n-4)*(n-1)*(n+6)/2, ", ")) \\ G. C. Greubel, Nov 14 2017

Formula

E.g.f.: T(x)^{2}/2!, where T(x) is the e.g.f. for the number of spanning trees in K_{n}, i.e., T(x) = Sum_{i>=1} i^(i-2)*x^i/i!.
E.g.f.: (1/8)*LambertW(-x)^2*(2+LambertW(-x))^2. - Vladeta Jovovic, Jul 08 2003
a(n) = n^(n-4)*(n-1)*(n+6)/2. - Vaclav Kotesovec, Oct 18 2013

Extensions

Edited by N. J. A. Sloane, Apr 09 2014

A105785 Number of different forests of rooted trees, without isolated vertices, on n labeled nodes.

Original entry on oeis.org

1, 0, 2, 9, 76, 805, 10626, 167839, 3091768, 65127465, 1544951350, 40770052411, 1184951084340, 37616775522781, 1295202587597842, 48080003446006575, 1914305438178286576, 81379323738092982097, 3679128029385789284718, 176267238847686913800547
Offset: 0

Views

Author

Washington Bomfim, Apr 21 2005

Keywords

Examples

			a(5) = 805 because there are 625 such trees and 5 vertices can be partitioned in two trees only in one way: 3 go to one tree and 2 go to the other. It's impossible to split 5 vertices in 3 or more trees without giving only one vertex to a tree. Each one of the 3^2 distinct trees on 3 vertices can be labeled in binomial(5,3) ways and to each one of the 9*binomial(5,3) = 90 possibilities there are 2 different trees of order 2, so we get 180 forests of two trees.
		

Crossrefs

Row sums of A105819.

Programs

  • Maple
    a:= proc(n) option remember; if n=0 then 1 else add(binomial(n-1, j) *(j+1)^j *a(n-1-j), j=1..n-1) fi end: seq(a(n), n=0..25); # Alois P. Heinz, Sep 15 2008
  • Mathematica
    nn=20;t=Sum[n^(n-1)x^n/n!,{n,1,nn}];Drop[Range[0,nn]!CoefficientList[ Series[Exp[t-x] ,{x,0,nn}],x],1]  (* Geoffrey Critzer, Nov 10 2012 *)

Formula

a(n) = sum N/D over all the partitions of n: 1K1 + 2K2 + ... + nKn, with smallest part greater than 1, where N = n!*Product_{i=1..n} i^((i-1)Ki) and D = Product_{i=1..n} (Ki!(i!)^Ki).
E.g.f.: -exp(-x)*LambertW(-x)/x. a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*(k+1)^(k-1). - Vladeta Jovovic, Apr 22 2005
a(0) = 1, a(n) = Sum_{j=1..n-1} binomial(n-1,j) (j+1)^j a(n-1-j) if n>0. - Alois P. Heinz, Sep 15 2008
a(n) ~ exp(-exp(-1)+1) * n^(n-1). - Vaclav Kotesovec, Aug 16 2013

Extensions

More terms from Alois P. Heinz, Sep 15 2008
a(0)=1 prepended by Alois P. Heinz, Aug 13 2017

A239910 Number of forests with three connected components in the complete graph K_{n}.

Original entry on oeis.org

0, 0, 1, 6, 45, 435, 5250, 76608, 1316574, 26100000, 587030895, 14780620800, 412069511139, 12604714327296, 419801484375000, 15123782440058880, 586049426860524300, 24307340986526810112, 1074495780444130114509, 50429952000000000000000
Offset: 1

Views

Author

N. J. A. Sloane, Apr 09 2014

Keywords

Comments

Equation (47) of Liu-Chow (1984) also gives the analogous formulas for four and five components. (They should also be entered into the OEIS, in case someone wants to help.)

Crossrefs

Column m=3 of A105599. A diagonal of A138464. - Alois P. Heinz, Apr 10 2014

Programs

  • Magma
    [(n-1)*(n-2)*n^(n-6)*(n^2+13*n+60)/8: n in [1..20]]; // Vincenzo Librandi, Apr 10 2014
  • Maple
    f := n-> (n-1)*(n-2)*n^(n-6)*(n^2+13*n+60)/8; [seq(f(n),n=3..20)];
  • Mathematica
    Table[(n-1)*(n-2) * n^(n - 6) * (n^2 + 13 n + 60)/8, {n, 1, 20}] (* Vincenzo Librandi, Apr 10 2014, simplified by Vaclav Kotesovec, Feb 20 2020 *)

Formula

From Harry Richman, Aug 17 2022: (Start)
a(n) = n^(n-6)*(n-1)*(n-2)*(n^2+13*n+60)/8.
E.g.f.: T(x)^{3}/3!, where T(x) is the e.g.f. for the number of spanning trees in K_{n} A000272, i.e., T(x) = Sum_{i>=1} i^(i-2)*x^i/i!. (End)

A101313 Number of painted forests - exactly one of its trees is painted - on labeled vertex set [n].

Original entry on oeis.org

1, 3, 12, 68, 525, 5262, 65674, 987408, 17426565, 353759300, 8127640224, 208600774032, 5917247520457, 183872561612040, 6212370268252950, 226762373954676608, 8893485959056048521, 372980176625914811568, 16656844860594186642100, 789196576594282265505600
Offset: 1

Views

Author

Joseph G. Moser (jmoser(AT)wcupa.edu), Jan 26 2005

Keywords

Examples

			a(5) = 291 + (16*4*1)+(3*6*3)+(1*4*12)+(1*1*68) = 525.
		

Programs

  • Maple
    B:= n-> exp(add(k^(k-2) *x^k/k!, k = 1..n )): b:= n-> coeff(series(B(n), x,n+1), x,n)*n!: a:= n-> add(binomial(n,k) *k^(k-2) *b(n-k), k=1..n): seq(a(n), n=1..25);  # Alois P. Heinz, Sep 10 2008
  • Mathematica
    nn=20;t=Sum[n^(n-1)x^n/n!,{n,1,nn}];Drop[Range[0,nn]!CoefficientList[Series[D[Exp[y(t-t^2/2)],y]/.y->1,{x,0,nn}],x],1]  (* Geoffrey Critzer, Nov 04 2012 *)

Formula

a(n) = f(n) + SUM{((n-i)^(n-i-2))*C((n-1), i)*a(i):i=1, 2, ..(n-1)}, where f(n)=number of forests on labeled vertex set [n], A001858.
Exponential convolution of A000272 and A001858: a(n) = Sum_{k=1..n} binomial(n, k)*k^(k-2)*A001858(n-k). E.g.f.: B(x)*exp(B(x)), where B(x) is e.g.f. for A000272. - Vladeta Jovovic, May 24 2005
a(n) = Sum_{m=1..n} A105599(n,m)*m. - Geoffrey Critzer, Nov 04 2012

Extensions

More terms from Alois P. Heinz, Sep 10 2008

A218688 Number of ways to linearly arrange the trees over all forests on n labeled nodes.

Original entry on oeis.org

1, 1, 3, 15, 106, 975, 11106, 151501, 2415960, 44221869, 915826600, 21211128411, 544126606992, 15334985416075, 471495297242256, 15719617534811625, 565271886957356416, 21820620411482896089, 900398349688515500160, 39564926462522623540519, 1845034125763359894240000
Offset: 0

Views

Author

Geoffrey Critzer, Nov 04 2012

Keywords

Crossrefs

Cf. A101313.

Programs

  • Maple
    T:= -LambertW(-x):
    egf:= 1/(1-T+T^2/2):
    a:= n-> n! * coeff(series(egf, x, n+1), x, n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 04 2012
  • Mathematica
    nn=20;t=Sum[n^(n-1)x^n/n!,{n,1,nn}];Range[0,nn]!CoefficientList[ Series[1/(1-t+t^2/2),{x,0,nn}],x]
  • PARI
    A218688_vec(n,A=List(1))={until(#A>n,listput(A,sum(k=1,#A,binomial(#A,k)*k^(k-2)*A[#A-k+1])));Vec(A)} \\ M. F. Hasler, Jan 26 2020

Formula

E.g.f.: 1/(1- T(x) + T(x)^2/2) where T(x) is e.g.f. for A000169.
a(n) = Sum_{m=1..n} A105599(n,m)*m!.
a(n) ~ 4*n^(n-2). - Vaclav Kotesovec, Aug 16 2013
a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * k^(k-2) * a(n-k). - Ilya Gutkovskiy, Jan 26 2020
Showing 1-10 of 22 results. Next