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.

A001286 Lah numbers: a(n) = (n-1)*n!/2.

This page as a plain text file.
%I A001286 M4225 N1766 #176 Jul 15 2025 10:48:59
%S A001286 1,6,36,240,1800,15120,141120,1451520,16329600,199584000,2634508800,
%T A001286 37362124800,566658892800,9153720576000,156920924160000,
%U A001286 2845499424768000,54420176498688000,1094805903679488000,23112569077678080000,510909421717094400000
%N A001286 Lah numbers: a(n) = (n-1)*n!/2.
%C A001286 Number of surjections from {1,...,n} to {1,...,n-1}. - _Benoit Cloitre_, Dec 05 2003
%C A001286 First Eulerian transform of 0,1,2,3,4,... . - _Ross La Haye_, Mar 05 2005
%C A001286 With offset 0 : determinant of the n X n matrix m(i,j)=(i+j+1)!/i!/j!. - _Benoit Cloitre_, Apr 11 2005
%C A001286 These numbers arise when expressing n(n+1)(n+2)...(n+k)[n+(n+1)+(n+2)+...+(n+k)] as sums of squares: n(n+1)[n+(n+1)] = 6(1+4+9+16+ ... + n^2), n(n+1)(n+2)(n+(n+1)+(n+2)) = 36(1+(1+4)+(1+4+9)+...+(1+4+9+16+ ... + n^2)), n(n+1)(n+2)(n+3)(n+(n+1)+(n+2)+(n+3)) = 240(...), ... . - _Alexander R. Povolotsky_, Oct 16 2006
%C A001286 a(n) is the number of edges in the Hasse diagram for the weak Bruhat order on the symmetric group S_n. For permutations p,q in S_n, q covers p in the weak Bruhat order if p,q differ by an adjacent transposition and q has one more inversion than p. Thus 23514 covers 23154 due to the transposition that interchanges the third and fourth entries. Cf. A002538 for the strong Bruhat order. - _David Callan_, Nov 29 2007
%C A001286 a(n) is also the number of excedances in all permutations of {1,2,...,n} (an excedance of a permutation p is a value j such p(j)>j). Proof: j is exceeded (n-1)! times by each of the numbers j+1, j+2, ..., n; now, Sum_{j=1..n} (n-j)(n-1)! = n!(n-1)/2. Example: a(3)=6 because the number of excedances of the permutations 123, 132, 312, 213, 231, 321 are 0, 1, 1, 1, 2, 1, respectively. - _Emeric Deutsch_, Dec 15 2008
%C A001286 (-1)^(n+1)*a(n) is the determinant of the n X n matrix whose (i,j)-th element is 0 for i = j, is j-1 for j>i, and j for j < i. - _Michel Lagneau_, May 04 2010
%C A001286 Row sums of the triangle in A030298. - _Reinhard Zumkeller_, Mar 29 2012
%C A001286 a(n) is the total number of ascents (descents) over all n-permutations. a(n) = Sum_{k=1..n} A008292(n,k)*k. - _Geoffrey Critzer_, Jan 06 2013
%C A001286 For m>=4, a(m-2) is the number of Hamiltonian cycles in a simple graph with m vertices which is complete, except for one edge. Proof: think of distinct round-table seatings of m persons such that persons "1" and "2" may not be neighbors; the count is (m-3)(m-2)!/2. See also A001710. - _Stanislav Sykora_, Jun 17 2014
%C A001286 Popularity of left (right) children in treeshelves. Treeshelves are ordered binary (0-1-2) increasing trees where every child is connected to its parent by a left or a right link. Popularity is the sum of a certain statistic (number of left children, in this case) over all objects of size n. See A278677, A278678 or A278679 for more definitions and examples. See A008292 for the distribution of the left (right) children in treeshelves. - _Sergey Kirgizov_, Dec 24 2016
%D A001286 A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 90, ex. 4.
%D A001286 Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 156.
%D A001286 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.
%D A001286 John Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 44.
%D A001286 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A001286 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A001286 T. D. Noe, <a href="/A001286/b001286.txt">Table of n, a(n) for n = 2..100</a>
%H A001286 Yasmin Aguillon et al., <a href="https://arxiv.org/abs/2206.00541">On Parking Functions and The Tower of Hanoi</a>, arXiv:2206.00541 [math.CO], 2022.
%H A001286 Jean-Luc Baril, Sergey Kirgizov, and Vincent Vajnovszki, <a href="https://arxiv.org/abs/1611.07793">Patterns in treeshelves</a>, arXiv:1611.07793 [cs.DM], 2016.
%H A001286 Kyle Celano, Jennifer Elder, Kimberly P. Hadaway, Pamela E. Harris, Jeremy L. Martin, Amanda Priestley, and Gabe Udell, <a href="https://arxiv.org/abs/2507.07243">Statistics on L-interval parking functions</a>, arXiv:2507.07243 [math.CO], 2025. See p. 7.
%H A001286 Eldar Fischer, Johann A. Makowsky, and Vsevolod Rakita, <a href="https://arxiv.org/abs/2302.08265">MC-finiteness of restricted set partition functions</a>, arXiv:2302.08265 [math.CO], 2023.
%H A001286 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=399">Encyclopedia of Combinatorial Structures 399</a>.
%H A001286 Jennifer Elder, Pamela E. Harris, Jan Kretschmann, and J. Carlos Martínez Mori, <a href="https://arxiv.org/abs/2306.14734">Boolean intervals in the weak order of S_n</a>, arXiv:2306.14734 [math.CO], 2023.
%H A001286 Lucas Chaves Meyles, Pamela E. Harris, Richter Jordaan, Gordon Rojas Kirby, Sam Sehayek, and Ethan Spingarn, <a href="https://arxiv.org/abs/2305.15554">Unit-Interval Parking Functions and the Permutohedron</a>, arXiv:2305.15554 [math.CO], 2023.
%H A001286 Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a>
%H A001286 Sandi Klavžar, Uroš Milutinović and Ciril Petr, <a href="http://dx.doi.org/10.1016/j.exmath.2005.05.003">Hanoi graphs and some classical numbers</a>, Expo. Math. 23 (2005), no. 4, 371-378.
%H A001286 Siegfried Lehr, Jeffrey Shallit, and John Tromp, <a href="http://dx.doi.org/10.1016/0304-3975(95)00234-0">On the vector space of the automatic reals</a>, Theoret. Comput. Sci. 163 (1996), no. 1-2, 193-210.
%H A001286 P. A. Piza, <a href="http://www.jstor.org/stable/3029339">Kummer numbers</a>, Mathematics Magazine, 21 (1947/1948), 257-260.
%H A001286 P. A. Piza, <a href="/A001117/a001117.pdf">Kummer numbers</a>, Mathematics Magazine, 21 (1947/1948), 257-260. [Annotated scanned copy]
%H A001286 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BruhatGraph.html">Bruhat Graph</a>.
%H A001286 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/EdgeCount.html">Edge Count</a>.
%H A001286 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PermutationAscent.html">Permutation Ascent</a>.
%F A001286 a(n) = Sum_{i=0..n-1} (-1)^(n-i-1) * i^n * binomial(n-1,i). - Yong Kong (ykong(AT)curagen.com), Dec 26 2000 [corrected by _Amiram Eldar_, May 02 2022]
%F A001286 E.g.f.: x^2/[2(1-x)^2]. - _Ralf Stephan_, Apr 02 2004
%F A001286 a(n+1) = (-1)^(n+1)*det(M_n) where M_n is the n X n matrix M_(i,j)=max(i*(i+1)/2,j*(j+1)/2). - _Benoit Cloitre_, Apr 03 2004
%F A001286 Row sums of table A051683. - _Alford Arnold_, Sep 29 2006
%F A001286 5th binomial transform of A135218: (1, 1, 1, 25, 25, 745, 3145, ...). - _Gary W. Adamson_, Nov 23 2007
%F A001286 If we define f(n,i,x) = Sum_{k=i..n} Sum_{j=i..k} binomial(k,j)*Stirling1(n,k)*Stirling2(j,i)*x^(k-j) then a(n)=(-1)^n*f(n,2,-2), (n>=2). - _Milan Janjic_, Mar 01 2009
%F A001286 a(n) = A000217(n-1)*A000142(n-1). - _Reinhard Zumkeller_, May 15 2010
%F A001286 a(n) = (n+1)!*Sum_{k=1..n-1} 1/(k^2+3*k+2). - _Gary Detlefs_, Sep 14 2011
%F A001286 Sum_{n>=2} 1/a(n) = 2*(2 - exp(1) - gamma + Ei(1)) = 1.19924064599..., where gamma = A001620 and Ei(1) = A091725. - _Ilya Gutkovskiy_, Nov 24 2016
%F A001286 a(n+1) = a(n)*n*(n+1)/(n-1). - _Chai Wah Wu_, Apr 11 2018
%F A001286 Sum_{n>=2} (-1)^n/a(n) = 2*(gamma - Ei(-1)) - 2/e, where e = A001113 and Ei(-1) = -A099285. - _Amiram Eldar_, May 02 2022
%e A001286 G.f. = x^2 + 6*x^3 + 36*x^4 + 240*x^5 + 1800*x^6 + 15120*x^7 + 141120*x^8 + ...
%e A001286 a(10) = (1+2+3+4+5+6+7+8+9)*(1*2*3*4*5*6*7*8*9) = 16329600. - _Reinhard Zumkeller_, May 15 2010
%p A001286 seq(sum(mul(j,j=3..n), k=2..n), n=2..21); # _Zerinvary Lajos_, Jun 01 2007
%t A001286 Table[Sum[n!, {i, 2, n}]/2, {n, 2, 20}] (* _Zerinvary Lajos_, Jul 12 2009 *)
%t A001286 nn=20;With[{a=Accumulate[Range[nn]],t=Range[nn]!},Times@@@Thread[{a,t}]] (* _Harvey P. Dale_, Jan 26 2013 *)
%t A001286 Table[(n - 1) n! / 2, {n, 2, 30}] (* _Vincenzo Librandi_, Sep 09 2016 *)
%o A001286 (Sage) [(n-1)*factorial(n)/2 for n in range(2, 21)] # _Zerinvary Lajos_, May 16 2009
%o A001286 (Haskell)
%o A001286 a001286 n = sum[1..n-1] * product [1..n-1]
%o A001286 -- _Reinhard Zumkeller_, Aug 01 2011
%o A001286 (Maxima) A001286(n):=(n-1)*n!/2$
%o A001286 makelist(A001286(n),n,1,30); /* _Martin Ettl_, Nov 03 2012 */
%o A001286 (PARI) a(n)=(n-1)*n!/2 \\ _Charles R Greathouse IV_, Nov 20 2012
%o A001286 (Magma) [(n-1)*Factorial(n)/2: n in [2..25]]; // _Vincenzo Librandi_, Sep 09 2016
%o A001286 (Python)
%o A001286 from __future__ import division
%o A001286 A001286_list = [1]
%o A001286 for n in range(2,100):
%o A001286     A001286_list.append(A001286_list[-1]*n*(n+1)//(n-1)) # _Chai Wah Wu_, Apr 11 2018
%Y A001286 Cf. A001710, A052609, A062119, A075181, A060638, A060608, A060570, A060612, A135218, A019538, A053495, A051683, A213168, A278677, A278678, A278679, A008292.
%Y A001286 A002868 is an essentially identical sequence.
%Y A001286 Column 2 of |A008297|.
%Y A001286 Third column (m=2) of triangle |A111596(n, m)|: matrix product of |S1|.S2 Stirling number matrices.
%Y A001286 Cf. also A000110, A000111.
%Y A001286 Cf. A001113, A001620, A091725, A099285.
%K A001286 nonn,easy,nice
%O A001286 2,2
%A A001286 _N. J. A. Sloane_