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

A220002 Numerators of the coefficients of an asymptotic expansion in even powers of the Catalan numbers.

Original entry on oeis.org

1, 5, 21, 715, -162877, 19840275, -7176079695, 1829885835675, -5009184735027165, 2216222559226679575, -2463196751104762933637, 1679951011110471133453965, -5519118103058048675551057049, 5373485053345792589762994345215, -12239617587594386225052760043303511
Offset: 0

Views

Author

Peter Luschny, Dec 27 2012

Keywords

Comments

Let N = 4*n+3 and A = sum_{k>=0} a(k)/(A123854(k)*N^(2*k)) then
C(n) ~ 8*4^n*A/(N*sqrt(N*Pi)), C(n) = (4^n/sqrt(Pi))*(Gamma(n+1/2)/ Gamma(n+2)) the Catalan numbers A000108.
The asymptotic expansion of the Catalan numbers considered here is based on the Taylor expansion of square root of the sine cardinal. This asymptotic series involves only even powers of N, making it more efficient than the asymptotic series based on Stirling's approximation to the central binomial which involves all powers (see for example: D. E. Knuth, 7.2.1.6 formula (16)). The series is discussed by Kessler and Schiff but is included as a special case in the asymptotic expansion given by J. L. Fields for quotients Gamma(x+a)/Gamma(x+b) and discussed by Y. L. Luke (p. 34-35), apparently overlooked by Kessler and Schiff.

Examples

			With N = 4*n+3 the first few terms of A are A = 1 + 5/(4*N^2) + 21/(32*N^4) + 715/(128*N^6) - 162877/(2048*N^8) + 19840275/(8192*N^10). With this A C(n) = round(8*4^n*A/(N*sqrt(N*Pi))) for n = 0..39 (if computed with sufficient numerical precision).
		

References

  • Donald E. Knuth, The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees—History of Combinatorial Generation, 2006.
  • Y. L. Luke, The Special Functions and their Approximations, Vol. 1. Academic Press, 1969.

Crossrefs

The logarithmic version is A220422. Appears in A193365 and A220466.
Cf. A220412.

