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

A001563 a(n) = n*n! = (n+1)! - n!.

Original entry on oeis.org

0, 1, 4, 18, 96, 600, 4320, 35280, 322560, 3265920, 36288000, 439084800, 5748019200, 80951270400, 1220496076800, 19615115520000, 334764638208000, 6046686277632000, 115242726703104000, 2311256907767808000, 48658040163532800000, 1072909785605898240000
Offset: 0

Views

Author

Keywords

Comments

A similar sequence, with the initial 0 replaced by 1, namely A094258, is defined by the recurrence a(2) = 1, a(n) = a(n-1)*(n-1)^2/(n-2). - Andrey Ryshevich (ryshevich(AT)notes.idlab.net), May 21 2002
Denominators in power series expansion of E_1(x) + gamma + log(x), x > 0. - Michael Somos, Dec 11 2002
If all the permutations of any length k are arranged in lexicographic order, the n-th term in this sequence (n <= k) gives the index of the permutation that rotates the last n elements one position to the right. E.g., there are 24 permutations of 4 items. In lexicographic order they are (0,1,2,3), (0,1,3,2), (0,2,1,3), ... (3,2,0,1), (3,2,1,0). Permutation 0 is (0,1,2,3), which rotates the last 1 element, i.e., it makes no change. Permutation 1 is (0,1,3,2), which rotates the last 2 elements. Permutation 4 is (0,3,1,2), which rotates the last 3 elements. Permutation 18 is (3,0,1,2), which rotates the last 4 elements. The same numbers work for permutations of any length. - Henry H. Rich (glasss(AT)bellsouth.net), Sep 27 2003
Stirling transform of a(n+1)=[4,18,96,600,...] is A083140(n+1)=[4,22,154,...]. - Michael Somos, Mar 04 2004
From Michael Somos, Apr 27 2012: (Start)
Stirling transform of a(n)=[1,4,18,96,...] is A069321(n)=[1,5,31,233,...].
Partial sums of a(n)=[0,1,4,18,...] is A033312(n+1)=[0,1,5,23,...].
Binomial transform of A000166(n+1)=[0,1,2,9,...] is a(n)=[0,1,4,18,...].
Binomial transform of A000255(n+1)=[1,3,11,53,...] is a(n+1)=[1,4,18,96,...].
Binomial transform of a(n)=[0,1,4,18,...] is A093964(n)=[0,1,6,33,...].
Partial sums of A001564(n)=[1,3,4,14,...] is a(n+1)=[1,4,18,96,...].
(End)
Number of small descents in all permutations of [n+1]. A small descent in a permutation (x_1,x_2,...,x_n) is a position i such that x_i - x_(i+1) =1. Example: a(2)=4 because there are 4 small descents in the permutations 123, 13\2, 2\13, 231, 312, 3\2\1 of {1,2,3} (shown by \). a(n)=Sum_{k=0..n-1}k*A123513(n,k). - Emeric Deutsch, Oct 02 2006
Equivalently, in the notation of David, Kendall and Barton, p. 263, this is the total number of consecutive ascending pairs in all permutations on n+1 letters (cf. A010027). - N. J. A. Sloane, Apr 12 2014
a(n-1) is the number of permutations of n in which n is not fixed; equivalently, the number of permutations of the positive integers in which n is the largest element that is not fixed. - Franklin T. Adams-Watters, Nov 29 2006
Number of factors in a determinant when writing down all multiplication permutations. - Mats Granvik, Sep 12 2008
a(n) is also the sum of the positions of the left-to-right maxima in all permutations of [n]. Example: a(3)=18 because the positions of the left-to-right maxima in the permutations 123,132,213,231,312 and 321 of [3] are 123, 12, 13, 12, 1 and 1, respectively and 1+2+3+1+2+1+3+1+2+1+1=18. - Emeric Deutsch, Sep 21 2008
Equals eigensequence of triangle A002024 ("n appears n times"). - Gary W. Adamson, Dec 29 2008
Preface the series with another 1: (1, 1, 4, 18, ...); then the next term = dot product of the latter with "n occurs n times". Example: 96 = (1, 1, 4, 8) dot (4, 4, 4, 4) = (4 + 4 + 16 + 72). - Gary W. Adamson, Apr 17 2009
Row lengths of the triangle in A030298. - Reinhard Zumkeller, Mar 29 2012
a(n) is also the number of minimum (n-)distinguishing labelings of the star graph S_{n+1} on n+1 nodes. - Eric W. Weisstein, Oct 14 2014
When the numbers denote finite permutations (as row numbers of A055089) these are the circular shifts to the right, i.e., a(n) is the permutation with the cycle notation (0 1 ... n-1 n). Compare array A051683 for circular shifts to the right in a broader sense. Compare sequence A007489 for circular shifts to the left. - Tilman Piesk, Apr 29 2017
a(n-1) is the number of permutations on n elements with no cycles of length n. - Dennis P. Walsh, Oct 02 2017
The number of pandigital numbers in base n+1, such that each digit appears exactly once. For example, there are a(9) = 9*9! = 3265920 pandigital numbers in base 10 (A050278). - Amiram Eldar, Apr 13 2020

