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-4 of 4 results.

A000274 Number of permutations of length n with 2 consecutive ascending pairs.

Original entry on oeis.org

0, 0, 1, 3, 18, 110, 795, 6489, 59332, 600732, 6674805, 80765135, 1057289046, 14890154058, 224497707343, 3607998868005, 61576514013960, 1112225784377144, 21197714949305577, 425131949816628507, 8950146311929021210, 197350726178034917670, 4548464355722328578691
Offset: 1

Views

Author

Keywords

Comments

From Emeric Deutsch, May 25 2009: (Start)
a(n) = number of excedances in all derangements of [n-1]. Example: a(5)=18 because the derangements of {1,2,3,4} are 4*123, 3*14*2, 3*4*12, 4*3*12, 2*14*3, 2*4*13, 2*3*4*1, 3*4*21, 4*3*21 with the 18 excedances marked. An excedance of a permutation p is a position i such that p(i)>i.
a(n) = Sum(k*A046739(n,k), k>=1).
(End)
Appears to be the inverse binomial transform of A001286 (filling the two leading zeros in there), then shifting one place to the right. - R. J. Mathar, Apr 04 2012

References

  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 210 (divided by 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

A diagonal in triangle A010027.
Cf. A046739. [Emeric Deutsch, May 25 2009]

Programs

  • Maple
    a:= n->sum((n-1)!*sum((-1)^k/k!/2, j=1..n-1), k=0..n-1): seq(a(n), n=1..23); # Zerinvary Lajos, May 17 2007
  • Mathematica
    Table[Subfactorial[n]*n/2, {n, 2, 20}] (* Zerinvary Lajos, Jul 09 2009 *)

Formula

a(n) = (1 + n) a(n - 1) + (3 + n) a(n - 2) + (3 - n) a(n - 3) + (2 - n) a(n - 4).
E.g.f.: x^2/2*exp(-x)/(1-x)^2. - Vladeta Jovovic, Jan 03 2003
a(n) = (n-1)^2/(n-2)*a(n-1)-(-1)^n*(n-1)/2, n>2, a(2)=0. - Vladeta Jovovic, Aug 31 2003
a(n) = (1/2){[n!/e] - [(n-1)!/e]} (conjectured).
a(n) = (n-1)*GAMMA(n,-1)*exp(-1)/2 where GAMMA = incomplete Gamma function. [Mark van Hoeij, Nov 11 2009]
a(n) = A145887(n-1) + A145886(n-1). - Anton Zakharov, Aug 28 2016

Extensions

Name clarified and offset changed by N. J. A. Sloane, Apr 12 2014

A145887 Number of excedances in all even permutations of {1,2,...,n} with no fixed points.

Original entry on oeis.org

0, 0, 3, 6, 60, 390, 3255, 29652, 300384, 3337380, 40382595, 528644490, 7445077068, 112248853626, 1803999434055, 30788257006920, 556112892188640, 10598857474652712, 212565974908314339, 4475073155964510510
Offset: 1

Views

Author

Emeric Deutsch, Nov 07 2008

Keywords

Examples

			a(4)=6 because the even derangements of {1,2,3,4} are 3412, 2143 and 4321, having 2, 2 and 2, excedances, respectively.
		

Crossrefs

Programs

  • Maple
    G:=(1/4)*z^3*(2-z)*exp(-z)/(1-z)^2: Gser:=series(G,z=0,30): seq(factorial(n)*coeff(Gser,z,n),n=1..21);
  • Mathematica
    Table[1/4*n*n!*Sum[(-1)^k*(k+2)*(k-1)/(k+1)!, {k,2,n-1}],{n,1,20}] (* Vaclav Kotesovec, Oct 28 2012 *)

Formula

a(n) = Sum_{k=1..n-1} k*A145881(n,k), for n>=2.
E.g.f.: (1/4)*z^3*(2-z)*exp(-z)/(1-z)^2.
a(n) = 1/4*n*n!*Sum_{k=2..n-1} (-1)^k*(k+2)*(k-1)/(k+1)!. - Vaclav Kotesovec, Oct 28 2012
a(n) ~ n * n! / (4*exp(1)). - Vaclav Kotesovec, Dec 10 2021
D-finite with recurrence (-n+3)*a(n) +(n^2-3*n-2)*a(n-1) +(n-1)*(n+1)*a(n-2)=0. - R. J. Mathar, Jul 26 2022

A145880 Triangle read by rows: T(n,k) is the number of odd permutations of {1,2,...,n} with no fixed points and having k excedances (n>=1; k>=1).

Original entry on oeis.org

0, 1, 0, 0, 1, 4, 1, 0, 10, 10, 0, 1, 26, 81, 26, 1, 0, 56, 406, 406, 56, 0, 1, 120, 1681, 3816, 1681, 120, 1, 0, 246, 6210, 26916, 26916, 6210, 246, 0, 1, 502, 21433, 160054, 303505, 160054, 21433, 502, 1, 0, 1012, 70774, 852346, 2747008, 2747008, 852346, 70774
Offset: 1

Views

Author

Emeric Deutsch, Nov 06 2008

Keywords

Comments

Row n has n-1 entries (n>=2).
Sum of entries in row n = A000387(n).
Sum_{k=1..n-1} k*T(n,k) = A145886(n) (n>=2).

Examples

			T(4,2)=4 because the odd derangements of {1,2,3,4} with 2 excedances are 3142, 4312, 2413 and 3421.
Triangle starts:
  0;
  1;
  0,  0;
  1,  4,  1;
  0, 10, 10,  0;
  1, 26, 81, 26,  1;
		

Crossrefs

Programs

  • Maple
    G:=((1-t)*exp(-t*z)/(1-t*exp((1-t)*z))+(t*exp(-z)-exp(-t*z))/(1-t))*1/2: Gser:=simplify(series(G,z=0,15)): for n to 11 do P[n]:=sort(expand(factorial(n)*coeff(Gser,z,n))) end do: 0; for n to 11 do seq(coeff(P[n],t,j),j=1..n-1) end do; # yields sequence in triangular form

Formula

E.g.f.: ((1-t)*exp(-tz)/(1-t*exp((1-t)z)) + (t*exp(-z)-exp(-tz))/(1-t))/2.

Extensions

Formula corrected by N. J. A. Sloane, Jul 20 2017 at the request of the author.

A145881 Triangle read by rows: T(n,k) is the number of even permutations of {1,2,...,n} with no fixed points and having k excedances (n>=1; k>=1).

Original entry on oeis.org

0, 0, 1, 1, 0, 3, 0, 1, 11, 11, 1, 0, 25, 80, 25, 0, 1, 57, 407, 407, 57, 1, 0, 119, 1680, 3815, 1680, 119, 0, 1, 247, 6211, 26917, 26917, 6211, 247, 1, 0, 501, 21432, 160053, 303504, 160053, 21432, 501, 0, 1, 1013, 70775, 852347, 2747009, 2747009, 852347, 70775
Offset: 1

Views

Author

Emeric Deutsch, Nov 06 2008

Keywords

Comments

Row n has n-1 entries (n>=2).
Sum of entries in row n = A000321(n).
Sum_{k=1..n-1} k*T(n,k) = A145887(n) (n>=2).

Examples

			T(4,2)=3 because the even derangements of {1,2,3,4} are 3412, 2143 and 4321.
Triangle starts:
  0;
  0;
  1,  1;
  0,  3,  0;
  1, 11, 11,  1;
  0, 25, 80, 25,  0;
		

Crossrefs

Programs

  • Maple
    G:=((1-t)*exp(-t*z)/(1-t*exp((1-t)*z))-(t*exp(-z)-exp(-t*z))/(1-t))*1/2: Gser:=simplify(series(G,z=0,15)): for n to 11 do P[n]:=sort(expand(factorial(n)*coeff(Gser,z,n))) end do: 0; for n to 11 do seq(coeff(P[n],t,j),j=1..n-1) end do; # yields sequence in triangular form

Formula

E.g.f.: ((1-t)*exp(-tz)/(1-t*exp((1-t)z)) - (t*exp(-z)-exp(-tz))/(1-t))/2.

Extensions

Formula corrected by Jon E. Schoenfield, Jul 21 2017 at the request of the author
Showing 1-4 of 4 results.