Programs

  • Maple
    A220002 := proc(n) local s; s := n -> `if`(n > 0, s(iquo(n,2))+n, 0);
    (-1)^n*mul(4*i+2, i = 1..2*n)*2^s(iquo(n,2))*coeff(taylor(sqrt(sin(x)/x), x,2*n+2), x, 2*n) end: seq(A220002(n), n = 0..14);
    # Second program illustrating J. L. Fields expansion of gamma quotients.
    A220002 := proc(n) local recF, binSum, swing;
    binSum := n -> add(i,i=convert(n,base,2));
    swing := n -> n!/iquo(n, 2)!^2;
    recF := proc(n, x) option remember; `if`(n=0, 1, -2*x*add(binomial(n-1,2*k+1)*bernoulli(2*k+2)/(2*k+2)*recF(n-2*k-2,x),k=0..n/2-1)) end: recF(2*n,-1/4)*2^(3*n-binSum(n))*swing(4*n+1) end:
  • Mathematica
    max = 14; CoefficientList[ Series[ Sqrt[ Sinc[x]], {x, 0, 2*max+1}], x^2][[1 ;; max+1]]*Table[ (-1)^n*Product[ (2*k+1), {k, 1, 2*n}], {n, 0, max}] // Numerator (* Jean-François Alcover, Jun 26 2013 *)
  • Sage
    length = 15; T = taylor(sqrt(sin(x)/x),x,0,2*length+2)
    def A005187(n): return A005187(n//2) + n if n > 0 else 0
    def A220002(n):
        P = mul(4*i+2 for i in (1..2*n)) << A005187(n//2)
        return (-1)^n*P*T.coefficient(x, 2*n)
    [A220002(n) for n in range(length)]
    
  • Sage
    # Second program illustrating the connection with the Euler numbers.
    def A220002_list(n):
        S = lambda n: sum((4-euler_number(2*k))/(4*k*x^(2*k)) for k in (1..n))
        T = taylor(exp(S(2*n+1)),x,infinity,2*n-1).coefficients()
        return [t[0].numerator() for t in T][::-1]
    A220002_list(15)

Formula

Let [x^n]T(f(x)) denote the coefficient of x^n in the Taylor expansion of f(x) then r(n) = (-1)^n*prod_{i=1..2n}(2i+1)*[x^(2*n)]T(sqrt(sin(x)/x)) is the rational coefficient of the asymptotic expansion (in N=4*n+3) and a(n) = numerator(r(n)) = r(n)*2^(3*n-bs(n)), where bs(n) is the binary sum of n (A000120).
Also a(n) = numerator([x^(2*n)]T(exp(S))) where S = sum_{k>=1}((4-E(2*k))/ (4*k)*x^(2*k)) and E(n) the Euler numbers A122045.
Also a(n) = sf(4*n+1)*2^(3*n-bs(n))*F_{2*n}(-1/4) where sf(n) is the swinging factorial A056040, bs(n) the binary sum of n and F_{n}(x) J. L. Fields' generalized Bernoulli polynomials A220412.
In terms of sequences this means
r(n) = (-1)^n*A103639(n)*A008991(n)/A008992(n),
a(n) = (-1)^n*A220371(n)*A008991(n)/A008992(n).
Note that a(n) = r(n)*A123854(n) and A123854(n) = 2^A004134(n) = 8^n/2^A000120(n).
Formula from Johannes W. Meijer:
a(n) = d(n+1)*A098597(2*n+1)*(A008991(n)/A008992(n)) with d(1) = 1 and
d(n+1) = -4*(2*n+1)*A161151(n)*d(n),
d(n+1) = (-1)^n*2^(-1)*(2*(n+1))!*A060818(n)*A048896(n).

A273889 a(n) = ((4n-3)!! + (4n-2)!!) / (4n-1).

Original entry on oeis.org

1, 9, 435, 52017, 11592315, 4152126825, 2182133628675, 1581940549814625, 1512952069890336075, 1845586177840605209625, 2796710279417971723681875, 5153962250373844341910100625, 11351091844757135191108560046875, 29444207228221006416048397134215625, 88848552445321896564985597922269171875
Offset: 1

Views

Author

Keywords

Examples

			a(1) = (1 + 2)/3 = 1;
a(2) = (1*3*5 + 2*4*6)/7 = 9;
a(3) = (1*3*5*7*9 + 2*4*6*8*10)/11 = 435.
		

Crossrefs

Programs

  • Mathematica
    B[n_, k_] := (Product[k (i - 1) + 1, {i, 2 n - 1}] + Product[k (i - 1) + 2, {i, 2 n - 1}])/(2 k (n - 1) + 3); Table[B[n, 2], {n, 15}] (* Michael De Vlieger, Jun 10 2016 *)
    Table[((4n-3)!!+(4n-2)!!)/(4n-1),{n,20}] (* Harvey P. Dale, Mar 08 2018 *)
  • Python
    for n in range(1,101):
        if n == 1:
            a = 1
            b = 2
        else:
            a = a*(4*n-5)*(4*n-3)
            b = b*(4*n-4)*(4*n-2)
        c = (a+b)/(4*n-1)
        print(str(n)+" "+str(c))

A009564 E.g.f. sin(x^2)/2, coefficients of x^(4*n + 2).

Original entry on oeis.org

1, -60, 15120, -8648640, 8821612800, -14079294028800, 32382376266240000, -101421602465863680000, 415017197290314178560000, -2149789081963827444940800000, 13750050968240640337841356800000, -106425394494182556214892101632000000, 980390734080409707851586040233984000000
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(-1)^n*Factorial(2+4*n)/(2*Factorial(1+2*n)): n in [0..20]]; // Vincenzo Librandi, Dec 22 2015
    
  • Maple
    seq(i!*coeff(series(sin(x^2)/2,x,4*i+4),x,i),i=2..54,4); # Peter Luschny, Dec 14 2012
  • Mathematica
    nmax = 12; coes = CoefficientList[ Series[ Sin[x^2]/2, {x, 0, 4*nmax + 2}], x]; a[n_] := coes[[4*n + 3]]*(4*n + 2)!; Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Dec 14 2012 *)
    Table[(-1)^n (2 + 4 n)!/(2 (1 + 2 n)!), {n, 0, 25}] (* Vincenzo Librandi, Dec 22 2015 *)
  • PARI
    a(n) = (-1)^n*(2+4*n)!/(2*(1+2*n)!); \\ Altug Alkan, Dec 22 2015
  • Sage
    def A009564(n):
        return falling_factorial(4*n+2,2*n+1)/(2*(-1)^n)
    [A009564(n) for n in (0..12)]  # Peter Luschny, Dec 14 2012
    

Formula

a(n) = (-1)^n*(2+4*n)!/(2*(1+2*n)!) = (-1)^n*A001813(2*n+1)/2. - Robert Israel, Dec 21 2015
From Amiram Eldar, Sep 02 2025: (Start)
a(n) = A024343(n)/2.
Sum_{n>=0} 1/a(n) = sqrt(2*Pi) * (cos(1/4) * FresnelC(1/sqrt(2*Pi)) + sin(1/4) * FresnelS(1/sqrt(2*Pi))), where FresnelC(x) and FresnelS(x) are the Fresnel integrals C(x) and S(x), respectively.
Sum_{n>=0} (-1)^n/a(n) = (sqrt(Pi)/2) * (exp(1/4) * erf(1/2) + erfi(1/2) / exp(1/4)). (End)

Extensions

Extended with signs Mar 1997
Definition corrected and terms a(10)-a(12) from Peter Luschny, Dec 14 2012

A330797 Evaluation of the Stirling cycle polynomials at -1/2 and normalized with (-2)^n.

Original entry on oeis.org

1, 1, -1, 3, -15, 105, -945, 10395, -135135, 2027025, -34459425, 654729075, -13749310575, 316234143225, -7905853580625, 213458046676875, -6190283353629375, 191898783962510625, -6332659870762850625, 221643095476699771875, -8200794532637891559375, 319830986772877770815625
Offset: 0

Views

Author

