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 21 results. Next

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

Original entry on oeis.org

1, 6, 36, 240, 1800, 15120, 141120, 1451520, 16329600, 199584000, 2634508800, 37362124800, 566658892800, 9153720576000, 156920924160000, 2845499424768000, 54420176498688000, 1094805903679488000, 23112569077678080000, 510909421717094400000
Offset: 2

Views

Author

Keywords

Comments

Number of surjections from {1,...,n} to {1,...,n-1}. - Benoit Cloitre, Dec 05 2003
First Eulerian transform of 0,1,2,3,4,... . - Ross La Haye, Mar 05 2005
With offset 0 : determinant of the n X n matrix m(i,j)=(i+j+1)!/i!/j!. - Benoit Cloitre, Apr 11 2005
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
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
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
(-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
Row sums of the triangle in A030298. - Reinhard Zumkeller, Mar 29 2012
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
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
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

Examples

			G.f. = x^2 + 6*x^3 + 36*x^4 + 240*x^5 + 1800*x^6 + 15120*x^7 + 141120*x^8 + ...
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
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 90, ex. 4.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 156.
  • 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.
  • John Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 44.
  • 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

A002868 is an essentially identical sequence.
Column 2 of |A008297|.
Third column (m=2) of triangle |A111596(n, m)|: matrix product of |S1|.S2 Stirling number matrices.
Cf. also A000110, A000111.

Programs

Formula

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]
E.g.f.: x^2/[2(1-x)^2]. - Ralf Stephan, Apr 02 2004
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
Row sums of table A051683. - Alford Arnold, Sep 29 2006
5th binomial transform of A135218: (1, 1, 1, 25, 25, 745, 3145, ...). - Gary W. Adamson, Nov 23 2007
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
a(n) = A000217(n-1)*A000142(n-1). - Reinhard Zumkeller, May 15 2010
a(n) = (n+1)!*Sum_{k=1..n-1} 1/(k^2+3*k+2). - Gary Detlefs, Sep 14 2011
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
a(n+1) = a(n)*n*(n+1)/(n-1). - Chai Wah Wu, Apr 11 2018
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

A052849 a(0) = 0; a(n) = 2*n! (n >= 1).

Original entry on oeis.org

0, 2, 4, 12, 48, 240, 1440, 10080, 80640, 725760, 7257600, 79833600, 958003200, 12454041600, 174356582400, 2615348736000, 41845579776000, 711374856192000, 12804747411456000, 243290200817664000, 4865804016353280000, 102181884343418880000, 2248001455555215360000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

For n >= 1 a(n) is the size of the centralizer of a transposition in the symmetric group S_(n+1). - Ahmed Fares (ahmedfares(AT)my-deja.com), May 12 2001
For n > 0, a(n) = n! - A062119(n-1) = number of permutations of length n that have two specified elements adjacent. For example, a(4) = 12 as of the 24 permutations, 12 have say 1 and 2 adjacent: 1234, 2134, 1243, 2143, 3124, 3214, 4123, 4213, 3412, 3421, 4312, 4321. - Jon Perry, Jun 08 2003
With different offset, denominators of certain sums computed by Ramanujan.
From Michael Somos, Mar 04 2004: (Start)
Stirling transform of a(n) = [2, 4, 12, 48, 240, ...] is A000629(n) = [2, 6, 26, 150, 1082, ...].
Stirling transform of a(n-1) = [1, 2, 4, 12, 48, ...] is A007047(n-1) = [1, 3, 11, 51, 299, ...].
Stirling transform of a(n) = [1, 4, 12, 48, 240, ...] is A002050(n) = [1, 5, 25, 149, 1081, ...].
Stirling transform of 2*A006252(n) = [2, 2, 4, 8, 28, ...] is a(n) = [2, 4, 12, 48, 240, ...].
Stirling transform of a(n+1) = [4, 12, 48, 240, ...] is 2*A005649(n) = [4, 16, 88, 616, ...].
Stirling transform of a(n+1) = [4, 12, 48, 240, ...] is 4*A083410(n) = [4, 16, 88, 616, ...]. (End)
Number of {12, 12*, 21, 21*}-avoiding signed permutations in the hyperoctahedral group.
Permanent of the (0, 1)-matrices with (i, j)-th entry equal to 0 if and only if it is in the border but not the corners. The border of a matrix is defined the be the first and the last row, together with the first and the last column. The corners of a matrix are the entries (i = 1, j = 1), (i = 1, j = n), (i = n, j = 1) and (i = n, j = n). - Simone Severini, Oct 17 2004

