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 13 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

A000254 Unsigned Stirling numbers of first kind, s(n+1,2): a(n+1) = (n+1)*a(n) + n!.

Original entry on oeis.org

0, 1, 3, 11, 50, 274, 1764, 13068, 109584, 1026576, 10628640, 120543840, 1486442880, 19802759040, 283465647360, 4339163001600, 70734282393600, 1223405590579200, 22376988058521600, 431565146817638400, 8752948036761600000, 186244810780170240000
Offset: 0

Views

Author

Keywords

Comments

Number of permutations of n+1 elements with exactly two cycles.
Number of cycles in all permutations of [n]. Example: a(3) = 11 because the permutations (1)(2)(3), (1)(23), (12)(3), (13)(2), (132), (123) have 11 cycles altogether. - Emeric Deutsch, Aug 12 2004
Row sums of A094310: In the symmetric group S_n, each permutation factors into k independent cycles; a(n) = sum k over S_n. - Harley Flanders (harley(AT)umich.edu), Jun 28 2004
The sum of the top levels of the last column over all deco polyominoes of height n. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. Example: a(2)=3 because the deco polyominoes of height 2 are the vertical and horizontal dominoes, the levels of their last columns being 2 and 1, respectively. - Emeric Deutsch, Aug 12 2006
a(n) is divisible by n for all composite n >= 6. a(2*n) is divisible by 2*n + 1. - Leroy Quet, May 20 2007
For n >= 2 the determinant of the n-1 X n-1 matrix M(i,j) = i + 2 for i = j and 1 otherwise (i,j = 1..n-1). E.g., for n = 3 the determinant of [(3, 1), (1, 4)]. See 53rd Putnam Examination, 1992, Problem B5. - Franz Vrabec, Jan 13 2008, Mar 26 2008
The numerator of the fraction when we sum (without simplification) the terms in the harmonic sequence. (1 + 1/2 = 2/2 + 1/2 = 3/2; 3/2 + 1/3 = 9/6 + 2/6 = 11/6; 11/6 + 1/4 = 44/24 + 6/24 = 50/24;...). The denominator of this fraction is n!*A000142. - Eric Desbiaux, Jan 07 2009
The asymptotic expansion of the higher order exponential integral E(x,m=2,n=1) ~ exp(-x)/x^2*(1 - 3/x + 11/x^2 - 50/x^3 + 274/x^4 - 1764/x^5 + 13068/x^6 - ...) leads to the sequence given above. See A163931 and A028421 for more information. - Johannes W. Meijer, Oct 20 2009
a(n) is the number of permutations of [n+1] containing exactly 2 cycles. Example: a(2) = 3 because the permutations (1)(23), (12)(3), (13)(2) are the only permutations of [3] with exactly 2 cycles. - Tom Woodward (twoodward(AT)macalester.edu), Nov 12 2009
It appears that, with the exception of n= 4, a(n) mod n = 0 if n is composite and = n-1 if n is prime. - Gary Detlefs, Sep 11 2010
a(n) is a multiple of A025527(n). - Charles R Greathouse IV, Oct 16 2012
Numerator of harmonic number H(n) = Sum_{i=1..n} 1/i when not reduced. See A001008 (Wolstenholme numbers) for the reduced numerators. - Rahul Jha, Feb 18 2015
The Stirling transform of this sequence is A222058(n) (Harmonic-geometric numbers). - Anton Zakharov, Aug 07 2016
a(n) is the (n-1)-st elementary symmetric function of the first n numbers. - Anton Zakharov, Nov 02 2016
The n-th iterated integral of log(x) is x^n * (n! * log(x) - a(n))/(n!)^2 + a polynomial of degree n-1 with arbitrary coefficients. This can be proven using the recurrence relation a(n) = (n-1)! + n*a(n-1). - Mohsen Maesumi, Oct 31 2018
Primes p such that p^3 | a(p-1) are the Wolstenholme primes A088164. - Amiram Eldar and Thomas Ordowski, Aug 08 2019
Total number of left-to-right maxima (or minima) in all permutations of [n]. a(3) = 11 = 3+2+2+2+1+1: (1)(2)(3), (1)(3)2, (2)1(3), (2)(3)1, (3)12, (3)21. - Alois P. Heinz, Aug 01 2020

Examples

			(1-x)^-1 * (-log(1-x)) = x + 3/2*x^2 + 11/6*x^3 + 25/12*x^4 + ...