Examples

			E_1(x) + gamma + log(x) = x/1 - x^2/4 + x^3/18 - x^4/96 + ..., x > 0. - _Michael Somos_, Dec 11 2002
G.f. = x + 4*x^2 + 18*x^3 + 96*x^4 + 600*x^5 + 4320*x^6 + 35280*x^7 + 322560*x^8 + ...
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 218.
  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 336.
  • F. N. David, M. G. Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
  • 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).
  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 37, equation 37:6:1 at page 354.

Crossrefs

Cf. A163931 (E(x,m,n)), A002775 (n^2*n!), A091363 (n^3*n!), A091364 (n^4*n!).
Cf. sequences with formula (n + k)*n! listed in A282466.
Row sums of A185105, A322383, A322384, A094485.

Programs

  • GAP
    List([0..20], n-> n*Factorial(n) ); # G. C. Greubel, Dec 30 2019
  • Haskell
    a001563 n = a001563_list !! n
    a001563_list = zipWith (-) (tail a000142_list) a000142_list
    -- Reinhard Zumkeller, Aug 05 2013
    
  • Magma
    [Factorial(n+1)-Factorial(n): n in [0..20]]; // Vincenzo Librandi, Aug 08 2014
    
  • Maple
    A001563 := n->n*n!;
  • Mathematica
    Table[n!n,{n,0,25}] (* Harvey P. Dale, Oct 03 2011 *)
  • PARI
    {a(n) = if( n<0, 0, n * n!)} /* Michael Somos, Dec 11 2002 */
    
  • Sage
    [n*factorial(n) for n in (0..20)] # G. C. Greubel, Dec 30 2019
    

Formula

