A000169
Number of labeled rooted trees with n nodes: n^(n-1).
Original entry on oeis.org
1, 2, 9, 64, 625, 7776, 117649, 2097152, 43046721, 1000000000, 25937424601, 743008370688, 23298085122481, 793714773254144, 29192926025390625, 1152921504606846976, 48661191875666868481, 2185911559738696531968, 104127350297911241532841, 5242880000000000000000000
Offset: 1
For n=3, a(3)=9 because there are exactly 9 binary relations on A={1, 2} that are functions, namely: {}, {(1,1)}, {(1,2)}, {(2,1)}, {(2,2)}, {(1,1),(2,1)}, {(1,1),(2,2)}, {(1,2),(2,1)} and {(1,2),(2,2)}. - _Dennis P. Walsh_, Apr 21 2011
G.f. = x + 2*x^2 + 9*x^3 + 64*x^4 + 625*x^5 + 7776*x^6 + 117649*x^7 + ...
- Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 169.
- Jonathan L. Gross and Jay Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 524.
- Hannes Heikinheimo, Heikki Mannila and Jouni K. Seppnen, Finding Trees from Unordered 01 Data, in Knowledge Discovery in Databases: PKDD 2006, Lecture Notes in Computer Science, Volume 4213/2006, Springer-Verlag. - N. J. A. Sloane, Jul 09 2009
- Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 63.
- John 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).
- Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see page 25, Prop. 5.3.2, and p. 37, (5.52).
- N. J. A. Sloane, Table of n, a(n) for n = 1..100
- Paul Barry and Aoife Hennessy, Generalized Narayana Polynomials, Riordan Arrays, and Lattice Paths, Journal of Integer Sequences, Vol. 15, 2012, #12.4.8. - _N. J. A. Sloane_, Oct 08 2012
- Washington Bomfim, Bijection between rooted forests and multigraphs without cycles except one loop in each connected component. [From _Washington Bomfim_, Sep 04 2010]
- David Callan, A Combinatorial Derivation of the Number of Labeled Forests, J. Integer Seqs., Vol. 6, 2003.
- Peter J. Cameron and Philippe Cara, Independent generating sets and geometries for symmetric groups, J. Algebra, Vol. 258, no. 2 (2002), 641-650.
- Robert Castelo and Arno Siebes, A characterization of moral transitive directed acyclic graph Markov models as trees, Technical Report CS-2000-44, Faculty of Computer Science, University of Utrecht.
- Robert Castelo and Arno Siebes, A characterization of moral transitive acyclic directed graph Markov models as labeled trees, Journal of Statistical Planning and Inference, Vol. 115, No. 1 (2003), pp. 235-259; alternative link.
- Frédéric Chapoton, Florent Hivert and Jean-Christophe Novelli, A set-operad of formal fractions and dendriform-like sub-operads, Journal of Algebra, Vol. 465 (2016), pp. 322-355; arXiv preprint, arXiv:1307.0092 [math.CO], 2013.
- Ali Chouria, Vlad-Florin Drǎgoi, Jean-Gabriel Luque, On recursively defined combinatorial classes and labelled trees, arXiv:2004.04203 [math.CO], 2020.
- R. M. Corless, G. H. Gonnet, D. E. G. Hare, D. J. Jeffrey and D. E. Knuth, On the Lambert W Function, Advances in Computational Mathematics, VOl. 5 (1996), pp. 329-359; alternative link.
- Nick Hobson, Solution to puzzle 48: Exponential equation.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 67.
- Qipeng Kuang, Ondřej Kuželka, Yuanhong Wang, and Yuyi Wang, Bridging Weighted First Order Model Counting and Graph Polynomials, arXiv:2407.11877 [cs.LO], 2024. See p. 33.
- Jean-Louis Loday and Bruno Vallette, Algebraic Operads, version 0.99, 2012.
- G. Pólya, With, or Without, Motivation?, Amer. Math. Monthly, Vol. 56, No. 10 (1949), pp. 684-691. Reprinted in "A Century of Mathematics", John Ewing (ed.), Math. Assoc. of Amer., 1994, pp. 195-200 (the reference there is wrong).
- Gwenaël Richomme, Characterization of infinite LSP words and endomorphisms preserving the LSP property, International Journal of Foundations of Computer Science, Vol. 30, No. 1 (2019), pp. 171-196; arXiv preprint, arXiv:1808.02680 [cs.DM], 2018.
- Marko Riedel, math.stackexchange.com, Proof of an identity relating the tree function T(z) and the second order Eulerian numbers. Feb. 28, 2021.
- Marko Riedel, math.stackexchange.com, Asymptotics of tree function statistics using Pusieux series
- Frank Ruskey, Information on Rooted Trees.
- N. J. A. Sloane, Illustration of initial terms
- Zhi-Wei Sun, Fedor Petrov, A surprising identity, discussion in MathOverflow, Jan 17 2019.
- Elena L. Wang and Guoce Xin, On Ward Numbers and Increasing Schröder Trees, arXiv:2507.15654 [math.CO], 2025. See p. 12.
- Eric Weisstein's World of Mathematics, Graph Vertex.
- Dimitri Zvonkine, An algebra of power series arising in the intersection theory of moduli spaces of curves and in the enumeration of ramified coverings of the sphere, arXiv:math/0403092 [math.AG], 2004.
- Index entries for sequences related to rooted trees
- Index entries for sequences related to trees
- Index entries for "core" sequences
Cf.
A000055,
A000081,
A000142,
A000272,
A000312,
A002720,
A007778,
A007830,
A008785-
A008791,
A055860,
A002061,
A052746,
A052756,
A052764,
A052789,
A051129,
A098686,
A247363,
A055302,
A248120,
A130293,
A053506-
A053509,
A262974.
-
a000169 n = n ^ (n - 1) -- Reinhard Zumkeller, Sep 14 2014
-
[n^(n-1): n in [1..20]]; // Vincenzo Librandi, Jul 17 2015
-
A000169 := n -> n^(n-1);
# second program:
spec := [A, {A=Prod(Z, Set(A))}, labeled]; [seq(combstruct[count](spec, size=n), n=1..20)];
# third program:
A000169 := n -> add((-1)^(n+k-1)*pochhammer(n, k)*Stirling2(n-1, k), k = 0..n-1):
seq(A000169(n), n = 1 .. 23); # Mélika Tebni, May 07 2023
-
Table[n^(n - 1), {n, 1, 20}] (* Stefan Steinerberger, Apr 01 2006 *)
Range[0, 18]! CoefficientList[ Series[ -LambertW[-x], {x, 0, 18}], x] // Rest (* Robert G. Wilson v, updated by Jean-François Alcover, Oct 14 2019 *)
(* Next, a signed version A000169 from the Vandermonde determinant of (1,1/2,...,1/n) *)
f[j_] := 1/j; z = 12;
v[n_] := Product[Product[f[k] - f[j], {j, 1, k - 1}], {k, 2, n}]
Table[v[n], {n, 1, z}]
1/% (* A203421 *)
Table[v[n]/v[n + 1], {n, 1, z - 1}] (* A000169 signed *)
(* Clark Kimberling, Jan 02 2012 *)
a[n_]:=Det[Table[If[i==0,1,If[i<=j,i,i-n]],{i,0,n-1},{j,0,n-1}]]; Array[a,20] (* Stefano Spezia, Mar 12 2024 *)
-
n^(n-1) $ n=1..20 /* Zerinvary Lajos, Apr 01 2007 */
-
a(n) = n^(n-1)
-
def a(n): return n**(n-1)
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Sep 19 2021
-
from sympy import Matrix
def P(n): return [[ (i-n if i > j else i) + (i == 0) for j in range(n) ] for i in range(n)]
print(*(Matrix(P(n)).det() for n in range(1, 21)), sep=', ') # C.S. Elder, Mar 12 2024
A055314
Triangle T(n,k) read by rows: number of labeled trees with n nodes and k leaves, n >= 2, 2 <= k <= n.
Original entry on oeis.org
1, 3, 0, 12, 4, 0, 60, 60, 5, 0, 360, 720, 210, 6, 0, 2520, 8400, 5250, 630, 7, 0, 20160, 100800, 109200, 30240, 1736, 8, 0, 181440, 1270080, 2116800, 1058400, 151704, 4536, 9, 0, 1814400, 16934400, 40219200, 31752000, 8573040, 695520, 11430, 10, 0
Offset: 2
Triangle T(n,k) begins:
1;
3, 0;
12, 4, 0;
60, 60, 5, 0;
360, 720, 210, 6, 0;
2520, 8400, 5250, 630, 7, 0;
...
- Moon, J. W. Various proofs of Cayley's formula for counting trees. 1967 A seminar on Graph Theory pp. 70--78 Holt, Rinehart and Winston, New York; MR0214515 (35 #5365). - From N. J. A. Sloane, Jun 07 2012
- Renyi, Alfred. Some remarks on the theory of trees. Magyar Tud. Akad. Mat. Kutató Int. Közl. 4 1959 73--85. MR0115938 (22 #6735). - From N. J. A. Sloane, Jun 07 2012
- D. Stanton and D. White, Constructive Combinatorics, Springer, 1986; see p. 67.
- G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
- A. M. Hamel, Priority queue sorting and labeled trees, Annals Combin., 7 (2003), 49-54.
- F. Harary, A. Mowshowitz and J. Riordan, Labeled trees with unlabeled end-points, J. Combin. Theory, 6 (1969), 60-64. - From _N. J. A. Sloane_, Jun 07 2012
- Vites Longani, A formula for the number of labelled trees, Comp. Math. Appl. 56 (2008) 2786-2788.
- John Riordan, The enumeration of labeled trees by degrees, Bull. Amer. Math. Soc. 72 1966 110--112. MR0186583 (32 #4042). - From _N. J. A. Sloane_, Jun 07 2012
- Index entries for sequences related to trees
-
T := (n,k) -> binomial(n+1,k)*add( binomial(n+1-k,i)*(-1)^(n+1-k-i)*i^(n-1), i=0..n+1-k);
# The following version gives the triangle for any n>=1, k>=1, based on the Harary et al. (1969) paper - N. J. A. Sloane, Jun 07 2012
with(combinat);
R:=proc(n,k)
if n=1 then if k=1 then RETURN(1) else RETURN(0); fi
elif (n=2 and k=2) then RETURN(1)
elif (n=2 and k>2) then RETURN(0)
else stirling2(n-2,n-k)*n!/k!;
fi;
end;
-
Table[Table[Binomial[n,k] Sum[(-1)^j Binomial[n-k,j] (n-k-j)^(n-2),{j,0,n-k}],{k,2,n-1}],{n,2,10}]//Grid (* Geoffrey Critzer, Nov 12 2011 *)
Table[(n!/k!)*StirlingS2[n - 2, n - k], {n, 2, 7}, {k, 2, n}]//Flatten (* G. C. Greubel, May 17 2017 *)
-
A055314(n,k) := block(
n!/k!*stirling2(n-2,n-k)
)$
for n : 2 thru 10 do
for k : 2 thru n do
print(A055314(n,k)," ") ; /* R. J. Mathar, Mar 06 2012 */
-
for(n=2,20, for(k=2,n, print1((n!/k!)*stirling(n-2, n-k, 2), ", "))) \\ G. C. Greubel, May 17 2017
A055897
a(n) = n*(n-1)^(n-1).
Original entry on oeis.org
1, 2, 12, 108, 1280, 18750, 326592, 6588344, 150994944, 3874204890, 110000000000, 3423740047332, 115909305827328, 4240251492291542, 166680102383370240, 7006302246093750000, 313594649253062377472, 14890324713954061755186, 747581753430634213933056
Offset: 1
-
List([1..20], n-> n*(n-1)^(n-1)); # G. C. Greubel, Aug 10 2019
-
a055897 n = n * (n - 1) ^ (n - 1) -- Reinhard Zumkeller, Aug 31 2014
-
[n*(n-1)^(n-1): n in [1..20]] // Wesley Ivan Hurt, Jun 26 2014
-
A055897:=n->`if`(n=1,1,n*(n-1)^(n-1)); seq(A055897(n), n=1..20); # Wesley Ivan Hurt, Jun 26 2014
-
Join[{1},Table[n(n-1)^(n-1), {n,2,20}]] (* Harvey P. Dale, Jul 18 2011 *)
-
{a(n)=polcoeff(1/(1-n*x+x*O(x^n))^2, n)} \\ Paul D. Hanna, Dec 27 2012
-
[n*(n-1)^(n-1) for n in (1..20)] # G. C. Greubel, Aug 10 2019
A327369
Triangle read by rows where T(n,k) is the number of labeled simple graphs with n vertices and exactly k endpoints (vertices of degree 1).
Original entry on oeis.org
1, 1, 0, 1, 0, 1, 2, 0, 6, 0, 15, 12, 30, 4, 3, 314, 320, 260, 80, 50, 0, 13757, 10890, 5445, 1860, 735, 66, 15, 1142968, 640836, 228564, 64680, 16800, 2772, 532, 0, 178281041, 68362504, 17288852, 3666600, 702030, 115416, 17892, 1016, 105
Offset: 0
Triangle begins:
1
1 0
1 0 1
2 0 6 0
15 12 30 4 3
314 320 260 80 50 0
13757 10890 5445 1860 735 66 15
Row sums without the first column are
A245797.
-
Table[Length[Select[Subsets[Subsets[Range[n],{2}]],Count[Length/@Split[Sort[Join@@#]],1]==k&]],{n,0,5},{k,0,n}]
-
Row(n)={ \\ R, U, B are e.g.f. of A055302, A055314, A059167.
my(R=sum(n=1, n, x^n*sum(k=1, n, stirling(n-1, n-k, 2)*y^k/k!)) + O(x*x^n));
my(U=sum(n=2, n, x^n*sum(k=1, n, stirling(n-2, n-k, 2)*y^k/k!)) + O(x*x^n));
my(B=x^2/2 + log(sum(k=0, n, 2^binomial(k, 2)*(x*exp(-x + O(x^n)))^k/k!)));
my(A=exp(x + U + subst(B-x, x, x*(1-y) + R)));
Vecrev(n!*polcoef(A, n), n + 1);
}
{ for(n=0, 8, print(Row(n))) } \\ Andrew Howroyd, Oct 05 2019
A141618
Triangle read by rows: number of nilpotent partial transformations (of an n-element set) of height r (height(alpha) = |Im(alpha)|), 0 <= r < n.
Original entry on oeis.org
1, 1, 2, 1, 9, 6, 1, 28, 72, 24, 1, 75, 500, 600, 120, 1, 186, 2700, 7800, 5400, 720, 1, 441, 12642, 73500, 117600, 52920, 5040, 1, 1016, 54096, 571536, 1764000, 1787520, 564480, 40320, 1, 2295, 217800, 3916080, 21019824, 40007520, 27941760, 6531840, 362880, 1, 5110, 839700, 24555600, 214326000
Offset: 1
N(J(4,2)) = 6*6*2 = 72.
From _Peter Bala_, Oct 22 2008: (Start)
Triangle begins
n\k|..0.....1.....2.....3.....4....5
=====================================
.1.|..1
.2.|..1.....2
.3.|..1.....9.....6
.4.|..1....28....72....24
.5.|..1....75...500...600...120
.6.|..1...186..2700..7800..5400...720
...
(End)
-
A048993 := proc(n,k)
combinat[stirling2](n,k) ;
end proc:
A141618 := proc(n,k)
binomial(n,k)*k!*A048993(n,k+1) ;
end proc:
-
Flatten[CoefficientList[CoefficientList[InverseSeries[Series[Log[1 + x]/(1 + t*x),{x,0,9}]],x]*Table[n!, {n,0,9}],t]] (* Peter Luschny, Oct 24 2015, after Peter Bala *)
-
A055302(n,k)=n!/k!*stirling(n-1, n-k,2);
T(n,k)=A055302(n+1,n+1-k) / (n+1);
for(n=1,10,for(k=1,n,print1(T(n,k),", "));print());
\\ Joerg Arndt, Oct 27 2014
A248120
Triangle read by rows: Lagrange (compositional) inversion of a function in terms of the coefficients of the Taylor series expansion of its reciprocal, scaled version of A248927, n >= 1, k = 1..A000041(n-1).
Original entry on oeis.org
1, 2, 6, 3, 24, 36, 4, 120, 360, 60, 80, 5, 720, 3600, 1800, 1200, 300, 150, 6, 5040, 37800, 37800, 16800, 3150, 12600, 3150, 420, 630, 252, 7, 40320, 423360, 705600, 235200, 176400, 352800, 58800, 35280, 23520, 35280, 7056, 1960, 1176, 392, 8
Offset: 1
Triangle begins
1;
2;
6, 3;
24, 36, 4;
120, 360, 60, 80, 5;
720, 3600, 1800, 1200, 300, 150, 6;
5040, 37800, 37800, 16800, 3150, 12600, 3150, 420, 630, 252, 7;
...
For f(t)= e^t-1, h(t)= t/f(t)= t/(e^t-1), the e.g.f. for the Bernoulli numbers, and plugging the Bernoulli numbers into the Lagrange inversion formula gives g(t)= t - t^2/2 + t^3/3 + ... = log(1+t).
- Andrew Howroyd, Table of n, a(n) for n = 1..2087 (rows 1..20)
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- Tom Copeland, The Hirzebruch criterion for the Todd class, Dec 14 2014.
- A. Scott and A. Sokal, Some variants of the exponential formula, with application to the multivariate Tutte polynomial (alias Potts model), arXiv:0803.1477 [math.CO], 2009.
Cf.
A134264 and
A248927, "scaled" versions of this Lagrange inversion.
-
C(v)={my(n=vecsum(v), S=Set(v)); (n+1)*n!^2/((n-#v+1)!*prod(i=1, #S, my(x=S[i], c=#select(y->y==x, v)); x!^c*c!))}
row(n)=[C(Vec(p)) | p<-Vecrev(partitions(n-1))]
{ for(n=1, 7, print(row(n))) } \\ Andrew Howroyd, Feb 02 2022
A327377
Triangle read by rows where T(n,k) is the number of labeled simple graphs covering n vertices with exactly k endpoints (vertices of degree 1).
Original entry on oeis.org
1, 0, 0, 0, 0, 1, 1, 0, 3, 0, 10, 12, 12, 4, 3, 253, 260, 160, 60, 35, 0, 12068, 9150, 4230, 1440, 480, 66, 15, 1052793, 570906, 195048, 53200, 12600, 2310, 427, 0, 169505868, 63523656, 15600032, 3197040, 585620, 95088, 14056, 1016, 105
Offset: 0
Triangle begins:
1
0 0
0 0 1
1 0 3 0
10 12 12 4 3
253 260 160 60 35 0
12068 9150 4230 1440 480 66 15
Row sums without the first column are
A327227.
The non-covering version is
A327369.
-
Row(n)={ \\ R, U, B are e.g.f. of A055302, A055314, A059167.
my(U=sum(n=2, n, x^n*sum(k=1, n, stirling(n-2, n-k, 2)*y^k/k!)) + O(x*x^n));
my(R=sum(n=1, n, x^n*sum(k=1, n, stirling(n-1, n-k, 2)*y^k/k!)) + O(x*x^n));
my(B=x^2/2 + log(sum(k=0, n, 2^binomial(k, 2)*(x*exp(-x + O(x^n)))^k/k!)));
my(A=exp(-x + O(x*x^n))*exp(x + U + subst(B-x, x, x*(1-y) + R)));
Vecrev(n!*polcoef(A, n), n + 1);
}
{ for(n=0, 8, print(Row(n))) } \\ Andrew Howroyd, Oct 05 2019
A055303
Number of labeled rooted trees with n nodes and 2 leaves.
Original entry on oeis.org
3, 36, 360, 3600, 37800, 423360, 5080320, 65318400, 898128000, 13172544000, 205491686400, 3399953356800, 59499183744000, 1098446469120000, 21341245685760000, 435361411989504000, 9305850181275648000, 208013121699102720000, 4853639506312396800000
Offset: 3
-
seq(n!*(n-2)*(n-1)/4, n = 3..21); # Zerinvary Lajos, Apr 25 2008 [corrected by Georg Fischer, Aug 17 2021]
f:= gfun:-rectoproc({(n-3)*a(n) - (n^2-n)*a(n-1), a(3)=3}, a(n), remember): map(f, [$3..20]); # Georg Fischer, Aug 17 2021
-
With[{nn=20}, Drop[CoefficientList[Series[x^3/(2(1-x)^3), {x,0,nn}], x] * Range[0,nn]!, 3]] (* Harvey P. Dale, Nov 22 2012 *)
A248927
Triangle read by rows: T(n,k) are the coefficients of the Lagrange (compositional) inversion of a function in terms of the Taylor series expansion of its reciprocal, n >= 1, k = 1..A000041(n-1).
Original entry on oeis.org
1, 1, 2, 1, 6, 9, 1, 24, 72, 12, 16, 1, 120, 600, 300, 200, 50, 25, 1, 720, 5400, 5400, 2400, 450, 1800, 450, 60, 90, 36, 1, 5040, 52920, 88200, 29400, 22050, 44100, 7350, 4410, 2940, 4410, 882, 245, 147, 49, 1, 40320, 564480, 1411200, 376320, 705600, 940800
Offset: 1
Triangle T(n,k) begins:
1;
1;
2, 1;
6, 9, 1;
24, 72, 12, 16, 1;
120, 600, 300, 200, 50, 25, 1;
720, 5400, 5400, 2400, 450, 1800, 450, 60, 90, 36, 1;
...
For f(t) = e^t-1, h(t) = t/f(t) = t/(e^t-1), the e.g.f. for the Bernoulli numbers, and plugging the Bernoulli numbers into the Lagrange inversion formula gives g(t) = t - t^2/2 + t^3/3 + ... = log(1+t).
Cf.
A134264 and
A248120, "scaled" versions of this Lagrange inversion.
-
C(v)={my(n=vecsum(v), S=Set(v)); n!^2/((n-#v+1)!*prod(i=1, #S, my(x=S[i], c=#select(y->y==x, v)); x!^c*c!))}
row(n)=[C(Vec(p)) | p<-Vecrev(partitions(n-1))]
{ for(n=1, 7, print(row(n))) } \\ Andrew Howroyd, Feb 02 2022
Name edited and terms a(31) and beyond from
Andrew Howroyd, Feb 02 2022
A219859
Triangular array read by rows: T(n,k) is the number of endofunctions, functions f:{1,2,...,n}->{1,2,...,n}, that have exactly k elements with no preimage; n>=0, 0<=k<=n.
Original entry on oeis.org
1, 1, 0, 2, 2, 0, 6, 18, 3, 0, 24, 144, 84, 4, 0, 120, 1200, 1500, 300, 5, 0, 720, 10800, 23400, 10800, 930, 6, 0, 5040, 105840, 352800, 294000, 63210, 2646, 7, 0, 40320, 1128960, 5362560, 7056000, 2857680, 324576, 7112, 8, 0, 362880, 13063680, 83825280, 160030080, 105099120, 23496480, 1524600, 18360, 9, 0
Offset: 0
Triangle T(n,k) begins:
1;
1, 0;
2, 2, 0;
6, 18, 3, 0;
24, 144, 84, 4, 0;
120, 1200, 1500, 300, 5, 0;
720, 10800, 23400, 10800, 930, 6, 0;
...
- M. Bona, Introduction to Enumerative Combinatorics, McGraw Hill, 2007.
-
Table[Table[n!/k!StirlingS2[n,n-k],{k,0,n}],{n,0,8}]//Grid
-
row(n) = vector(n+1, k, k--; n!/k! * stirling(n,n-k,2)); \\ Michel Marcus, Jan 24 2022
Showing 1-10 of 24 results.
Comments