G.f. = x + x^2 + 5*x^3 + 14*x^4 + 94*x^5 + 444*x^6 + 3828*x^7 + 25584*x^8 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 833.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, identities 186-190.
  • N. Bleistein and R. A. Handelsman, Asymptotic Expansions of Integrals, Dover Publications, 1986, see page 2. MR0863284 (89d:41049)
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 217.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 226.
  • Shanzhen Gao, Permutations with Restricted Structure (in preparation).
  • K. Javorszky, Natural Orders: De Ordinibus Naturalibus, 2016, ISBN 978-3-99057-139-2.
  • 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).

Crossrefs

Programs

  • Magma
    a:=[]; for n in [1..22] do a:=a cat [Abs(StirlingFirst(n,2))]; end for; a; // Marius A. Burtea, Jan 01 2020
  • Maple
    A000254 := proc(n) option remember; if n<=1 then n else n*A000254(n-1)+(n-1)!; fi; end: seq(A000254(n),n=0..21);
    a := n -> add(n!/k, k=1..n): seq(a(n), n=0..21); # Zerinvary Lajos, Jan 22 2008
  • Mathematica
    Table[ (PolyGamma[ m ]+EulerGamma) (m-1)!, {m, 1, 24} ] (* Wouter Meeussen *)
    Table[ n!*HarmonicNumber[n], {n, 0, 19}] (* Robert G. Wilson v, May 21 2005 *)
    Table[Sum[1/i,{i,1,n}]/Product[1/i,{i,1,n}],{n,1,30}] (* Alexander Adamchuk, Jul 11 2006 *)
    Abs[StirlingS1[Range[20],2]] (* Harvey P. Dale, Aug 16 2011 *)
    Table[Gamma'[n + 1] /. EulerGamma -> 0, {n, 0, 30}] (* Li Han, Feb 14 2024*)
  • Maxima
    a(n):=(-1)^(n+1)/2*(n+1)*sum(k*bern(k-1)*stirling1(n,k),k,1,n); /* Vladimir Kruchinin, Nov 20 2016 */
    
  • MuPAD
    A000254 := proc(n) begin n*A000254(n-1)+fact(n-1) end_proc: A000254(1) := 1:
    
  • PARI
    {a(n) = if( n<0, 0, (n+1)! / 2 * sum( k=1, n, 1 / k / (n+1-k)))} /* Michael Somos, Feb 05 2004 */
    
  • Sage
    [stirling_number1(i, 2) for i in range(1, 22)]  # Zerinvary Lajos, Jun 27 2008
    

Formula

Let P(n,X) = (X+1)*(X+2)*(X+3)*...*(X+n); then a(n) is the coefficient of X; or a(n) = P'(n,0). - Benoit Cloitre, May 09 2002
Sum_{k > 0} a(k) * x^k/ k!^2 = exp(x) *(Sum_{k>0} (-1)^(k+1) * x^k / (k * k!)). - Michael Somos, Mar 24 2004; corrected by Warren D. Smith, Feb 12 2006
a(n) is the coefficient of x^(n+2) in (-log(1-x))^2, multiplied by (n+2)!/2.
a(n) = n! * Sum_{i=1..n} 1/i = n! * H(n), where H(n) = A001008(n)/A002805(n) is the n-th harmonic number.
a(n) ~ 2^(1/2)*Pi^(1/2)*log(n)*n^(1/2)*e^-n*n^n. - Joe Keane (jgk(AT)jgk.org), Jun 06 2002
E.g.f.: log(1 - x) / (x-1). (= (log(1 - x))^2 / 2 if offset 1). - Michael Somos, Feb 05 2004
D-finite with recurrence: a(n) = a(n-1) * (2*n - 1) - a(n-2) * (n - 1)^2, if n > 1. - Michael Somos, Mar 24 2004
a(n) = A081358(n)+A092691(n). - Emeric Deutsch, Aug 12 2004
a(n) = n!*Sum_{k=1..n} (-1)^(k+1)*binomial(n, k)/k. - Vladeta Jovovic, Jan 29 2005
p^2 divides a(p-1) for prime p > 3. a(n) = (Sum_{i=1..n} 1/i) / Product_{i=1..n} 1/i. - Alexander Adamchuk, Jul 11 2006
a(n) = 3* A001710(n) + 2* A001711(n-3) for n > 2; e.g., 11 = 3*3 + 2*1, 50 = 3*12 + 2*7, 274 = 3*60 + 2*47, ... - Gary Detlefs, May 24 2010
a(n) = A138772(n+1) - A159324(n). - Gary Detlefs, Jul 05 2010
a(n) = A121633(n) + A002672(n). - Gary Detlefs, Jul 18 2010
a(n+1) = Sum_{i=1..floor((n-1)/2)} n!/((n-i)*i) + Sum_{i=ceiling(n/2)..floor(n/2)} n!/(2*(n-i)*i). - Shanzhen Gao, Sep 14 2010
From Gary Detlefs, Sep 11 2010: (Start)
a(n) = (a(n-1)*(n^2 - 2*n + 1) + (n + 1)!)/(n - 1) for n > 2.
It appears that, with the exception of n = 2, (a(n+1)^2 - a(n)^2) mod n^2 = 0 if n is composite and 4*n if n is prime.
It appears that, with the exception of n = 2, (a(n+1)^3 - a(n)^2) mod n = 0 if n is composite and n - 2 if n is prime.
It appears that, with the exception of n = 2, (a(n)^2 + a(n+1)^2) mod n = 0 if n is composite and = 2 if n is prime. (End)
a(n) = Integral_{x=0..oo} (x^n - n!)*log(x)*exp(-x) dx. - Groux Roland, Mar 28 2011
a(n) = 3*n!/2 + 2*(n-2)!*Sum_{k=0..n-3} binomial(k+2,2)/(n-2-k) for n >= 2. - Gary Detlefs, Sep 02 2011
a(n)/(n-1)! = ml(n) = n*ml(n-1)/(n-1) + 1 for n > 1, where ml(n) is the average number of random draws from an n-set with replacement until the total set has been observed. G.f. of ml: x*(1 - log(1 - x))/(1 - x)^2. - Paul Weisenhorn, Nov 18 2011
a(n) = det(|S(i+2, j+1)|, 1 <= i,j <= n-2), where S(n,k) are Stirling numbers of the second kind. - Mircea Merca, Apr 06 2013
E.g.f.: x/(1 - x)*E(0)/2, where E(k) = 2 + E(k+1)*x*(k + 1)/(k + 2). - Sergei N. Gladkovskii, Jun 01 2013 [Edited by Michael Somos, Nov 28 2013]
0 = a(n) * (a(n+4) - 6*a(n+3) + 7*a(n+2) - a(n+1)) - a(n+1) * (4*a(n+3) - 6*a(n+2) + a(n+1)) + 3*a(n+2)^2 unless n=0. - Michael Somos, Nov 28 2013
For a simple way to calculate the sequence, multiply n! by the integral from 0 to 1 of (1 - x^n)/(1 - x) dx. - Rahul Jha, Feb 18 2015
From Ilya Gutkovskiy, Aug 07 2016: (Start)
Inverse binomial transform of A073596.
a(n) ~ sqrt(2*Pi*n) * n^n * (log(n) + gamma)/exp(n), where gamma is the Euler-Mascheroni constant A001620. (End)
a(n) = ((-1)^(n+1)/2*(n+1))*Sum_{k=1..n} k*Bernoulli(k-1)*Stirling1(n,k). - Vladimir Kruchinin, Nov 20 2016
a(n) = (n)! * (digamma(n+1) + gamma), where gamma is the Euler-Mascheroni constant A001620. - Pedro Caceres, Mar 10 2018
From Andy Nicol, Oct 21 2021: (Start)
Gamma'(x) = a(x-1) - (x-1)!*gamma, where Gamma'(x) is the derivative of the gamma function at positive integers and gamma is the Euler-Mascheroni constant. E.g.:
Gamma'(1) = -gamma, Gamma'(2) = 1-gamma, Gamma'(3) = 3-2*gamma,
Gamma'(22) = 186244810780170240000 - 51090942171709440000*gamma. (End)
From Peter Bala, Feb 03 2022: (Start)
The following are all conjectural:
E.g.f.: for nonzero m, (1/m)*Sum_{n >= 1} (-1)^(n+1)*(1/n)*binomial(m*n,n)* x^n/(1 - x)^(m*n+1) = x + 3*x^2/2! + 11*x^3/3! + 50*x^4/4! + ....
For nonzero m, a(n) = (1/m)*n!*Sum_{k = 1..n} (-1)^(k+1)*(1/k)*binomial(m*k,k)* binomial(n+(m-1)*k,n-k).
a(n)^2 = (1/2)*n!^2*Sum_{k = 1..n} (-1)^(k+1)*(1/k^2)*binomial(n,k)* binomial(n+k,k). (End)
From Mélika Tebni, Jun 20 2022: (Start)
a(n) = -Sum_{k=0..n} k!*A021009(n, k+1).
a(n) = Sum_{k=0..n} k!*A094587(n, k+1). (End)
a(n) = n! * 1/(1 - 1^2/(3 - 2^2/(5 - 3^2/(7 - ... - (n - 1)^2/((2*n - 1)))))). - Peter Bala, Mar 16 2024

A045406 A diagonal of A008296.

Original entry on oeis.org

1, 3, -1, 0, 4, -28, 188, -1368, 11016, -98208, 964512, -10370880, 121337280, -1535880960, 20924455680, -305396421120, 4755302899200, -78700195123200, 1379748896870400, -25546854999859200, 498194992408780800, -10207190048993280000, 219216795045212160000
Offset: 2

Views

Author

N. J. A. Sloane, Jan 26 2001

Keywords

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 139, b(n,2).

Crossrefs

Cf. A081048.

Programs

  • Maple
    with(combinat): for n from 2 to 40 do for k from 2 to 2 do printf(`%d,`,sum(binomial(l,k)*k^(l-k)*stirling1(n,l), l=k..n)) od: od:
    # Alternative:
    A081048:= gfun:-rectoproc({a(0)=0,a(1)=1,a(n)=(1-2*n)*a(n-1) -(n-1)^2*a(n-2)},a(n),remember):
    1, seq(2*A081048(n-3)-3*(-1)^(n)*(n-3)!,n=3..50); # Robert Israel, Jun 29 2015
  • Mathematica
    With[{nn=30},CoefficientList[Series[((1+x)Log[1+x])^2/2,{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Jun 04 2019 *)

Formula

a(n) = A008296(n,2).
E.g.f.: ((1+x)*log(1+x))^2/2. - Vladeta Jovovic, Feb 20 2003
a(n) = sum(i=1, n-1, i^2*Stirling1(n-1, i)). - Benoit Cloitre, Oct 23 2004
If we define f(n,i,a)=sum(binomial(n,k)*stirling1(n-k,i)*product(-a-j,j=0..k-1),k=0..n-i), then a(n) = f(n,2,-2), for n>=2. - Milan Janjic, Dec 21 2008
a(n) = (-1)^(n)*(2*H(n-3)-3)*(n-3)! for n >= 3, where H(n) = Sum(j=1..n, 1/j) is the n-th harmonic number. - Gary Detlefs, Feb 13 2010
a(n) = 2*A081048(n-3)-3*(-1)^(n)*(n-3)! for n >= 3. - Robert Israel, Jun 28 2015
Sum_{k=1..n} a(k+1) * Stirling2(n,k) = n^2. - Vaclav Kotesovec, Sep 03 2018
Conjecture: D-finite with recurrence a(n) +(2*n-7)*a(n-1) +(n-4)^2*a(n-2)=0. - R. J. Mathar, Sep 15 2021

Extensions

More terms from James Sellers, Jan 26 2001
Gary Detlefs comment changed to a formula by Robert Israel, Jun 28 2015

A081051 Stirling numbers of the first kind.

Original entry on oeis.org

0, 0, 1, -6, 35, -225, 1624, -13132, 118124, -1172700, 12753576, -150917976, 1931559552, -26596717056, 392156797824, -6165817614720, 102992244837120, -1821602444624640, 34012249593822720, -668609730341153280, 13803759753640704000, -298631902863216384000
Offset: 0

Views

Author

Paul Barry, Mar 05 2003

Keywords

Comments

Coefficient of x^3 in Product {k=0..(n-1), x-k}.

Crossrefs

Programs

  • Mathematica
    Table[StirlingS1[n, 3], {n, 1, 20}] (* Vaclav Kotesovec, Mar 03 2022 *)

Formula

E.g.f. (1+x)^(-1)*log(1+x)^2/2
a(n) = (-1)^n*det(S(i+3,j+2), 1 <= i,j <= n-2), where S(n,k) are Stirling numbers of the second kind and n>1. [Mircea Merca, Apr 06 2013]
a(n) ~ n! * (-1)^n * log(n)^2/2 * (1 + 2*gamma/log(n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Mar 03 2022

A081052 Difference of Stirling numbers of the first kind.

Original entry on oeis.org

0, 1, -4, 17, -85, 499, -3388, 26200, -227708, 2199276, -23382216, 271461816, -3418002432, 46399476096, -675622445184, 10504980616320, -173726527230720, 3045008035203840, -56389237652344320, 1100174877158791680, -22556707790402304000, 484876713643386624000
Offset: 0

Views

Author

Paul Barry, Mar 05 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[StirlingS1[n,2]-StirlingS1[n,3],{n,30}] (* Harvey P. Dale, May 02 2012 *)
  • PARI
    for(n=1, 22, print1(stirling(n, 2) - stirling(n, 3),", ")) \\ Indranil Ghosh, Mar 11 2017

Formula

a(n) = s(n,2) - s(n,3), s(n,m) = signed Stirling number of the first kind.
E.g.f. (1+x)^-1 * (log(1+x) - (log(1+x)^2)/2).
Conjecture: a(n) +3*(n-1)*a(n-1) +(3*n^2-9*n+7)*a(n-2) +(n-2)^3*a(n-3)=0. - R. J. Mathar, Nov 24 2012

A346944 Expansion of e.g.f. log( 1 + log(1 + x)^2 / 2 ).

Original entry on oeis.org

1, -3, 8, -20, 49, -189, 1791, -21132, 228306, -2274690, 22190772, -230289696, 2756380782, -38757988710, 608149754538, -10057914084048, 171037444641816, -3000345245061048, 55157102668064592, -1077263181846230400, 22411300073192730360, -492846784406541548280
Offset: 2

Views

Author

Ilya Gutkovskiy, Aug 08 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 23; CoefficientList[Series[Log[1 + Log[1 + x]^2/2], {x, 0, nmax}], x] Range[0, nmax]! // Drop[#, 2] &
    a[n_] := a[n] = StirlingS1[n, 2] - (1/n) Sum[Binomial[n, k] StirlingS1[n - k, 2] k a[k], {k, 1, n - 1}]; Table[a[n], {n, 2, 23}]

Formula

a(n) = Stirling1(n,2) - (1/n) * Sum_{k=1..n-1} binomial(n,k) * Stirling1(n-k,2) * k * a(k).
a(n) = Sum_{k=1..floor(n/2)} (-1)^(k-1) * (2*k)! * Stirling1(n,2*k)/(k * 2^k). - Seiichi Manyama, Jan 23 2025

A192563 a(n) = Sum_{k=0..n} abs(Stirling1(n+1,k+1))*Stirling2(n+1,k+1)*k!.

Original entry on oeis.org

1, 2, 13, 161, 3148, 87784, 3274640, 156359874, 9252910816, 662065322016, 56172251821992, 5562573507747288, 634574662217269824, 82482896750780978880, 12101565966159294983808, 1987899464090970683668944, 363036441677797499946379776
Offset: 0

Views

Author

Emanuele Munarini, Jul 04 2011

Keywords

Crossrefs

Diagonal of the array A344639.

Programs

  • Mathematica
    Table[Sum[Abs[StirlingS1[n+1,k+1]]StirlingS2[n+1,k+1]k!,{k,0,n}],{n,0,100}]
  • Maxima
    makelist(sum(abs(stirling1(n+1,k+1))*stirling2(n+1,k+1)*k!,k,0,n),n,0,12);

A344639 Array read by ascending antidiagonals: A(n, k) is the number of (n, k)-poly-Cauchy permutations.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 6, 5, 4, 1, 24, 17, 13, 8, 1, 120, 74, 51, 35, 16, 1, 720, 394, 244, 161, 97, 32, 1, 5040, 2484, 1392, 854, 531, 275, 64, 1, 40320, 18108, 9260, 5248, 3148, 1817, 793, 128, 1, 362880, 149904, 70508, 36966, 20940, 12134, 6411, 2315, 256, 1
Offset: 0

Views

Author

Stefano Spezia, May 25 2021

Keywords

Comments

An (n, k)-poly-Cauchy permutation is a permutation which satisfies the properties listed by Bényi and Ramírez in Definition 1.

Examples

			n\k|   0     1     2     3     4 ...
---+----------------------------
0  |   1     1     1     1     1 ...
1  |   1     2     4     8    16 ...
2  |   2     5    13    35    97 ...
3  |   6    17    51   161   531 ...
4  |  24    74   244   854  3148 ...
...
		

Crossrefs

Rows n=0..2 give A000012, A000079, A007689.
Columns k=0..5 give A000142, A000774, |A223899|, |A223901|, |A223902|, |A223904|.
Main diagonal gives A192563.
Antidiagonal sums give A344640.

Programs

  • Mathematica
    A[n_,k_]:=Sum[Abs[StirlingS1[n,m]](m+1)^k,{m,0,n}]; Flatten[Table[A[n-k,k],{n,0,9},{k,0,n}]]

Formula

A(n, k) = Sum_{m=0..n} abs(S1(n, m)) * (m + 1)^k, where S1 indicates the signed Stirling numbers of first kind (see Theorem 5 in Bényi and Ramírez).
A(n, 0) = n! = A000142(n) (see Example 6 in Bényi and Ramírez).
A(1, k) = 2^k = A000079(k) (see Example 7 in Bényi and Ramírez).
A(2, k) = 2^k + 3^k = A007689(k) (see Example 8 in Bényi and Ramírez).
Sum_{m=0..n} (-1)^m*S2(n, m)*A(m, k) = (-1)^n*(n + 1)^k, where S2 indicates the Stirling numbers of the second kind (see Theorem 9 in Bényi and Ramírez).
A(n, k) = Sum_{j=0..k} j! * abs(S1(n+1, j+1)) * S2(k+1, j+1) (see Theorem 14 in Bényi and Ramírez).
A(n, k) = (n - 1)*A(n-1, k) + Sum_{i=0..k} C(k, i)*A(n-1, k-i) for n > 0 (see Theorem 15 in Bényi and Ramírez).
A(n, k) = Sum_{i=0..n} Sum_{j=0..k} C(n-1, i)*i!*C(k, j)*A(n-1-i, k-j) for n > 0 (see Theorem 17 in Bényi and Ramírez).
A(n, k) = Sum_{m=0..n} Sum_{i=0..m} C(k-i, m-i)*S2(k, i)*abs(S1(n+1, m+1)) (see Theorem 18 in Bényi and Ramírez).
From Seiichi Manyama, Apr 15 2025: (Start)
E.g.f. of column k: Sum_{j>=0} (j+1)^k * (-log(1-x))^j / j!.
E.g.f. of column k: (1/(1-x)) * Sum_{j=0..k} Stirling2(k+1,j+1) * (-log(1-x))^j. (End)

A352074 a(n) = Sum_{k=0..n} Stirling1(n,k) * k! * (-n)^(n-k).

Original entry on oeis.org

1, 1, 4, 42, 904, 34070, 2019888, 174588120, 20804747136, 3276218158560, 659664288364800, 165425062846302336, 50574549124825998336, 18520126461205806360144, 8003819275469728355033088, 4031020344281171589447408000, 2340375822778055527109749211136
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 02 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Unprotect[Power]; 0^0 = 1; Table[Sum[StirlingS1[n, k] k! (-n)^(n - k), {k, 0, n}], {n, 0, 16}]
    Join[{1}, Table[n! SeriesCoefficient[1/(1 + Log[1 - n x]/n), {x, 0, n}], {n, 1, 16}]]
  • PARI
    a(n) = sum(k=0, n, stirling(n, k, 1)*k!*(-n)^(n-k)); \\ Michel Marcus, Mar 02 2022

Formula

a(n) = n! * [x^n] 1 / (1 + log(1 - n*x) / n) for n > 0.
a(n) ~ n! * n^(n-2) * (1 + 2*log(n)/n). - Vaclav Kotesovec, Mar 03 2022

A341575 E.g.f.: log(1 - log(1 - x))^2 / 2.

Original entry on oeis.org

1, 0, 4, 5, 58, 217, 2035, 13470, 134164, 1243770, 14129410, 164244808, 2151576620, 29671566836, 444758323628, 7055358559376, 119546765395744, 2139179551573104, 40486788832168944, 805969129348431936, 16860672502118423136, 369459637224850523808, 8467140450141232328160
Offset: 2

Views

Author

Ilya Gutkovskiy, Feb 15 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 24; CoefficientList[Series[Log[1 - Log[1 - x]]^2/2, {x, 0, nmax}], x] Range[0, nmax]! // Drop[#, 2] &
    Table[Sum[Abs[StirlingS1[n, k]] StirlingS1[k, 2], {k, 2, n}], {n, 2, 24}]

Formula

a(n) = Sum_{k=2..n} |Stirling1(n, k)| * Stirling1(k, 2).
a(n) = (-1)^n * Sum_{k=2..n} Stirling1(n, k) * (k-1)! * H(k-1), where H(k) is the k-th harmonic number.
Showing 1-10 of 13 results. Next