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.

Previous Showing 11-14 of 14 results.

A152885 Number of descents beginning and ending with an odd number in all permutations of {1,2,...,n}.

Original entry on oeis.org

0, 0, 2, 6, 72, 360, 4320, 30240, 403200, 3628800, 54432000, 598752000, 10059033600, 130767436800, 2440992153600, 36614882304000, 753220435968000, 12804747411456000, 288106816757760000, 5474029518397440000, 133809610449715200000, 2810001819444019200000
Offset: 1

Views

Author

Emeric Deutsch, Jan 19 2009

Keywords

Comments

a(n) is also number of descents beginning with an odd number and ending with an even number in all permutations of {1,2,...,n}. Example: a(4)=6; indeed for n=4 the only descent to be counted is 32, occurring only in 1324, 1432, 4132, 3214, 3241 and 4321.

Examples

			a(6) = 360 because (i) the descent pairs can be chosen in binomial(3,2) = 3 ways, namely (3,1), (5,1), (5,3); (ii) they can be placed in 5 positions, namely (1,2),(2,3),(3,4),(4,5),(5,6); (iii) the remaining 4 entries can be permuted in 4!=24 ways; 3*5*24 = 360.
		

Crossrefs

Programs

  • Maple
    a := proc (n) if `mod`(n, 2) = 0 then (1/4)*factorial(n)*((1/2)*n-1) else (1/8)*(n-1)*(n+1)*factorial(n-1) end if end proc: seq(a(n), n = 1 .. 20);
  • Mathematica
    a[n_] := (n - 1)! * Binomial[If[OddQ[n], (n + 1)/2, n/2], 2]; Array[a, 25] (* Amiram Eldar, Jan 22 2023 *)

Formula

a(2n) = (2n-1)!*binomial(n,2); a(2n+1) = (2n)!*binomial(n+1,2).
D-finite with recurrence (-n+3)*a(n) +(n-1)*a(n-1) +n*(n-1)*(n-2)*a(n-2)=0. - R. J. Mathar, Jul 26 2022
Sum_{n>=3} 1/a(n) = 8*(CoshIntegral(1) - gamma - sinh(1) + 1) = 8*(A099284 - A001620 - A073742 + 1). - Amiram Eldar, Jan 22 2023

A152886 Number of descents beginning and ending with an even number in all permutations of {1,2,...,n}.

Original entry on oeis.org

0, 0, 0, 6, 24, 360, 2160, 30240, 241920, 3628800, 36288000, 598752000, 7185024000, 130767436800, 1830744115200, 36614882304000, 585838116864000, 12804747411456000, 230485453406208000, 5474029518397440000, 109480590367948800000, 2810001819444019200000
Offset: 1

Views

Author

Emeric Deutsch, Jan 19 2009

Keywords

Examples

			a(7) = 2160 because (i) the descent pairs can be chosen in binomial(3,2) = 3 ways, namely (4,2), (6,2), (6,4); (ii) they can be placed in 6 positions, namely (1,2),(2,3),(3,4),(4,5),(5,6),(6,7); (iii) the remaining 5 entries can be permuted in 5! = 120 ways; 3*6*120 = 2160.
		

Crossrefs

Programs

  • Maple
    a := proc (n) if `mod`(n, 2) = 0 then factorial(n-1)*binomial((1/2)*n, 2) else factorial(n-1)*binomial((1/2)*n-1/2, 2) end if end proc: seq(a(n), n = 1 .. 22);
  • Mathematica
    a[n_] := (n - 1)! * Binomial[If[OddQ[n], (n - 1)/2, n/2], 2]; Array[a, 25] (* Amiram Eldar, Jan 22 2023 *)

Formula

a(2n) = (2n-1)!*binomial(n,2); a(2n+1) = (2n)!*binomial(n,2).
D-finite with recurrence +(-n+4)*a(n) +(n-1)*a(n-1) +(n-2)*(n-1)^2*a(n-2)=0. - R. J. Mathar, Jul 31 2022
Sum_{n>=4} 1/a(n) = 2*(CoshIntegral(1) - gamma - 3*e + 8) = 2*(A099284 - A001620 - 3 * A001113 + 8). - Amiram Eldar, Jan 22 2023

A052657 Expansion of e.g.f. x^2/((1-x)^2*(1+x)).

Original entry on oeis.org

0, 0, 2, 6, 48, 240, 2160, 15120, 161280, 1451520, 18144000, 199584000, 2874009600, 37362124800, 610248038400, 9153720576000, 167382319104000, 2845499424768000, 57621363351552000, 1094805903679488000, 24329020081766400000, 510909421717094400000, 12364008005553684480000
Offset: 0

Views

Author

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

Keywords

Comments

Stirling transform of -(-1)^n*a(n-1) = [0, 0, 2, -6, 48, -240, ...] is A052841(n-1) = [0, 0, 2, 6, 38, 270, ...]. - Michael Somos, Mar 04 2004

Crossrefs

Programs

  • Maple
    spec := [S,{S=Prod(Z,Z,Sequence(Z),Sequence(Prod(Z,Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    a[n_] := Floor[n/2] * n!; Array[a, 25, 0] (* Amiram Eldar, Jan 22 2023 *)
  • PARI
    a(n)=if(n<0,0,n!*polcoeff(x^2/(1-x)/(1-x^2)+x*O(x^n),n))
    
  • PARI
    a(n)=n!*(n\2); \\ Joerg Arndt, Jan 22 2023

Formula

a(0)=0, a(1)=0, a(2)=2, n*a(n+2) = (n+2)*a(n+1) + (n^3 + 4*n^2 + 5*n + 2)*a(n).
a(n) = (2*n-1+(-1)^n)*n!/4 = n!*floor(n/2) = n!*A004526(n).
E.g.f.: x^2/((1-x)*(1-x^2)).
Sum_{n>=2} 1/a(n) = 4*CoshIntegral(1) - 4*gamma - 2*sinh(1) + 2 = 4*A099284 - 4*A001620 - 2*A073742 + 2. - Amiram Eldar, Jan 22 2023

A062779 a(n) = 2*n*(2*n)!.

Original entry on oeis.org

0, 4, 96, 4320, 322560, 36288000, 5748019200, 1220496076800, 334764638208000, 115242726703104000, 48658040163532800000, 24728016011107368960000, 14890761641597746544640000, 10485577989291746525184000000
Offset: 0

Views

Author

Jason Earls, Jul 18 2001

Keywords

References

  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 38, equation 38:6:2 at page 364.

Crossrefs

Programs

  • Mathematica
    a[n_] := 2*n*(2*n)!; Array[a, 14, 0] (* Amiram Eldar, Feb 14 2021 *)
  • PARI
    for(n=0,22,print((2*n)*(2*n)!))

Formula

From Amiram Eldar, Feb 14 2021: (Start)
a(n) = A001563(2*n) = 2*n*A010050(n).
Sum_{n>=1} 1/a(n) = Chi(1) - gamma = A099284 - A001620, where Chi(x) is the hyperbolic cosine integral
Sum_{n>=1} (-1)^(n+1)/a(n) = gamma - Ci(1) = A001620 - A099282, where Ci(x) is the cosine integral. (End)
Previous Showing 11-14 of 14 results.