References

  • B. C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, see p. 520.

Crossrefs

Essentially the same sequence as A098558.
Row 3 of A276955 (from term a(2)=4 onward).

Programs

  • Haskell
    a052849 n = if n == 0 then 0 else 2 * a000142 n
    a052849_list = 0 : fs where fs = 2 : zipWith (*) [2..] fs
    -- Reinhard Zumkeller, Aug 31 2014
    
  • Magma
    [0] cat [2*Factorial(n-1): n in [2..25]]; // Vincenzo Librandi, Nov 03 2014
  • Maple
    spec := [S,{B=Cycle(Z),C=Cycle(Z),S=Union(B,C)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    Join[{0}, 2Range[20]!] (* Harvey P. Dale, Jul 13 2013 *)
  • PARI
    a(n)=if(n<1,0,n!*2)
    

Formula

a(n) = T(n, 2) for n>1, where T is defined as in A080046.
D-finite with recurrence: {a(0) = 0, a(1) = 2, (-1 - n)*a(n+1) + a(n+2)=0}.
E.g.f.: 2*x/(1-x).
a(n) = A090802(n, n - 1) for n > 0. - Ross La Haye, Sep 26 2005
For n >= 1, a(n) = (n+3)!*Sum_{k=0..n+2} (-1)^k*binomial(2, k)/(n + 3 - k). - Milan Janjic, Dec 14 2008
G.f.: 2/Q(0) - 2, where Q(k) = 1 - x*(k + 1)/(1 - x*(k + 1)/Q(k+1) ); (continued fraction ). - Sergei N. Gladkovskii, Apr 01 2013
G.f.: -2 + 2/Q(0), where Q(k) = 1 + k*x - x*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 01 2013
G.f.: W(0) - 2 , where W(k) = 1 + 1/( 1 - x*(k+1)/( x*(k+1) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 21 2013
a(n) = A245334(n, n-1), n > 0. - Reinhard Zumkeller, Aug 31 2014
From Amiram Eldar, Jan 15 2023: (Start)
Sum_{n>=1} 1/a(n) = (e-1)/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = (e-1)/(2*e). (End)

Extensions

More terms from Ross La Haye, Sep 26 2005

A257503 Square array A(row,col) read by antidiagonals: A(1,col) = A256450(col-1), and for row > 1, A(row,col) = A255411(A(row-1,col)); Dispersion of factorial base shift A255411 (array transposed).

Original entry on oeis.org

1, 2, 4, 3, 12, 18, 5, 16, 72, 96, 6, 22, 90, 480, 600, 7, 48, 114, 576, 3600, 4320, 8, 52, 360, 696, 4200, 30240, 35280, 9, 60, 378, 2880, 4920, 34560, 282240, 322560, 10, 64, 432, 2976, 25200, 39600, 317520, 2903040, 3265920, 11, 66, 450, 3360, 25800, 241920, 357840, 3225600, 32659200, 36288000, 13, 70, 456, 3456, 28800, 246240, 2540160, 3588480, 35925120, 399168000, 439084800
Offset: 1

Views

Author

Antti Karttunen, Apr 27 2015

Keywords

Comments

The array is read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
The first row (A256450) contains all the numbers which have at least one 1-digit in their factorial base representation (see A007623), after which the successive rows are obtained from the terms on the row immediately above by shifting their factorial representation one left and then incrementing the nonzero digits in that representation with a factorial base shift-operation A255411.

Examples

			The top left corner of the array:
     1,     2,     3,     5,      6,      7,      8,      9,     10,     11,     13
     4,    12,    16,    22,     48,     52,     60,     64,     66,     70,     76
    18,    72,    90,   114,    360,    378,    432,    450,    456,    474,    498
    96,   480,   576,   696,   2880,   2976,   3360,   3456,   3480,   3576,   3696
   600,  3600,  4200,  4920,  25200,  25800,  28800,  29400,  29520,  30120,  30840
  4320, 30240, 34560, 39600, 241920, 246240, 272160, 276480, 277200, 281520, 286560
  ...
		

Crossrefs

Transpose: A257505.
Inverse permutation: A257504.
Row index: A257679, Column index: A257681.
Row 1: A256450, Row 2: A257692, Row 3: A257693.
Columns 1-3: A001563, A062119, A130744 (without their initial zero-terms).
Column 4: A213167 (without the initial one).
Column 5: A052571 (without initial zeros).
Cf. also permutations A255565 and A255566.
Thematically similar arrays: A083412, A135764, A246278.

Programs

Formula

A(1,col) = A256450(col-1), and for row > 1, A(row,col) = A255411(A(row-1,col)).

Extensions

Formula changed because of the changed starting offset of A256450 - Antti Karttunen, May 30 2016

A257505 Square array A(row,col): A(row,1) = A256450(row-1), and for col > 1, A(row,col) = A255411(A(row,col-1)); Dispersion of factorial base shift A255411.

Original entry on oeis.org

1, 4, 2, 18, 12, 3, 96, 72, 16, 5, 600, 480, 90, 22, 6, 4320, 3600, 576, 114, 48, 7, 35280, 30240, 4200, 696, 360, 52, 8, 322560, 282240, 34560, 4920, 2880, 378, 60, 9, 3265920, 2903040, 317520, 39600, 25200, 2976, 432, 64, 10, 36288000, 32659200, 3225600, 357840, 241920, 25800, 3360, 450, 66, 11, 439084800, 399168000, 35925120, 3588480, 2540160, 246240, 28800, 3456, 456, 70, 13
Offset: 1

Views

Author

Antti Karttunen, Apr 27 2015

Keywords

Comments

The array is read by downward antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
In Kimberling's terminology, this array is called the dispersion of sequence A255411 (when started from its first nonzero term, 4). The left column is the complement of that sequence, which is A256450.

Examples

			The top left corner of the array:
   1,   4,  18,   96,   600,   4320,   35280,   322560,   3265920
   2,  12,  72,  480,  3600,  30240,  282240,  2903040,  32659200
   3,  16,  90,  576,  4200,  34560,  317520,  3225600,  35925120
   5,  22, 114,  696,  4920,  39600,  357840,  3588480,  39553920
   6,  48, 360, 2880, 25200, 241920, 2540160, 29030400, 359251200
   7,  52, 378, 2976, 25800, 246240, 2575440, 29352960, 362517120
   8,  60, 432, 3360, 28800, 272160, 2822400, 31933440, 391910400
   9,  64, 450, 3456, 29400, 276480, 2857680, 32256000, 395176320
  10,  66, 456, 3480, 29520, 277200, 2862720, 32296320, 395539200
  11,  70, 474, 3576, 30120, 281520, 2898000, 32618880, 398805120
  13,  76, 498, 3696, 30840, 286560, 2938320, 32981760, 402433920
  14,  84, 552, 4080, 33840, 312480, 3185280, 35562240, 431827200
  15,  88, 570, 4176, 34440, 316800, 3220560, 35884800, 435093120
  17,  94, 594, 4296, 35160, 321840, 3260880, 36247680, 438721920
  19, 100, 618, 4416, 35880, 326880, 3301200, 36610560, 442350720
  20, 108, 672, 4800, 38880, 352800, 3548160, 39191040, 471744000
  21, 112, 690, 4896, 39480, 357120, 3583440, 39513600, 475009920
  23, 118, 714, 5016, 40200, 362160, 3623760, 39876480, 478638720
  ...
		

Crossrefs

Transpose: A257503.
Inverse permutation: A257506.
Row index: A257681, Column index: A257679.
Columns 1-3: A256450, A257692, A257693.
Rows 1-3: A001563, A062119, A130744 (without their initial zero-terms).
Row 4: A213167 (without the initial one).
Row 5: A052571 (without initial zeros).
Cf. also permutations A255565, A255566.
Thematically similar arrays: A035513, A054582, A246279.

Programs

Formula

A(row,1) = A256450(row-1), and for col > 1, A(row,col) = A255411(A(row,col-1)).

Extensions

Formula changed because of the changed starting offset of A256450 - Antti Karttunen, May 30 2016

A067318 Sum of the reflection lengths of all permutations of n letters.

Original entry on oeis.org

0, 1, 7, 46, 326, 2556, 22212, 212976, 2239344, 25659360, 318540960, 4261576320, 61148511360, 937030429440, 15275952518400, 264030355814400, 4823280687052800, 92865738644582400, 1879691760950169600, 39905092126771200000, 886664974825728000000
Offset: 1

Views

Author

H. Nick Hann (nickhann(AT)aol.com), Jan 15 2002

Keywords

Comments

The reflection length of a permutation is the minimum number of transpositions needed to express the permutation.
May also be called the "weight" of the symmetric group S_n.
a(n) is the number of n+1-permutations that have at least 3 cycles. a(n) = Sum_{k=3..n+1} A132393(n+1,k). Cf. A001563 (n-permutations with at least 2 cycles). - Geoffrey Critzer, Dec 01 2013
The number of covering relations in the middle order on S_n. - Bridget Tenner, Jul 11 2025

Examples

			a(3)=7 since the permutations are 1, (12), (13), (23), (12)(13) and (13)(12). The sum of reflection lengths of all elements in S_3 is 0+1+1+1+2+2=7.
The terms satisfy the series: x/(1-x) = x/((1+x)*(1+2*x)*(1+3*x)) + 7*x^2/((1+x)*(1+2*x)*(1+3*x)*(1+4*x)) + 46*x^3/((1+x)*(1+2*x)*(1+3*x)*(1+4*x)*(1+5*x)) + 326*x^4/((1+x)*(1+2*x)*(1+3*x)*(1+4*x)*(1+5*x)*(1+6*x)) + ... - _Paul D. Hanna_, Aug 28 2012
		

References

  • N. Hann, Average Weight of a Random Permutation, preprint, 2002. [Apparently unpublished]

Crossrefs

Programs

  • Maple
    ZL :=[S, {S = Set(Cycle(Z),3 <= card)}, labelled]: seq(combstruct[count](ZL, size=n), n=2..22); # Zerinvary Lajos, Mar 25 2008
  • Mathematica
    a[n_] := n!*(n - HarmonicNumber[n]); Table[a[n], {n, 1, 21}](* Jean-François Alcover, Feb 10 2012 *)
    nn=22;Drop[Range[0,nn]!CoefficientList[Series[1/(1-x)-1-Log[1/(1-x)]-Log[1/(1-x)]^2/2!,{x,0,nn}],x],2] (* Geoffrey Critzer, Dec 01 2013 *)
  • Maxima
    A067318(n):=n*n! - abs(stirling1(n+1, 2))$
    makelist(A067318(n),n,1,30); /* Martin Ettl, Nov 03 2012 */
  • PARI
    {a(n)=if(n==0,0,if(n==1, 1, 1-polcoeff(sum(k=1, n-1, a(k)*x^k/prod(j=1, k+2, (1+j*x+x*O(x^n)) ) ), n)))} /* Paul D. Hanna, Aug 28 2012 */
    

Formula

a(n) = n!*(0/1+1/2+...+(n-1)/n) = n!*(n - H_n), where H_n = Sum_{k=1..n} 1/k; a(1) = 0, a(2) = 1, a(n) = n*a(n-1) + (n-1)*(n-1)!.
a(n) = n*n! - abs(stirling1(n+1, 2)) (cf. A000254). E.g.f.: (x+(1-x)*log(1-x))/(1-x)^2. - Vladeta Jovovic, Feb 01 2003
a(n) = T(n, n-1) for the triangle read by rows: [0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, ...] DELTA [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 30 2003
G.f.: x/(1-x) = Sum_{n>=1} a(n)*x^n/Product_{k=1..n+2} (1+k*x). - Paul D. Hanna, Aug 28 2012
a(n) = A062119(n) - A001705(n-1). - Anton Zakharov, Sep 22 2016

Extensions

Definition and example edited by Bridget Tenner, Jul 11 2025

A282466 a(n) = n*a(n-1) + n!, with n>0, a(0)=5.

Original entry on oeis.org

5, 6, 14, 48, 216, 1200, 7920, 60480, 524160, 5080320, 54432000, 638668800, 8143027200, 112086374400, 1656387532800, 26153487360000, 439378587648000, 7825123418112000, 147254595231744000, 2919482409811968000, 60822550204416000000, 1328364496464445440000
Offset: 0

Views

Author

Bruno Berselli, Feb 22 2017

Keywords

References

  • C. Mariconda and A. Tonolo, Calcolo discreto, Apogeo (2012), page 240 (Example 9.57 gives the recurrence).

Crossrefs

Cf. A229039.
Cf. sequences with formula (n + k)*n!: A052521 (k=-5), A282822 (k=-4), A052520 (k=-3), A052571 (k=-2), A062119 (k=-1), A001563 (k=0), A000142 (k=1), A001048 (k=2), A052572 (k=3), A052644 (k=4), this sequence (k=5).

Programs

  • Magma
    A282466:= func< n | (n+5)*Factorial(n) >; // G. C. Greubel, May 14 2025
    
  • Mathematica
    RecurrenceTable[{a[0] == 5, a[n] == n a[n - 1] + n!}, a, {n, 0, 30}] (* or *)
    Table[(n + 5) n!, {n, 0, 30}]
  • SageMath
    def A282466(n): return (n+5)*factorial(n) # G. C. Greubel, May 14 2025

Formula

E.g.f.: (5 - 4*x)/(1 - x)^2.
a(n) = (n + 5)*n!.
a(n) = 2*A229039(n) for n>0.
From Amiram Eldar, Nov 06 2020: (Start)
Sum_{n>=0} 1/a(n) = 9*e - 24.
Sum_{n>=0} (-1)^n/a(n) = 24 - 65/e. (End)

A066324 Number of endofunctions on n labeled points constructed from k rooted trees.

Original entry on oeis.org

1, 2, 2, 9, 12, 6, 64, 96, 72, 24, 625, 1000, 900, 480, 120, 7776, 12960, 12960, 8640, 3600, 720, 117649, 201684, 216090, 164640, 88200, 30240, 5040, 2097152, 3670016, 4128768, 3440640, 2150400, 967680, 282240, 40320, 43046721
Offset: 1

Views

Author

Christian G. Bower, Dec 14 2001

Keywords

Comments

T(n,k) = number of endofunctions with k recurrent elements. - Mitch Harris, Jul 06 2006
The sum of row n is n^n, for any n. Basically the same sequence arises when studying random mappings (see A243203, A243202). - Stanislav Sykora, Jun 01 2014

Examples

			Triangle T(n,k) begins:
       1;
       2,      2;
       9,     12,      6;
      64,     96,     72,     24;
     625,   1000,    900,    480,   120;
    7776,  12960,  12960,   8640,  3600,   720;
  117649, 201684, 216090, 164640, 88200, 30240, 5040;
  ...
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 87, see (2.3.28).
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983, ex. 3.3.32.

Crossrefs

Column 1: A000169.
Main diagonal: A000142.
T(n, n-1): A062119.
Row sums give A000312.

Programs

  • Maple
    T:= (n, k)-> k*n^(n-k)*(n-1)!/(n-k)!:
    seq(seq(T(n, k), k=1..n), n=1..10);  # Alois P. Heinz, Aug 22 2012
  • Mathematica
    f[list_] := Select[list, # > 0 &]; t = Sum[n^(n - 1) x^n/n!, {n, 1, 20}]; Flatten[Map[f, Drop[Range[0, 10]! CoefficientList[Series[1/(1 - y*t), {x, 0, 10}], {x, y}], 1]]] (* Geoffrey Critzer, Dec 05 2011 *)
  • PARI
    T(n, k)=k*n^(n-k)*(n-1)!/(n-k)! \\ Charles R Greathouse IV, Dec 05 2011

Formula

T(n,k) = k*n^(n-k)*(n-1)!/(n-k)!.
E.g.f. (relative to x): A(x, y)=1/(1-y*B(x)) - 1 = y*x +(2*y+2*y^2)*x^2/2! + (9*y+12*y^2+6*y^3)*x^3/3! + ..., where B(x) is e.g.f. A000169.
From Peter Bala, Sep 30 2011: (Start)
Let F(x,t) = x/(1+t*x)*exp(-x/(1+t*x)) = x*(1 - (1+t)*x + (1+4*t+2*t^2)*x^2/2! - ...). F is essentially the e.g.f. for A144084 (see also A021010). Then the e.g.f. for the present table is t*F(x,t)^(-1), where the compositional inverse is taken with respect to x.
Removing a factor of n from the n-th row entries results in A122525 in row reversed form.
(End)
Sum_{k=2..n} (k-1) * T(n,k) = A001864(n). - Geoffrey Critzer, Aug 19 2013
Sum_{k=1..n} k * T(n,k) = A063169(n). - Alois P. Heinz, Dec 15 2021

A156992 Triangle T(n,k) = n!*binomial(n-1, k-1) for 1 <= k <= n, read by rows.

Original entry on oeis.org

1, 2, 2, 6, 12, 6, 24, 72, 72, 24, 120, 480, 720, 480, 120, 720, 3600, 7200, 7200, 3600, 720, 5040, 30240, 75600, 100800, 75600, 30240, 5040, 40320, 282240, 846720, 1411200, 1411200, 846720, 282240, 40320, 362880, 2903040, 10160640, 20321280, 25401600, 20321280, 10160640, 2903040, 362880
Offset: 1

Views

Author

Roger L. Bagula, Feb 20 2009

Keywords

Comments

Partition {1,2,...,n} into m subsets, arrange (linearly order) the elements within each subset, then arrange the subsets. - Geoffrey Critzer, Mar 05 2010
From Dennis P. Walsh, Nov 26 2011: (Start)
Number of ways to arrange n different books in a k-shelf bookcase leaving no shelf empty.
There are n! ways to arrange the books in one long line. With ni denoting the number of books for shelf i, we have n = n1 + n2 + ... + nk. Since the number of compositions of n with k summands is binomial(n-1,k-1), we obtain T(n,k) = n!*binomial(n-1,k-1) for the number of ways to arrange the n books on the k shelves.
Equivalently, T(n,k) is the number of ways to stack n different alphabet blocks into k labeled stacks.
Also, T(n,k) is the number of injective functions f:[n]->[n+k] such that (i) the pre-image of (n+j) exists for j=1..k and (ii) f has no fixed points, that is, for all x, f(x) does not equal x.
T(n,k) is the number of labeled, rooted forests that have (i) exactly k roots, (ii) each root labeled larger than any nonroot, (iii) each root with exactly one child node, (iv) n non-root nodes, and (v) at most one child node for each node in the forest.
(End)
Essentially, the triangle given by (2,1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,...) DELTA (2,1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 29 2011
T(n,j+k) = Sum_{i=j..n-k} binomial(n,i)*T(i,j)*T(n-i,k). - Dennis P. Walsh, Nov 29 2011

Examples

			The triangle starts:
      1;
      2,      2;
      6,     12,      6;
     24,     72,     72,      24;
    120,    480,    720,     480,     120;
    720,   3600,   7200,    7200,    3600,    720;
   5040,  30240,  75600,  100800,   75600,  30240,   5040;
  40320, 282240, 846720, 1411200, 1411200, 846720, 282240, 40320;
From _Dennis P. Walsh_, Nov 26 2011: (Start)
T(3,2) = 12 since there are 12 ways to arrange books b1, b2, and b3 on shelves <shelf1><shelf2>:
   <b1><b2,b3>, <b1><b3,b2>, <b2><b1,b3>, <b2><b3,b1>,
   <b3><b1,b2>, <b3><b2,b1>, <b2,b3><b1>, <b3,b2><b1>,
   <b1,b3><b2>, <b3,b1><b2>, <b1,b2><b3>, <b2,b1><b3>.
(End)
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 98

Crossrefs

Cf. A002866 (row sums).
Column 1 = A000142. Column 2 = A001286 * 2! = A062119. Column 3 = A001754 * 3!. Column 4 = A001755 * 4!. Column 5 = A001777 * 5!. Column 6 = A001778 * 6!. Column 7 = A111597 * 7!. Column 8 = A111598 * 8!. Cf. A105278. - Geoffrey Critzer, Mar 05 2010
T(2n,n) gives A123072.

Programs

  • Magma
    [Factorial(n)*Binomial(n-1,k-1): k in [1..n], n in [1..10]]; // G. C. Greubel, May 10 2021
    
  • Maple
    seq(seq(n!*binomial(n-1,k-1),k=1..n),n=1..10); # Dennis P. Walsh, Nov 26 2011
    with(PolynomialTools): p := (n,x) -> (n+1)!*hypergeom([-n],[],-x);
    seq(CoefficientList(simplify(p(n,x)),x),n=0..5); # Peter Luschny, Apr 08 2015
  • Mathematica
    Table[n!*Binomial[n-1, k-1], {n,10}, {k,n}]//Flatten
  • Sage
    flatten([[factorial(n)*binomial(n-1,k-1) for k in (1..n)] for n in (1..10)]) # G. C. Greubel, May 10 2021

Formula

E.g.f. for column k is (x/(1-x))^k. - Geoffrey Critzer, Mar 05 2010
T(n,k) = A000142(n)*A007318(n-1,k-1). - Dennis P. Walsh, Nov 26 2011
Coefficient triangle of the polynomials p(n,x) = (n+1)!*hypergeom([-n],[],-x). - Peter Luschny, Apr 08 2015

A324225 Total number T(n,k) of 1's in falling diagonals with index k in all n X n permutation matrices; triangle T(n,k), n>=1, 1-n<=k<=n-1, read by rows.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 6, 4, 2, 6, 12, 18, 24, 18, 12, 6, 24, 48, 72, 96, 120, 96, 72, 48, 24, 120, 240, 360, 480, 600, 720, 600, 480, 360, 240, 120, 720, 1440, 2160, 2880, 3600, 4320, 5040, 4320, 3600, 2880, 2160, 1440, 720, 5040, 10080, 15120, 20160, 25200, 30240, 35280, 40320, 35280, 30240, 25200, 20160, 15120, 10080, 5040
Offset: 1

Views

Author

Alois P. Heinz, Feb 18 2019

Keywords

Comments

T(n,k) is the number of occurrences of k in all (signed) displacement lists [p(i)-i, i=1..n] of permutations p of [n].

Examples

			The 6 permutations p of [3]: 123, 132, 213, 231, 312, 321 have (signed) displacement lists [p(i)-i, i=1..3]: [0,0,0], [0,1,-1], [1,-1,0], [1,1,-2], [2,-1,-1], [2,0,-2], representing the indices of falling diagonals of 1's in the permutation matrices
  [1    ]  [1    ]  [  1  ]  [  1  ]  [    1]  [    1]
  [  1  ]  [    1]  [1    ]  [    1]  [1    ]  [  1  ]
  [    1]  [  1  ]  [    1]  [1    ]  [  1  ]  [1    ] , respectively. Indices -2 and 2 occur twice, -1 and 1 occur four times, and 0 occurs six times. So row n=3 is [2, 4, 6, 4, 2].
Triangle T(n,k) begins:
  :                             1                           ;
  :                        1,   2,   1                      ;
  :                   2,   4,   6,   4,   2                 ;
  :              6,  12,  18,  24,  18,  12,   6            ;
  :        24,  48,  72,  96, 120,  96,  72,  48,  24       ;
  :  120, 240, 360, 480, 600, 720, 600, 480, 360, 240, 120  ;
		

Crossrefs

Columns k=0-6 give (offsets may differ): A000142, A001563, A062119, A052571, A052520, A282822, A052521.
Row sums give A001563.
T(n+1,n) gives A000142.
T(n+1,n-1) gives A052849.
T(n+1,n-2) gives A052560 for n>1.
Cf. A152883 (right half of this triangle without center column), A162608 (left half of this triangle), A306461, A324224.
Cf. A001710.

Programs

  • Maple
    b:= proc(s, c) option remember; (n-> `if`(n=0, c,
          add(b(s minus {i}, c+x^(n-i)), i=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1-n..n-1))(b({$1..n}, 0)):
    seq(T(n), n=1..8);
    # second Maple program:
    egf:= k-> (t-> x^t/t*hypergeom([2, t], [t+1], x))(abs(k)+1):
    T:= (n, k)-> n! * coeff(series(egf(k), x, n+1), x, n):
    seq(seq(T(n, k), k=1-n..n-1), n=1..8);
    # third Maple program:
    T:= (n, k)-> (t-> `if`(t
    				
  • Mathematica
    T[n_, k_] := With[{t = Abs[k]}, If[tJean-François Alcover, Mar 25 2021, after 3rd Maple program *)

Formula

T(n,k) = T(n,-k).
T(n,k) = (n-t)*(n-1)! if t < n with t = |k|, T(n,k) = 0 otherwise.
T(n,k) = |k|! * A324224(n,k).
E.g.f. of column k: x^t/t * hypergeom([2, t], [t+1], x) with t = |k|+1.
|T(n,k)-T(n,k-1)| = (n-1)! for k = 1-n..n.
Sum_{k=0..n-1} T(n,k) = A001710(n+1).

A233357 Triangle read by rows: T(n,k) = ((Stirling2)^2)(n,k) * k!

Original entry on oeis.org

1, 2, 2, 5, 12, 6, 15, 64, 72, 24, 52, 350, 660, 480, 120, 203, 2024, 5670, 6720, 3600, 720, 877, 12460, 48552, 83160, 71400, 30240, 5040, 4140, 81638, 424536, 983808, 1201200, 806400, 282240, 40320
Offset: 1

Views

Author

Tilman Piesk, Dec 07 2013

Keywords

Comments

T(n,k) is the number of preferential arrangements with k levels of partitions of the set {1...n}.
2*T(n,k) is the number of formulas in first order logic that have an n-place predicate and k runs of A's and E's (universal and existential quantifiers, compare runs of 0's ans 1's counted by A005811), but don't include a negator.
4*T(n,k) is the number of such formulas that may include an negator.
T(n,k) is the number of partitions of an n-set into colored blocks, such that exactly k colors are used. T(3,2) = 12: 1a|23b, 1b|23a, 13a|2b, 13b|2a, 12a|3b, 12b|3a, 1a|2a|3b, 1b|2b|3a, 1a|2b|3a, 1b|2a|3b, 1a|2b|3b, 1b|2a|3a. - Alois P. Heinz, Sep 01 2019

Examples

			Let the colon ":" be a separator between two levels. E.g. in {1,2}:{3} the set {1,2} is on the first level, the set {3} is on the second level.
Compare descriptions of A083355 and A232598.
a(3,1)=5:
{1,2,3}
{1,2}{3}
{1,3}{2}
{2,3}{1}
{1}{2}{3}
a(3,2)=12:
{1,2}:{3}   {3}:{1,2}
{1,3}:{2}   {2}:{1,3}
{2,3}:{1}   {1}:{2,3}
{1}{2}:{3}   {3}:{1}{2}
{1}{3}:{2}   {2}:{1}{3}
{2}{3}:{1}   {1}:{2}{3}
a(3,3)=6:
{1}:{2}:{3}
{1}:{3}:{2}
{2}:{1}:{3}
{2}:{3}:{1}
{3}:{1}:{2}
{3}:{2}:{1}
Triangle begins:
       k = 1     2      3      4       5      6      7     8           sums
1          1                                                              1
2          2     2                                                        4
3          5    12      6                                                23
4         15    64     72     24                                        175
5         52   350    660    480     120                               1662
6        203  2024   5670   6720    3600    720                       18937
7        877 12460  48552  83160   71400  30240   5040               251729
8       4140 81638 424536 983808 1201200 806400 282240 40320        3824282
		

Crossrefs

A008277 (Stirling2), A039810 (square of Stirling2), A000110 (Bell), A000142 (factorials), A083355 (row sums: number of preferential arrangements), A232598 (number of preferential arrangements by number of blocks).
Cf. A130191.

Formula

S2 = A008277 (Stirling numbers of the second kind).
(S2)^2 = A039810 (matrix square of S2).
T(n,k) = ((S2)^2)(n,k) * k! = Sum(k<=i<=n) [ S2(n,i) * S2(i,k) ] * k!.
T(n,1) = Bell(n) = A000110(n).
T(n,2) = A052896(n).
T(n,n) = n! = A000142(n).
T(n,n-1) = n!*(n-1) = A062119(n).
Showing 1-10 of 21 results. Next