Peter Luschny, Jan 06 2020

Keywords

Crossrefs

The equivalent for Stirling2 is A009235.

Programs

  • Magma
    m:=30;
    R:=PowerSeriesRing(Rationals(), m+2);
    A330797:= func< n | Coefficient(R!(Laplace( Sqrt(1+2*x) )), n) >;
    [A330797(n): n in [0..m]]; // G. C. Greubel, Sep 14 2023
  • Maple
    a := n -> ((-2)^(n-1)*GAMMA(n-1/2))/sqrt(Pi): seq(a(n), n=1..9);
    # Alternative:
    arec := proc(n) option remember: if n = 0 then 1 else
    (3 - 2*n)*arec(n-1) fi end: seq(arec(n), n=0..20);
    # Or:
    gf := (1+2*x)^(1/2); ser := series(gf, x, 24);
    seq(n!*coeff(ser, x, n), n=0..20);
  • Mathematica
    a[n_]:= (-2)^n*Sum[Abs[StirlingS1[n, k]]*(-1/2)^k, {k, 0, n}];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Nov 19 2021 *)
    Table[(-2)^(n-1)*Pochhammer[1/2, n-1], {n,0,30}] (* G. C. Greubel, Sep 14 2023 *)
  • SageMath
    def A330797(n): return (-2)^(n-1)*rising_factorial(1/2, n-1)
    [A330797(n) for n in (0..20)]
    

Formula

a(n) = (-2)^n*Sum_{k=0..n} |Stirling1(n,k)|*(-1/2)^k.
a(n) = (-2)^(n-1)*RisingFactorial(1/2, n-1).
a(n) = ((-2)^(n-1)*Gamma(n - 1/2))/sqrt(Pi).
a(n) = n!*[x^n] (1+2*x)^(1/2).
D-finite with recurrence a(n) = (3 - 2*n)*a(n-1).
a(n) = (-1)^(n-1)*(2*n-3)!! = (-1)^(n-1)*A001147(n-1).
a(2*n) = -2^(2*n-1)*RisingFactorial(1/2, 2*n-1) = -A103639(n-1).
a(2*n+1) = 4^n*RisingFactorial(1/2, 2*n) = A101485(n).
a(n) ~ -((-2*n)^n/exp(n))/(sqrt(2)*n).
Sum_{n>=0} 1/a(n) = 2 - sqrt(Pi/(2*e))*erfi(1/sqrt(2)), where erfi is the imaginary error function. - Amiram Eldar, Jan 08 2023
O.g.f.: 1+x*2F0(1/2,1;;-2*x). - R. J. Mathar, Aug 10 2025

A220371 a(n) = Product_{i=1..2*n} (4*i+2)*A060818(n).

Original entry on oeis.org

1, 60, 30240, 17297280, 70572902400, 112634352230400, 518118020259840000, 1622745639453818880000, 53122201253160214855680000, 275173002491369912952422400000, 3520013047869603926487387340800000, 27244900990510734391012378017792000000
Offset: 0

Views

Author

Peter Luschny, Dec 13 2012

Keywords

Crossrefs

Programs

  • Maple
    a := proc(n): denom(binomial(1/2, iquo(n,2)))*product((4*i+2), i=1..2*n) end: seq(a(n), n=0..11); # Johannes W. Meijer, Dec 21 2012
  • Mathematica
    a[n_] := 2^(2n)*Product[2i+1, {i, 1, 2n}]*GCD[n!, 2^n]; Table[a[n], {n, 0, 11}] (* Jean-François Alcover, Dec 21 2012 *)
  • Sage
    @CachedFunction
    def A005187(n): return A005187(n//2) + n if n > 0 else 0
    def A220371(n): return mul(4*i+2 for i in (1..2*n)) << A005187(n//2)
    [A220371(n) for n in range(12)]

Formula

a(n) = |A009564(n)|*A060818(n).
a(n) = 4*A193365(n)*a(n-1) with a(0) = 1. - Johannes W. Meijer, Dec 21 2012

A376922 Variance of n-th power of a standard normal random variable.

Original entry on oeis.org

1, 2, 15, 96, 945, 10170, 135135, 2016000, 34459425, 653836050, 13749310575, 316126087200, 7905853580625, 213439785208650, 6190283353629375, 191894675132160000, 6332659870762850625, 221641908024728441250, 8200794532637891559375, 319830558102716120460000
Offset: 1

Views

Author

Adam M. Scherlis, Oct 10 2024

Keywords

Comments

The variance of the n-th sample moment is exactly a(n) / k for sample size k.
For a non-standard normal r.v. X ~ N(0, sigma^2), Var(X^n) = a(n) sigma^(2n).

Examples

			If Z ~ N(0, 1), then Var(Z) = 1, Var(Z^2) = 2, Var(Z^3) = 15, etc.
		

References

  • M. G. Kendall and A. Stuart, The Advanced Theory of Statistics Volume 1, Charles Griffin & Company, 1963, page 229.

Crossrefs

Formula

a(n) = M(2n) - M(n)^2, where M(n) = A123023(n) are the moments of N(0, 1).
Showing 1-6 of 6 results.