From Michael Somos, Dec 11 2002: (Start)
E.g.f.: x / (1 - x)^2.
a(n) = -A021009(n, 1), n >= 0. (End)
The coefficient of y^(n-1) in expansion of (y+n!)^n, n >= 1, gives the sequence 1, 4, 18, 96, 600, 4320, 35280, ... - Artur Jasinski, Oct 22 2007
Integral representation as n-th moment of a function on a positive half-axis: a(n) = Integral_{x=0..oo} x^n*(x*(x-1)*exp(-x)) dx, for n>=0. This representation may not be unique. - Karol A. Penson, Sep 27 2001
a(0)=0, a(n) = n*a(n-1) + n!. - Benoit Cloitre, Feb 16 2003
a(0) = 0, a(n) = (n - 1) * (1 + Sum_{i=1..n-1} a(i)) for i > 0. - Gerald McGarvey, Jun 11 2004
Arises in the denominators of the following identities: Sum_{n>=1} 1/(n*(n+1)*(n+2)) = 1/4, Sum_{n>=1} 1/(n*(n+1)*(n+2)*(n+3)) = 1/18, Sum_{n>=1} 1/(n*(n+1)*(n+2)*(n+3)*(n+4)) = 1/96, etc. The general expression is Sum_{n>=k} 1/C(n, k) = k/(k-1). - Dick Boland, Jun 06 2005 [And the general expression implies that Sum_{n>=1} 1/(n*(n+1)*...*(n+k-1)) = (Sum_{n>=k} 1/C(n, k))/k! = 1/((k-1)*(k-1)!) = 1/a(k-1), k >= 2. - Jianing Song, May 07 2023]
a(n) = Sum_{m=2..n+1} |Stirling1(n+1, m)|, n >= 1 and a(0):=0, where Stirling1(n, m) = A048994(n, m), n >= m = 0.
a(n) = 1/(Sum_{k>=0} k!/(n+k+1)!), n > 0. - Vladeta Jovovic, Sep 13 2006
a(n) = Sum_{k=1..n(n+1)/2} k*A143946(n,k). - Emeric Deutsch, Sep 21 2008
The reciprocals of a(n) are the lead coefficients in the factored form of the polynomials obtained by summing the binomial coefficients with a fixed lower term up to n as the upper term, divided by the term index, for n >= 1: Sum_{k = i..n} C(k, i)/k = (1/a(n))*n*(n-1)*..*(n-i+1). The first few such polynomials are Sum_{k = 1..n} C(k, 1)/k = (1/1)*n, Sum_{k = 2..n} C(k, 2)/k = (1/4)*n*(n-1), Sum_{k = 3..n} C(k, 3)/k = (1/18)*n*(n-1)*(n-2), Sum_{k = 4..n} C(k, 4)/k = (1/96)*n*(n-1)*(n-2)*(n-3), etc. - Peter Breznay (breznayp(AT)uwgb.edu), Sep 28 2008
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-1)*f(n,1,-2), (n >= 1). - Milan Janjic, Mar 01 2009
Sum_{n>=1} (-1)^(n+1)/a(n) = 0.796599599... [Jolley eq. 289]
G.f.: 2*x*Q(0), where Q(k) = 1 - 1/(k+2 - x*(k+2)^2*(k+3)/(x*(k+2)*(k+3)-1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 19 2013
G.f.: W(0)*(1-sqrt(x)) - 1, where W(k) = 1 + sqrt(x)/( 1 - sqrt(x)*(k+2)/(sqrt(x)*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 18 2013
G.f.: T(0)/x - 1/x, where T(k) = 1 - x^2*(k+1)^2/( x^2*(k+1)^2 - (1-x-2*x*k)*(1-3*x-2*x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 17 2013
G.f.: Q(0)*(1-x)/x - 1/x, where Q(k) = 1 - x*(k+1)/( x*(k+1) - 1/(1 - x*(k+1)/( x*(k+1) - 1/Q(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Oct 22 2013
D-finite with recurrence: a(n) +(-n-2)*a(n-1) +(n-1)*a(n-2)=0. - R. J. Mathar, Jan 14 2020
a(n) = (-1)^(n+1)*(n+1)*Sum_{k=1..n} A094485(n,k)*Bernoulli(k). The inverse of the Worpitzky representation of the Bernoulli numbers. - Peter Luschny, May 28 2020
From Amiram Eldar, Aug 04 2020: (Start)
Sum_{n>=1} 1/a(n) = Ei(1) - gamma = A229837.
Sum_{n>=1} (-1)^(n+1)/a(n) = gamma - Ei(-1) = A239069. (End)
a(n) = Gamma(n)*A000290(n) for n > 0. - Jacob Szlachetka, Jan 01 2022

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

A001472 Number of degree-n permutations of order dividing 4.

Original entry on oeis.org

1, 1, 2, 4, 16, 56, 256, 1072, 6224, 33616, 218656, 1326656, 9893632, 70186624, 574017536, 4454046976, 40073925376, 347165733632, 3370414011904, 31426411211776, 328454079574016, 3331595921852416, 37125035407900672, 400800185285464064, 4744829049220673536
Offset: 0

Views

Author

Keywords

References

  • 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 Example 5.2.10.

Crossrefs

Column k=4 of A008307.

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(x + x^2/2 +x^4/4) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 14 2019
    
  • Maple
    spec := [S, {S = Set(Union(Cycle(Z, card = 1), Cycle(Z, card = 2), Cycle(Z, card = 4)))}, labeled]; seq(combstruct[count](spec, size = n), n = 0 .. 23); # David Radcliffe, Aug 29 2025
  • Mathematica
    n = 23; CoefficientList[Series[Exp[x+x^2/2+x^4/4], {x, 0, n}], x] * Table[k!, {k, 0, n}] (* Jean-François Alcover, May 18 2011 *)
  • Maxima
    a(n):=n!*sum(sum(binomial(k,j)*binomial(j,n-4*k+3*j)*(1/2)^(n-4*k+3*j)*(1/4)^(k-j),j,floor((4*k-n)/3),k)/k!,k,1,n); /* Vladimir Kruchinin, Sep 07 2010 */
    
  • PARI
    my(N=33, x='x+O('x^N)); egf=exp(x+x^2/2+x^4/4); Vec(serlaplace(egf)) /* Joerg Arndt, Sep 15 2012 */
    
  • Sage
    m = 30; T = taylor(exp(x + x^2/2 + x^4/4), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, May 14 2019

Formula

E.g.f.: exp(x + x^2/2 + x^4/4).
D-finite with recurrence: a(0)=1, a(1)=1, a(2)=2, a(3)=4, a(n) = a(n-1) + (n-1)*a(n-2) + (n^3-6*n^2+11*n-6)*a(n-4) for n>3. - H. Palsdottir (hronn07(AT)ru.is), Sep 19 2008
a(n) = n!*Sum_{k=1..n} (1/k!)*Sum_{j=floor((4*k-n)/3)..k} binomial(k,j) * binomial(j,n-4*k+3*j) * (1/2)^(n-4*k+3*j)*(1/4)^(k-j), n>0. - Vladimir Kruchinin, Sep 07 2010
a(n) ~ n^(3*n/4)*exp(n^(1/4)-3*n/4+sqrt(n)/2-1/8)/2 * (1 - 1/(4*n^(1/4)) + 17/(96*sqrt(n)) + 47/(128*n^(3/4))). - Vaclav Kotesovec, Aug 09 2013

A053505 Number of degree-n permutations of order dividing 30.

Original entry on oeis.org

1, 1, 2, 6, 18, 90, 540, 3060, 20700, 145980, 1459800, 13854600, 140059800, 1514748600, 15869034000, 285268878000, 4109761962000, 59488383690000, 935767530036000, 13364309726748000, 240338216104020000, 4540941256642020000, 79739974380153240000
Offset: 0

Views

Author

N. J. A. Sloane, Jan 15 2000

Keywords

References

  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.2.10.

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(x +x^2/2 +x^3/3 +x^5/5 +x^6/6 +x^10/10 +x^15/15 +x^30/30) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 15 2019
    
  • Maple
    a:= proc(n) option remember; `if`(n<0, 0, `if`(n=0, 1,
           add(mul(n-i, i=1..j-1)*a(n-j), j=[1, 2, 3, 5, 6, 10, 15, 30])))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Feb 14 2013
  • Mathematica
    a[n_]:= a[n] = If[n<0, 0, If[n==0, 1, Sum[Product[n-i, {i, 1, j-1}]*a[n-j], {j, {1, 2, 3, 5, 6, 10, 15, 30}}]]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 03 2014, after Alois P. Heinz *)
    With[{m = 30}, CoefficientList[Series[Exp[x +x^2/2 +x^3/3 +x^5/5 +x^6/6 + x^10/10 +x^15/15 +x^30/30], {x, 0, m}], x]*Range[0, m]!] (* G. C. Greubel, May 15 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace( exp(x +x^2/2 +x^3/3 +x^5/5 + x^6/6 +x^10/10 +x^15/15 +x^30/30) )) \\ G. C. Greubel, May 15 2019
    
  • Sage
    m = 30; T = taylor(exp(x +x^2/2 +x^3/3 +x^5/5 +x^6/6 +x^10/10 +x^15/15 +x^30/30), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, May 15 2019

Formula

E.g.f.: exp(x + x^2/2 + x^3/3 + x^5/5 + x^6/6 + x^10/10 + x^15/15 + x^30/30).

A052501 Number of permutations sigma such that sigma^5=Id; degree-n permutations of order dividing 5.

Original entry on oeis.org

1, 1, 1, 1, 1, 25, 145, 505, 1345, 3025, 78625, 809425, 4809025, 20787625, 72696625, 1961583625, 28478346625, 238536558625, 1425925698625, 6764765838625, 189239120970625, 3500701266525625, 37764092547420625, 288099608198025625
Offset: 0

Views

Author

N. J. A. Sloane, Jan 15 2000; encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

The number of degree-n permutations of order exactly p (where p is prime) satisfies a(n) = a(n-1) + (1 + a(n-p))*(n-1)!/(n-p)! with a(n)=0 if p>n. Also a(n) = Sum_{j=1..floor(n/p)} (n!/(j!*(n-p*j)!*(p^j))).
These are the telephone numbers T^(5)n of [Artioli et al., p. 7]. - _Eric M. Schmidt, Oct 12 2017

References

  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.2.10.

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(x + x^5/5) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 14 2019
    
  • Maple
    spec := [S,{S=Set(Union(Cycle(Z,card=1),Cycle(Z,card=5)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    max = 30; CoefficientList[ Series[ Exp[x + x^5/5], {x, 0, max}], x]*Range[0, max]! (* Jean-François Alcover, Feb 15 2012, after e.g.f. *)
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace( exp(x + x^5/5) )) \\ G. C. Greubel, May 14 2019
    
  • Sage
    m = 30; T = taylor(exp(x + x^5/5), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, May 14 2019

Formula

E.g.f.: exp(x + x^5/5).
a(n+5) = a(n+4) + (24 +50*n +35*n^2 +10*n^3 +n^4)*a(n), with a(0)= ... = a(4) = 1.
a(n) = a(n-1) + a(n-5)*(n-1)!/(n-5)!.
a(n) = Sum_{j = 0..floor(n/5)} n!/(5^j * j! * (n-5*j)!).
a(n) = A059593(n) + 1.

A053496 Number of degree-n permutations of order dividing 6.

Original entry on oeis.org

1, 1, 2, 6, 18, 66, 396, 2052, 12636, 91548, 625176, 4673736, 43575192, 377205336, 3624289488, 38829340656, 397695226896, 4338579616272, 54018173703456, 641634784488288, 8208962893594656, 113809776294348576, 1526808627197721792, 21533423236302943296
Offset: 0

Views

Author

N. J. A. Sloane, Jan 15 2000

Keywords

References

  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.2.10.

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(x + x^2/2 +x^3/3 +x^6/6) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 14 2019
    
  • Maple
    a:= proc(n) option remember; `if`(n<0, 0, `if`(n=0, 1,
           add(mul(n-i, i=1..j-1)*a(n-j), j=[1, 2, 3, 6])))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Feb 14 2013
  • Mathematica
    a[n_] := a[n] = If[n<0, 0, If[n == 0, 1, Sum[Product[n-i, {i, 1, j-1}]*a[n-j], {j, {1, 2, 3, 6}}]]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 03 2014, after Alois P. Heinz *)
    With[{m = 30}, CoefficientList[Series[Exp[x +x^2/2 +x^3/3 +x^6/6], {x, 0, m}], x]*Range[0, m]!] (* G. C. Greubel, May 14 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace( exp(x+x^2/2+x^3/3+x^6/6) )) \\ G. C. Greubel, May 14 2019
    
  • Sage
    m = 30; T = taylor(exp(x +x^2/2 +x^3/3 +x^6/6), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, May 14 2019

Formula

E.g.f.: exp(x +x^2/2 +x^3/3 +x^6/6).
D-finite with recurrence a(n) -a(n-1) +(-n+1)*a(n-2) -(n-1)*(n-2)*a(n-3) -(n-5)*(n-1)*(n-2)*(n-3)*(n-4)*a(n-6)=0. - R. J. Mathar, Jul 04 2023

A001809 a(n) = n! * n(n-1)/4.

Original entry on oeis.org

0, 0, 1, 9, 72, 600, 5400, 52920, 564480, 6531840, 81648000, 1097712000, 15807052800, 242853811200, 3966612249600, 68652904320000, 1255367393280000, 24186745110528000, 489781588488192000, 10400656084955136000, 231125690776780800000, 5364548928029491200000
Offset: 0

Views

Author

Keywords

Comments

a(n) = n!*n*(n-1)/4 gives the total number of inversions in all the permutations of [n]. [Stern, Terquem] Proof: For fixed i,j and for fixed I,J (i < j, I > J, 1 <= i,j,I,J <= n), we have (n-2)! permutations p of [n] for which p(i)=I and p(j)=J (permute {1,2,...,n} \ {I,J} in the positions (1,2,...,n) \ {i,j}). There are n*(n-1)/2 choices for the pair (i,j) with i < j and n*(n-1)/2 choices for the pair (I,J) with I > J. Consequently, the total number of inversions in all the permutations of [n] is (n-2)!*(n*(n-1)/2)^2 = n!*n*(n-1)/4. - Emeric Deutsch, Oct 05 2006
To state this another way, a(n) is the number of occurrences of the pattern 12 in all permutations of [n]. - N. J. A. Sloane, Apr 12 2014
Equivalently, this is the total Denert index of all permutations on n letters (cf. A008302). - N. J. A. Sloane, Jan 20 2014
Also coefficients of Laguerre polynomials. a(n)=A021009(n,2), n >= 2.
a(n) is the number of edges in the Cayley graph of the symmetric group S_n with respect to the generating set consisting of transpositions. - Avi Peretz (njk(AT)netvision.net.il), Feb 20 2001
a(n+1) is the sum of the moments over all permutations of n. E.g. a(4) is [1,2,3].[1,2,3] + [1,3,2].[1,2,3] + [2,1,3].[1,2,3] + [2,3,1].[1,2,3] + [3,1,2].[1,2,3] + [3,2,1].[1,2.3] = 14 + 13 + 13 + 11 + 11 + 10 = 72. - Jon Perry, Feb 20 2004
Derivative of the q-factorial [n]!, evaluated at q=1. Example: a(3)=9 because (d/dq)[3]!=(d/dq)((1+q)(1+q+q^2))=2+4q+3q^2 is equal to 9 at q=1. - Emeric Deutsch, Apr 19 2007
Also the number of maximal cliques in the n-transposition graph for n > 1. - Eric W. Weisstein, Dec 01 2017
a(n-1) is the number of trees on [n], rooted at 1, with exactly two leaves. A leaf is a non-root vertex of degree 1. - Nikos Apostolakis, Dec 27 2021

Examples

			G.f. = x^2 + 9*x^3 + 72*x^4 + 600*x^5 + 5400*x^6 + 52920*x^7 + ...
		

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. 799.
  • Simon Altmann and Eduardo L. Ortiz, Editors, Mathematical and Social Utopias in France: Olinde Rodrigues and His Times, Amer. Math. Soc., 2005.
  • David M. Bressoud, Proofs and Confirmations, Camb. Univ. Press, 1999; p. 90.
  • Cornelius Lanczos, Applied Analysis, Prentice-Hall, Englewood Cliffs, NJ, 1956, p. 519.
  • Edward M. Reingold, Jurg Nievergelt and Narsingh Deo, Combinatorial Algorithms, Prentice-Hall, 1977, section 7.1, p. 287.
  • 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).
  • Olry Terquem, Liouville's Journal, 1838.

Crossrefs

Cf. A034968 (the inversion numbers of permutations listed in alphabetic order). See also A053495 and A064038.

Programs

  • Magma
    [Factorial(n)*n*(n-1)/4: n in [0..20]]; // Vincenzo Librandi, Jun 15 2015
  • Maple
    A001809 := n->n!*n*(n-1)/4;
    with(combstruct):ZL:=[st, {st=Prod(left, right), left=Set(U, card=r), right=Set(U, card=1)}, labeled]: subs(r=1, stack): seq(count(subs(r=2, ZL), size=m), m=0..19); # Zerinvary Lajos, Feb 07 2008
    with (combstruct):with (combinat):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, card>=m))}, labeled]; end: ZLL:=a(1):seq(count(ZLL, size=n)*binomial(n,2)/2, n=0..21); # Zerinvary Lajos, Jun 11 2008
  • Mathematica
    Table[n! n (n - 1)/4, {n, 0, 18}]
    Table[n! Binomial[n, 2]/2, {n, 0, 20}] (* Eric W. Weisstein, Dec 01 2017 *)
    Coefficient[Table[n! LaguerreL[n, x], {n, 20}], x, 2] (* Eric W. Weisstein, Dec 01 2017 *)
  • PARI
    {a(n) = n! * n * (n-1) / 4};
    
  • Sage
    [factorial(m) * binomial(m, 2) / 2 for m in range(19)]  # Zerinvary Lajos, Jul 05 2008
    

Formula

E.g.f.: (1/2)*x^2/(1-x)^3.
a(n) = a(n-1)*n^2/(n-2), n > 2; a(2)=1.
a(n) = n*a(n-1) + (n-1)!*n*(n-1)/2, a(1) = 0, a(2) = 1; a(n) = sum (first n! terms of A034968); a(n) = sum of the rises j of permutations (p(j)
If we define f(n,i,x) = Sum_{k=i..n} (Sum_{j=i..k}(C(k,j)*Stirling1(n,k)*Stirling2(j,i)*x^(k-j))) then a(n)=(-1)^n*f(n,2,-3), (n>=2). - Milan Janjic, Mar 01 2009
a(n) = Sum_k k*A008302(n,k). - N. J. A. Sloane, Jan 20 2014
a(n+2) = n*n!*(n+1)^2 / 4 = A000142(n) * (A000292(n) + A000330(n))/2 = sum of the cumulative sums of all the permutations of numbers from 1 to n, where A000142(n) = n! and sequences A000292(n) and A000330(n) are sequences of minimal and maximal values of cumulative sums of all the permutations of numbers from 1 to n. - Jaroslav Krizek, Sep 13 2014
From Amiram Eldar, Feb 15 2022: (Start)
Sum_{n>=2} 1/a(n) = 12 - 4*e.
Sum_{n>=2} (-1)^n/a(n) = 8*gamma - 4 - 4/e - 8*Ei(-1), where gamma is Euler's constant (A001620) and -Ei(-1) is the negated exponential integral at -1 (A099285). (End)

Extensions

More terms and new description from Michael Somos, May 19 2000
Simpler description from Emeric Deutsch, Oct 05 2006

A001754 Lah numbers: a(n) = n!*binomial(n-1,2)/6.

Original entry on oeis.org

0, 0, 1, 12, 120, 1200, 12600, 141120, 1693440, 21772800, 299376000, 4390848000, 68497228800, 1133317785600, 19833061248000, 366148823040000, 7113748561920000, 145120470663168000, 3101950060425216000, 69337707233034240000, 1617879835437465600000
Offset: 1

Keywords

Comments

a(n+1) = Sum_{pi in Symm(n)} Sum_{i=1..n} max(pi(i)-i,0)^2, i.e., the sum of the squares of the positive displacement of all letters in all permutations on n letters. - Franklin T. Adams-Watters, Oct 25 2006

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 156.
  • 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

Column 3 of A008297.
Column m=3 of unsigned triangle A111596.

Programs

  • Magma
    [Factorial(n)*Binomial(n-1, 2)/6: n in [1..25]]; // Vincenzo Librandi, Oct 11 2011
    
  • Maple
    [seq(n!*binomial(n-1,2)/6, n=1..40)];
  • Mathematica
    Table[(n-2)*(n-1)*n!/12, {n, 21}] (* Arkadiusz Wesolowski, Nov 26 2012 *)
    With[{nn=30},CoefficientList[Series[(x/(1-x))^3/6,{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Oct 04 2017 *)
  • Sage
    [factorial(n-1)*binomial(n,3)/2 for n in (1..30)] # G. C. Greubel, May 10 2021

Formula

E.g.f.: ((x/(1-x))^3)/3!.
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) = (-1)^n*f(n,2,-4), n >= 2. - Milan Janjic, Mar 01 2009
a(n) = Sum_{k>=1} k * A260665(n,k). - Alois P. Heinz, Nov 14 2015
D-finite with recurrence (-n+5)*a(n) + (n-2)*(n-3)*a(n-1) = 0, n >= 4. - R. J. Mathar, Jan 06 2021
From Amiram Eldar, May 02 2022: (Start)
Sum_{n>=3} 1/a(n) = 6*(gamma - Ei(1)) + 9, where gamma = A001620 and Ei(1) = A091725.
Sum_{n>=3} (-1)^(n+1)/a(n) = 18*(gamma - Ei(-1)) - 12/e - 9, where Ei(-1) = -A099285 and e = A001113. (End)

A005388 Number of degree-n permutations of order a power of 2.

Original entry on oeis.org

1, 1, 2, 4, 16, 56, 256, 1072, 11264, 78976, 672256, 4653056, 49810432, 433429504, 4448608256, 39221579776, 1914926104576, 29475151020032, 501759779405824, 6238907914387456, 120652091860975616, 1751735807564578816, 29062253310781161472, 398033706586943258624
Offset: 0

Keywords

Comments

Differs from A053503 first at n=32. - Alois P. Heinz, Feb 14 2013

References

  • 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 Example 5.2.10.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40);
    f:= func< x | Exp( (&+[x^(2^j)/2^j: j in [0..14]]) ) >;
    Coefficients(R!(Laplace( f(x) ))); // G. C. Greubel, Nov 17 2022
    
  • Maple
    a:= proc(n) option remember; `if`(n<0, 0, `if`(n=0, 1,
           add(mul(n-i, i=1..2^j-1)*a(n-2^j), j=0..ilog2(n))))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Feb 14 2013
  • Mathematica
    max = 23; CoefficientList[ Series[ Exp[ Sum[x^2^m/2^m, {m, 0, max}]], {x, 0, max}], x]*Range[0, max]! (* Jean-François Alcover, Sep 10 2013 *)
  • SageMath
    def f(x): return exp(sum(x^(2^j)/2^j for j in range(15)))
    def A005388_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( f(x) ).egf_to_ogf().list()
    A005388_list(40) # G. C. Greubel, Nov 17 2022

Formula

E.g.f.: exp(Sum_{m>=0} x^(2^m)/2^m).
E.g.f.: 1/Product_{k>=1} (1 - x^(2*k-1))^(mu(2*k-1)/(2*k-1)), where mu() is the Moebius function. - Seiichi Manyama, Jul 06 2024

A058307 a(n) = (n+1)*a(n-1) + a(n-2), with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 3, 13, 68, 421, 3015, 24541, 223884, 2263381, 25121075, 303716281, 3973432728, 55931774473, 842950049823, 13543132571641, 231076203767720, 4172914800390601, 79516457411189139, 1594502063024173381, 33564059780918830140, 740003817243238436461, 17053651856375402868743
Offset: 0

Author

N. J. A. Sloane, Dec 09 2000

Keywords

Comments

Numerator of convergent to BesselI(0,2)/BesselI(1,2) for which the continued fraction expansion is [1,2,3....,n]. - Benoit Cloitre, Mar 27 2003
Numerator of continued fraction C(n) minus denominator of continued fraction C(n), where C(n) = [ 1; 2,3,4,...n ]. - Melvin Peralta, Jan 17 2017

Crossrefs

A column of A058294. Except for first term, -1 times row sums of A053495.

Programs

  • GAP
    a:= function(n)
        if n<2 then return n;
        else return (n+1)*a(n-1) + a(n-2);
        fi;
      end;
    List([0..30], n-> a(n) ); # G. C. Greubel, Oct 07 2019
  • Magma
    [n le 2 select n-1 else Self(n-2)+Self(n-1)*(n): n in [1..30]]; // Vincenzo Librandi, May 06 2013
    
  • Maple
    A058307 := proc(n) option remember; if n <= 1 then n else A058307(n-2)+(n+1)*A058307(n-1); fi; end;
    a:= proc(n) option remember;
          if n<2 then n
        else (n+1)*a(n-1) + a(n-2)
          fi;
        end:
    seq(a(n), n=0..30); # G. C. Greubel, Oct 07 2019
  • Mathematica
    RecurrenceTable[{a[0]==0, a[1]==1, a[n]==(n+1)*a[n-1]+a[n-2]}, a, {n, 0, 30}] (* Vincenzo Librandi, May 06 2013 *)
    Table[FullSimplify[(-BesselI[2+n,-2] * BesselK[2,2] + BesselI[2,2] * BesselK[2+n,2]) / (BesselI[3,2] * BesselK[2,2] + BesselI[2,2] * BesselK[3,2])],{n,0,20}] (* Vaclav Kotesovec, Feb 14 2014 *)
    a[n_]:= a[n]= If[n<2, n, (n+1)*a[n-1] +a[n-2]]; Table[a[n], {n,0,30}] (* G. C. Greubel, Oct 07 2019 *)
  • PARI
    my(m=30, v=concat([0,1], vector(m-2))); for(n=3, m, v[n]=n*v[n-1] +v[n-2]); v \\ G. C. Greubel, Nov 24 2018
    
  • Sage
    def A058307(n):
        if n < 2: return n
        return factorial(n+1)*hypergeometric([1/2-n/2,1-n/2], [3,-1-n,1-n], 4)/2
    [round(A058307(n).n(100)) for n in (0..21)] # Peter Luschny, Sep 10 2014
    
  • Sage
    @CachedFunction
    def a(n):
        if (n<2): return n
        else: return (n+1)*a(n-1) + a(n-2)
    [a(n) for n in (0..30)]  # G. C. Greubel, Nov 24 2018
    

Formula

From Wouter Meeussen, Feb 02 2001: (Start)
a(2*r+1) = Sum_{j=0..r} (binomial(r+j, r-j)*(r+j)!/(r-j)! - binomial(r + j, r-j-1)*(r+j+1)!/(r-j)!) and
a(2*r) = Sum_{j=0..r} (binomial(r+j+1, r-j)*(r+j+1)!/(r-j)! - binomial(r +j, r-j)*(r+j+1)!/(r-j+1)! + binomial(r+j+1, r-j)*(r+j+1)!/(r-j)!). (End)
E.g.f.: Pi*(BesselI(2, 2)*BesselY(2, 2*I*sqrt(1-x)) - BesselY(2,2*I)*BesselI(2, 2*sqrt(1-x)))/(1-x). Motivated to look into e.g.f.'s for such recurrences by email exchange with Gary Detlefs. One has to use simplifications after differentiation and putting x=0. See Abramowitz-Stegun handbook p. 360, 9.1.16. - Wolfdieter Lang, May 18 2010
Limit n->infinity a(n)/(n+1)! = BesselI(0,2)-BesselI(1,2) = 0.688948447698738204... - Vaclav Kotesovec, Jan 05 2013
a(n) = Sum_{k = 0..floor((n-1)/2)} (n-2*k-1)!*binomial(n-k-1,k)* binomial(n-k+1,k+2). Cf. A058798. - Peter Bala, Aug 01 2013
a(n) = (n+1)!*hypergeometric([1/2-n/2,1-n/2],[3,-1-n,1-n],4)/2 for n >= 2. - Peter Luschny, Sep 10 2014
E.g.f.: 2*(I(2,2)*K(2, 2*sqrt(1-x)) - K(2,2)*I(2, 2*sqrt(1-x)))/(1-x), where I(n, x) and K(n, x) are the modified Bessel functions of the second kind. - G. C. Greubel, Oct 07 2019
Showing 1-10 of 22 results. Next