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

A205958 a(0) = 1 and a(n) = A180000(n)*a(floor(n/2))^2 for n > 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 48, 16, 40, 40, 270, 270, 945, 63, 129024, 129024, 64512, 64512, 2016000, 96000, 528000, 528000, 144342000, 28868400, 187644600, 20849400, 1787836050, 1787836050, 59594535, 59594535, 3999321544458240, 121191561953280, 1030128276602880
Offset: 0

Views

Author

Peter Luschny, Feb 04 2012

Keywords

Comments

lcm(1,2,..,n) = (n!*a(n)) / ((n/2)!*a(n/2))^2.
lcm(1,2,..,n)*a(n) is a divisor of n! and n!/(lcm(1,2,..,n)*a(n)) is a square.

Crossrefs

Programs

A056040 Swinging factorial, a(n) = 2^(n-(n mod 2))*Product_{k=1..n} k^((-1)^(k+1)).

Original entry on oeis.org

1, 1, 2, 6, 6, 30, 20, 140, 70, 630, 252, 2772, 924, 12012, 3432, 51480, 12870, 218790, 48620, 923780, 184756, 3879876, 705432, 16224936, 2704156, 67603900, 10400600, 280816200, 40116600, 1163381400, 155117520, 4808643120, 601080390, 19835652870, 2333606220
Offset: 0

Views

Author

Labos Elemer, Jul 25 2000

Keywords

Comments

a(n) is the number of 'swinging orbitals' which are enumerated by the trinomial n over [floor(n/2), n mod 2, floor(n/2)].
Similar to but different from A001405(n) = binomial(n, floor(n/2)), a(n) = lcm(A001405(n-1), A001405(n)) (for n>0).
A055773(n) divides a(n), A001316(floor(n/2)) divides a(n).
Exactly p consecutive multiples of p follow the least positive multiple of p if p is an odd prime. Compare with the similar property of A100071. - Peter Luschny, Aug 27 2012
a(n) is the number of vertices of the polytope resulting from the intersection of an n-hypercube with the hyperplane perpendicular to and bisecting one of its long diagonals. - Didier Guillet, Jun 11 2018 [Edited by Peter Munn, Dec 06 2022]

Examples

			a(10) = 10!/5!^2 = trinomial(10,[5,0,5]);
a(11) = 11!/5!^2 = trinomial(11,[5,1,5]).
		

Crossrefs

Programs

  • Magma
    [(Factorial(n)/(Factorial(Floor(n/2)))^2): n in [0..40]]; // Vincenzo Librandi, Sep 11 2011
    
  • Maple
    SeriesCoeff := proc(s,n) series(s(w,n),w,n+2);
    convert(%,polynom); coeff(%,w,n) end;
    a1 := proc(n) local k;
    2^(n-(n mod 2))*mul(k^((-1)^(k+1)),k=1..n) end:
    a2 := proc(n) option remember;
    `if`(n=0,1,n^irem(n,2)*(4/n)^irem(n+1,2)*a2(n-1)) end;
    a3 := n -> n!/iquo(n,2)!^2;
    g4 := z -> BesselI(0,2*z)*(1+z);
    a4 := n -> n!*SeriesCoeff(g4,n);
    g5 := z -> (1+z/(1-4*z^2))/sqrt(1-4*z^2);
    a5 := n -> SeriesCoeff(g5,n);
    g6 := (z,n) -> (1+z^2)^n+n*z*(1+z^2)^(n-1);
    a6 := n -> SeriesCoeff(g6,n);
    a7 := n -> combinat[multinomial](n,floor(n/2),n mod 2,floor(n/2));
    h := n -> binomial(n,floor(n/2)); # A001405
    a8 := n -> ilcm(h(n-1),h(n));
    F := [a1, a2, a3, a4, a5, a6, a7, a8];
    for a in F do seq(a(i), i=0..32) od;
  • Mathematica
    f[n_] := 2^(n - Mod[n, 2])*Product[k^((-1)^(k + 1)), {k, n}]; Array[f, 33, 0] (* Robert G. Wilson v, Aug 02 2010 *)
    f[n_] := If[OddQ@n, n*Binomial[n - 1, (n - 1)/2], Binomial[n, n/2]]; Array[f, 33, 0] (* Robert G. Wilson v, Aug 10 2010 *)
    sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; (* or, twice faster: *) sf[n_] := n!/Quotient[n, 2]!^2; Table[sf[n], {n, 0, 32}] (* Jean-François Alcover, Jul 26 2013, updated Feb 11 2015 *)
  • PARI
    a(n)=n!/(n\2)!^2 \\ Charles R Greathouse IV, May 02 2011
    
  • Sage
    def A056040():
        r, n = 1, 0
        while True:
            yield r
            n += 1
            r *= 4/n if is_even(n) else n
    a = A056040(); [next(a) for i in range(36)]  # Peter Luschny, Oct 24 2013

Formula

a(n) = n!/floor(n/2)!^2. [Essentially the original name.]
a(0) = 1, a(n) = n^(n mod 2)*(4/n)^(n+1 mod 2)*a(n-1) for n>=1.
E.g.f.: (1+x)*BesselI(0, 2*x). - Vladeta Jovovic, Jan 19 2004
O.g.f.: a(n) = SeriesCoeff_{n}((1+z/(1-4*z^2))/sqrt(1-4*z^2)).
P.g.f.: a(n) = PolyCoeff_{n}((1+z^2)^n+n*z*(1+z^2)^(n-1)).
a(2n+1) = A046212(2n+1) = A100071(2n+1). - M. F. Hasler, Jan 25 2012
a(2*n) = binomial(2*n,n); a(2*n+1) = (2*n+1)*binomial(2*n,n). Central terms of triangle A211226. - Peter Bala, Apr 10 2012
D-finite with recurrence: n*a(n) + (n-2)*a(n-1) + 4*(-2*n+3)*a(n-2) + 4*(-n+1)*a(n-3) + 16*(n-3)*a(n-4) = 0. - Alexander R. Povolotsky, Aug 17 2012
Sum_{n>=0} 1/a(n) = 4/3 + 8*Pi/(9*sqrt(3)). - Alexander R. Povolotsky, Aug 18 2012
E.g.f.: U(0) where U(k)= 1 + x/(1 - x/(x + (k+1)*(k+1)/U(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 19 2012
Central column of the coefficients of the swinging polynomials A162246. - Peter Luschny, Oct 22 2013
a(n) = Sum_{k=0..n} A189231(n, 2*k). (Cf. A212303 for the odd case.) - Peter Luschny, Oct 30 2013
a(n) = hypergeometric([-n,-n-1,1/2],[-n-2,1],2)*2^(n-1)*(n+2). - Peter Luschny, Sep 22 2014
a(n) = 4^floor(n/2)*hypergeometric([-floor(n/2), (-1)^n/2], [1], 1). - Peter Luschny, May 19 2015
Sum_{n>=0} (-1)^n/a(n) = 4/3 - 4*Pi/(9*sqrt(3)). - Amiram Eldar, Mar 10 2022

Extensions

Extended and edited by Peter Luschny, Jun 28 2009

A001790 Numerators in expansion of 1/sqrt(1-x).

Original entry on oeis.org

1, 1, 3, 5, 35, 63, 231, 429, 6435, 12155, 46189, 88179, 676039, 1300075, 5014575, 9694845, 300540195, 583401555, 2268783825, 4418157975, 34461632205, 67282234305, 263012370465, 514589420475, 8061900920775, 15801325804719
Offset: 0

Views

Author

Keywords

Comments

Also numerator of e(n-1,n-1) (see Maple line).
Leading coefficient of normalized Legendre polynomial.
Common denominator of expansions of powers of x in terms of Legendre polynomials P_n(x).
Also the numerator of binomial(2*n,n)/2^n. - T. D. Noe, Nov 29 2005
This sequence gives the numerators of the Maclaurin series of the Lorentz factor (see Wikipedia link) of 1/sqrt(1-b^2) = dt/dtau where b=u/c is the velocity in terms of the speed of light c, u is the velocity as observed in the reference frame where time t is measured and tau is the proper time. - Stephen Crowley, Apr 03 2007
Truncations of rational expressions like those given by the numerator operator are artifacts in integer formulas and have many disadvantages. A pure integer formula follows. Let n$ denote the swinging factorial and sigma(n) = number of '1's in the base-2 representation of floor(n/2). Then a(n) = (2*n)$ / sigma(2*n) = A056040(2*n) / A060632(2*n+1). Simply said: this sequence is the odd part of the swinging factorial at even indices. - Peter Luschny, Aug 01 2009
It appears that a(n) = A060818(n)*A001147(n)/A000142(n). - James R. Buddenhagen, Jan 20 2010
The convolution of sequence binomial(2*n,n)/4^n with itself is the constant sequence with all terms = 1.
a(n) equals the denominator of Hypergeometric2F1[1/2, n, 1 + n, -1] (see Mathematica code below). - John M. Campbell, Jul 04 2011
a(n) = numerator of (1/Pi)*Integral_{x=-oo..+oo} 1/(x^2-2*x+2)^n dx. - Leonid Bedratyuk, Nov 17 2012
a(n) = numerator of the mean value of cos(x)^(2*n) from x = 0 to 2*Pi. - Jean-François Alcover, Mar 21 2013
Constant terms for normalized Legendre polynomials. - Tom Copeland, Feb 04 2016
From Ralf Steiner, Apr 07 2017: (Start)
By analytic continuation to the entire complex plane there exist regularized values for divergent sums:
a(n)/A060818(n) = (-2)^n*sqrt(Pi)/(Gamma(1/2 - n)*Gamma(1 + n)).
Sum_{k>=0} a(k)/A060818(k) = -i.
Sum_{k>=0} (-1)^k*a(k)/A060818(k) = 1/sqrt(3).
Sum_{k>=0} (-1)^(k+1)*a(k)/A060818(k) = -1/sqrt(3).
a(n)/A046161(n) = (-1)^n*sqrt(Pi)/(Gamma(1/2 - n)*Gamma(1 + n)).
Sum_{k>=0} (-1)^k*a(k)/A046161(k) = 1/sqrt(2).
Sum_{k>=0} (-1)^(k+1)*a(k)/A046161(k) = -1/sqrt(2). (End)
a(n) = numerator of (1/Pi)*Integral_{x=-oo..+oo} 1/(x^2+1)^n dx. (n=1 is the Cauchy distribution.) - Harry Garst, May 26 2017
Let R(n, d) = (Product_{j prime to d} Pochhammer(j / d, n)) / n!. Then the numerators of R(n, 2) give this sequence and the denominators are A046161. For d = 3 see A273194/A344402. - Peter Luschny, May 20 2021
Using WolframAlpha, it appears a(n) gives the numerator in the residues of f(z) = 2z choose z at odd negative half integers. E.g., the residues of f(z) at z = -1/2, -3/2, -5/2 are 1/(2*Pi), 1/(16*Pi), and 3/(256*Pi) respectively. - Nicholas Juricic, Mar 31 2022
a(n) is the numerator of (1/Pi) * Integral_{x=-oo..+oo} sech(x)^(2*n+1) dx. The corresponding denominator is A046161. - Mohammed Yaseen, Jul 29 2023
a(n) is the numerator of (1/Pi) * Integral_{x=0..Pi/2} sin(x)^(2*n) dx. The corresponding denominator is A101926(n). - Mohammed Yaseen, Sep 19 2023

Examples

			1, 1, 3/2, 5/2, 35/8, 63/8, 231/16, 429/16, 6435/128, 12155/128, 46189/256, ...
binomial(2*n,n)/4^n => 1, 1/2, 3/8, 5/16, 35/128, 63/256, 231/1024, 429/2048, 6435/32768, ...
		

References

  • P. J. Davis, Interpolation and Approximation, Dover Publications, 1975, p. 372.
  • W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, 2nd ed. New York: Wiley, 1968; Chap. III, Eq. 4.1.
  • 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 6, equation 6:14:6 at page 51.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 102.

Crossrefs

Cf. A060818 (denominator of binomial(2*n,n)/2^n), A061549 (denominators).
Cf. A123854 (denominators).
Cf. A161198 (triangle of coefficients for (1-x)^((-1-2*n)/2)).
Cf. A163590 (odd part of the swinging factorial).
Cf. A001405.
First column and diagonal 1 of triangle A100258.
Bisection of A036069.
Bisections give A061548 and A063079.
Inverse Moebius transform of A180403/A046161.
Numerators of [x^n]( (1-x)^(p/2) ): A161202 (p=5), A161200 (p=3), A002596 (p=1), this sequence (p=-1), A001803 (p=-3), A161199 (p=-5), A161201 (p=-7).

Programs

  • Magma
    A001790:= func< n | Numerator((n+1)*Catalan(n)/4^n) >;
    [A001790(n): n in [0..40]]; // G. C. Greubel, Sep 23 2024
  • Maple
    e := proc(l,m) local k; add(2^(k-2*m)*binomial(2*m-2*k,m-k)*binomial(m+k,m)*binomial(k,l),k=l..m); end;
    # From Peter Luschny, Aug 01 2009: (Start)
    swing := proc(n) option remember; if n = 0 then 1 elif irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:
    sigma := n -> 2^(add(i,i=convert(iquo(n,2),base,2))):
    a := n -> swing(2*n)/sigma(2*n); # (End)
    A001790 := proc(n) binomial(2*n, n)/4^n ; numer(%) ; end proc : # R. J. Mathar, Jan 18 2013
  • Mathematica
    Numerator[ CoefficientList[ Series[1/Sqrt[(1 - x)], {x, 0, 25}], x]]
    Table[Denominator[Hypergeometric2F1[1/2, n, 1 + n, -1]], {n, 0, 34}]   (* John M. Campbell, Jul 04 2011 *)
    Numerator[Table[(-2)^n*Sqrt[Pi]/(Gamma[1/2 - n]*Gamma[1 + n]),{n,0,20}]] (* Ralf Steiner, Apr 07 2017 *)
    Numerator[Table[Binomial[2n,n]/2^n, {n, 0, 25}]] (* Vaclav Kotesovec, Apr 07 2017 *)
    Table[Numerator@LegendreP[2 n, 0]*(-1)^n, {n, 0, 25}] (* Andres Cicuttin, Jan 22 2018 *)
    A = {1}; Do[A = Append[A, 2^IntegerExponent[n, 2]*(2*n - 1)*A[[n]]/n], {n, 1, 25}]; Print[A] (* John Lawrence, Jul 17 2020 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( pollegendre(n), n) * 2^valuation((n\2*2)!, 2))};
    
  • PARI
    a(n)=binomial(2*n,n)>>hammingweight(n); \\ Gleb Koloskov, Sep 26 2021
    
  • Sage
    # uses[A000120]
    @CachedFunction
    def swing(n):
        if n == 0: return 1
        return swing(n-1)*n if is_odd(n) else 4*swing(n-1)/n
    A001790 = lambda n: swing(2*n)/2^A000120(2*n)
    [A001790(n) for n in (0..25)]  # Peter Luschny, Nov 19 2012
    

Formula

a(n) = numerator( binomial(2*n,n)/4^n ) (cf. A046161).
a(n) = A000984(n)/A001316(n) where A001316(n) is the highest power of 2 dividing C(2*n, n) = A000984(n). - Benoit Cloitre, Jan 27 2002
a(n) = denominator of (2^n/binomial(2*n,n)). - Artur Jasinski, Nov 26 2011
a(n) = numerator(L(n)), with rational L(n):=binomial(2*n,n)/2^n. L(n) is the leading coefficient of the Legendre polynomial P_n(x).
L(n) = (2*n-1)!!/n! with the double factorials (2*n-1)!! = A001147(n), n >= 0.
Numerator in (1-2t)^(-1/2) = 1 + t + (3/2)t^2 + (5/2)t^3 + (35/8)t^4 + (63/8)t^5 + (231/16)t^6 + (429/16)t^7 + ... = 1 + t + 3*t^2/2! + 15*t^3/3! + 105*t^4/4! + 945*t^5/5! + ... = e.g.f. for double factorials A001147 (cf. A094638). - Tom Copeland, Dec 04 2013
From Ralf Steiner, Apr 08 2017: (Start)
a(n)/A061549(n) = (-1/4)^n*sqrt(Pi)/(Gamma(1/2 - n)*Gamma(1 + n)).
Sum_{k>=0} a(k)/A061549(k) = 2/sqrt(3).
Sum_{k>=0} (-1)^k*a(k)/A061549(k) = 2/sqrt(5).
Sum_{k>=0} (-1)^(k+1)*a(k)/A061549(k) = -2/sqrt(5).
a(n)/A123854(n) = (-1/2)^n*sqrt(Pi)/(gamma(1/2 - n)*gamma(1 + n)).
Sum_{k>=0} a(k)/A123854(k) = sqrt(2).
Sum_{k>=0} (-1)^k*a(k)/A123854(k) = sqrt(2/3).
Sum_{k>=0} (-1)^(k+1)*a(k)/A123854(k) = -sqrt(2/3). (End)
a(n) = 2^A007814(n)*(2*n-1)*a(n-1)/n. - John Lawrence, Jul 17 2020
Sum_{k>=0} A086117(k+3)/a(k+2) = Pi. - Antonio Graciá Llorente, Aug 31 2024
a(n) = A001803(n)/(2*n+1). - G. C. Greubel, Sep 23 2024

A001803 Numerators in expansion of (1 - x)^(-3/2).

Original entry on oeis.org

1, 3, 15, 35, 315, 693, 3003, 6435, 109395, 230945, 969969, 2028117, 16900975, 35102025, 145422675, 300540195, 9917826435, 20419054425, 83945001525, 172308161025, 1412926920405, 2893136075115, 11835556670925
Offset: 0

Views

Author

Keywords

Comments

a(n) is the denominator of the integral from 0 to Pi of (sin(x))^(2*n+1). - James R. Buddenhagen, Aug 17 2008
a(n) is the denominator of (2n)!!/(2*n + 1)!! = 2^(2*n)*n!*n!/(2*n + 1)! (see Andersson). - N. J. A. Sloane, Jun 27 2011
a(n) = (2*n + 1)*A001790(n). A046161(n)/a(n) = 1, 2/3, 8/15, 16/35, 128/315, 256/693, ... is binomial transform of Madhava-Gregory-Leibniz series for Pi/4 (i.e., 1 - 1/3 + 1/5 - 1/7 + ... ). See A173384 and A173396. - Paul Curtz, Feb 21 2010
a(n) is the denominator of Integral_{x=-oo..oo} sech(x)^(2*n+2) dx. The corresponding numerator is A101926(n). - Mohammed Yaseen, Jul 25 2023

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. 798.
  • G. Prévost, Tables de Fonctions Sphériques. Gauthier-Villars, Paris, 1933, pp. 156-157.
  • 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 6, equation 6:14:9 at page 51.

Crossrefs

The denominator is given in A046161.
Largest odd divisors of A001800, A002011, A002457, A005430, A033876, A086228.
Bisection of A004731, A004735, A086116.
Second column of triangle A100258.
Cf. A002596 (numerators in expansion of (1-x)^(1/2)).
Cf. A161198 (triangle related to the series expansions of (1-x)^((-1-2*n)/2)).
A163590 is the odd part of the swinging factorial, A001790 at even indices. - Peter Luschny, Aug 01 2009

Programs

  • Julia
    A001803(n) = sum(<<(A001790(k), A005187(n) - A005187(k)) for k in 0:n) # Peter Luschny, Oct 03 2019
    
  • Magma
    A001803:= func< n | Numerator(Binomial(n+2,2)*Catalan(n+1)/4^n) >;
    [A001803(n): n in [0..30]]; // G. C. Greubel, Apr 27 2025
    
  • Maple
    swing := proc(n) option remember; if n = 0 then 1 elif irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:
    sigma := n -> 2^(add(i,i= convert(iquo(n,2),base,2))):
    a := n -> swing(2*n+1)/sigma(2*n+1); # Peter Luschny, Aug 01 2009
    A001803 := proc(n) (2*n+1)*binomial(2*n,n)/4^n ; numer(%) ; end proc: # R. J. Mathar, Jul 06 2011
    a := n -> denom(Pi*binomial(n, -1/2)): seq(a(n), n = 0..22); # Peter Luschny, Dec 06 2024
  • Mathematica
    Numerator/@CoefficientList[Series[(1-x)^(-3/2),{x,0,25}],x]  (* Harvey P. Dale, Feb 19 2011 *)
    Table[Denominator[Beta[1, n + 1, 1/2]], {n, 0, 22}] (* Gerry Martens, Nov 13 2016 *)
  • PARI
    a(n) = numerator((2*n+1)*binomial(2*n,n)/(4^n)); \\ Altug Alkan, Sep 06 2018
    
  • SageMath
    def A001803(n): return numerator((n+1)*binomial(2*n+2,n+1)/2^(2*n+1))
    print([A001803(n) for n in range(31)]) # G. C. Greubel, Apr 27 2025

Formula

a(n) = (2*n + 1)! /(n!^2*2^A000120(n)) = (n + 1)*binomial(2*n+2,n+1)/2^(A000120(n)+1). - Ralf Stephan, Mar 10 2004
From Johannes W. Meijer, Jun 08 2009: (Start)
a(n) = numerator( (2*n+1)*binomial(2*n,n)/(4^n) ).
(1 - x)^(-3/2) = Sum_{n>=0} ((2*n+1)*binomial(2*n,n)/4^n)*x^n. (End)
Truncations of rational expressions like those given by the numerator or denominator operators are artifacts in integer formulas and have many disadvantages. A pure integer formula follows. Let n$ denote the swinging factorial and sigma(n) = number of '1's in the base-2 representation of floor(n/2). Then a(n) = (2*n+1)$ / sigma(2*n+1) = A056040(2*n+1) / A060632(2*n+2). Simply said: This sequence gives the odd part of the swinging factorial at odd indices. - Peter Luschny, Aug 01 2009
a(n) = denominator(Pi*binomial(n, -1/2)). - Peter Luschny, Dec 06 2024

A057977 GCD of consecutive central binomial coefficients: a(n) = gcd(A001405(n+1), A001405(n)).

Original entry on oeis.org

1, 1, 1, 3, 2, 10, 5, 35, 14, 126, 42, 462, 132, 1716, 429, 6435, 1430, 24310, 4862, 92378, 16796, 352716, 58786, 1352078, 208012, 5200300, 742900, 20058300, 2674440, 77558760, 9694845, 300540195, 35357670, 1166803110, 129644790, 4537567650
Offset: 0

Views

Author

Labos Elemer, Nov 13 2000

Keywords

Comments

The numbers can be seen as a generalization of the Catalan numbers, extending A000984(n)/(n+1) to A056040(n)/(floor(n/2)+1). They can also be seen as composing the aerated Catalan numbers A126120 with the aerated complementary Catalan numbers A138364. (Thus the name 'extended Catalan numbers' might be apt for this sequence.) - Peter Luschny, May 03 2011
a(n) is the number of lattice paths from (0,0) to (n,0) that do not go below the x-axis and consist of steps U=(1,1), D=(1,-1) and maximally one step H=(1,0). - Alois P. Heinz, Apr 17 2013
Equal to A063549 (see comments in that sequence). - Nathaniel Johnston, Nov 17 2014
a(n) can be computed with ballot numbers without multiplications or divisions, see Maple program. - Peter Luschny, Feb 23 2019

Examples

			This GCD equals A001405(n) for the smaller odd number gcd(C(12,6), C(11,5)) = gcd(924,462) = 462 = C(11,5).
		

Crossrefs

Bisections are A000108 and A001700.

Programs

  • Maple
    A057977_ogf := proc(z) b := z -> (z-1)/(2*z^2);
    (2 + b(z))/sqrt(1-4*z^2) - b(z) end:
    seq(coeff(series(A057977_ogf(z),z,n+3),z,n), n = 0..35);
    A057977_rec := n -> `if`(n=0, 1, A057977_rec(n-1)*n^modp(n,2)
    *(4/(n+2))^modp(n+1,2));
    A057977_int := proc(n) int((x^(2*n-1)*((4-x)^2/x)^cos(Pi*n))^(1/4),x=0..4)/(2*Pi); round(evalf(%)) end:
    A057977 := n -> (n!/iquo(n,2)!^2) / (iquo(n,2)+1):
    seq(A057977(n), n=0..35); # Peter Luschny, Apr 30 2011
    b := proc(p, q) option remember; local S;
       if p = 0 and q = 0 then return 1 fi;
       if p < 0 or  p > q then return 0 fi;
       S := b(p-2, q) + b(p, q-2);
       if type(q, odd) then S := S + b(p-1, q-1) fi;
       S end:
    seq(b(n, n), n=0..35); # Peter Luschny, Feb 23 2019
  • Mathematica
    a[n_] := n! / (Quotient[n, 2]!^2 * (Quotient[n, 2]+1)); Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Feb 03 2012, after Peter Luschny *)
  • PARI
    a(n)=if(n<0,0,(n+n%2)!/(n\2+1)!/(n\2+n%2)!/(1+n%2))
    a(n)=n!/(n\2)!^2/(n\2+1) \\ Charles R Greathouse IV, May 02 2011
    
  • Sage
    def A057977():
        x, n = 1, 1
        while True:
            yield x
            m = n if is_odd(n) else 4/(n+2)
            x *= m
            n += 1
    a = A057977(); [next(a) for i in range(36)]   # Peter Luschny, Oct 21 2013

Formula

G.f.: (4*x^2+x-1+(1-x)*sqrt(1-4*x^2))/(2*sqrt(1-4*x^2)*x^2). E.g.f.: (1+1/x)*BesselI(1, 2*x). - Vladeta Jovovic, Jan 19 2004
From Peter Luschny, Apr 30 2011: (Start)
Recurrence: a(0) = 1 and a(n) = a(n-1)*n^[n odd]*(4/(n+2))^[n even] for n > 0.
Asymptotic formula: Let [n even] = 1 if n is even, 0 otherwise. Let N := n+1+[n even]. Then a(n) ~ 2^N /((n+1)^[n even]*sqrt(Pi*(2*N+1))).
Integral representation: a(n) = (1/(2*Pi))*Int_{x=0..4}(x^(2*n-1)* ((4-x)^2/x)^cos(Pi*n))^(1/4) (End)
E.g.f.: U(0) where U(k)= 1 + x/(1 - x/(x + (k+1)*(k+2)//U(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 19 2012
From R. J. Mathar, Sep 16 2016: (Start)
D-finite with recurrence: (n+2)*a(n) - n*a(n-1) + 4*(-2*n+1)*a(n-2) + 4*(n-1)*a(n-3) + 16*(n-3)*a(n-4) = 0.
D-finite with recurrence: -(n+2)*(n^2-5)*a(n) + 4*(-2*n-1)*a(n-1) + 4*(n-1)*(n^2+2*n-4)*a(n-2) = 0. (End)
Sum_{n>=0} 1/a(n) = 8/3 + 8*Pi/(9*sqrt(3)). - Amiram Eldar, Aug 20 2022

A081125 a(n) = n! / floor(n/2)!.

Original entry on oeis.org

1, 1, 2, 6, 12, 60, 120, 840, 1680, 15120, 30240, 332640, 665280, 8648640, 17297280, 259459200, 518918400, 8821612800, 17643225600, 335221286400, 670442572800, 14079294028800, 28158588057600, 647647525324800, 1295295050649600
Offset: 0

Views

Author

Paul Barry, Mar 07 2003

Keywords

Comments

Product of the largest parts in the partitions of n+1 into exactly two parts, n > 0. - Wesley Ivan Hurt, Jan 26 2013 (Clarified on Apr 20 2016)

Examples

			a(3) = 6 since 3+1 = 4 has two partitions into two parts, (3,1) and (2,2), and the product of the largest parts is 6. - _Wesley Ivan Hurt_, Jan 26 2013 (Clarified on Apr 20 2016)
		

Crossrefs

Cf. A004526, A056040, A081123, A000407 (bisection), A001813 (bisection).

Programs

  • Magma
    [Factorial(n)/(Factorial(Floor(n/2))): n in [0..30]]; // Vincenzo Librandi, Sep 13 2011
    
  • Maple
    Method 1)  a:=n->n!/floor(n/2)!; seq(a(k),k=0..40); # Wesley Ivan Hurt, Jun 03 2013
    Method 2)  with(combinat, numbperm); seq(numbperm(k, floor((k+1)/2)), k = 0..40); # Wesley Ivan Hurt, Jun 06 2013
  • Mathematica
    Table[n!/Floor[n/2]!, {n, 0, 30}] (* Wesley Ivan Hurt, Apr 20 2016 *)
  • PARI
    a(n)=n!/(n\2)! \\ Charles R Greathouse IV, Sep 13 2011
    
  • Python
    from sympy import rf
    def A081125(n): return rf((m:=n+1>>1)+(n+1&1),m) # Chai Wah Wu, Jul 22 2022
  • Sage
    def a(n): return rising_factorial(ceil(n/2),floor(n/2))
    [a(n) for n in range(26)]  # Peter Luschny, Oct 09 2013
    

Formula

E.g.f.: (1+x)*exp(x^2). - Vladeta Jovovic, Sep 24 2003
From Peter Luschny, Aug 07 2009: (Start)
a(n) = sqrt(n!*n$) where n$ denotes the swinging factorial (A056040).
a(n) = 2^n Gamma((n+1+(n mod 2))/2)/sqrt(Pi). (End)
E.g.f.: E(0) where E(k) = 1 + x/(1 - x/(x + (k+1)/E(k+1))) ; (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Sep 20 2012
G.f.: G(0) where G(k) = 1 + x*(2*k+1)/(1 - 2*x/(2*x + 1/G(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 18 2012
D-finite with recurrence a(n) +2*a(n-1) -2*n*a(n-2) +4*(-n+2)*a(n-3) = 0. - R. J. Mathar, Nov 26 2012
From Wesley Ivan Hurt, Jun 06 2013: (Start)
a(n) = n!/(n-floor((n+1)/2))!.
a(n) = Product_{i = ceiling(n/2)..(n-1)} i. [Note: empty product = 1]
a(n) = P( n, floor((n+1)/2) ), where P(n,k) are the number of k-permutations of n objects. (End)
a(n) = n$*floor(n/2)! where n$ denotes the swinging factorial (A056040). - Peter Luschny, Oct 28 2013
From Amiram Eldar, Mar 10 2022: (Start)
Sum_{n>=0} 1/a(n) = 1 + (3/2)*exp(1/4)*sqrt(Pi)*erf(1/2).
Sum_{n>=0} (-1)^n/a(n) = 1 - (1/2)*exp(1/4)*sqrt(Pi)*erf(1/2). (End)

A189912 Extended Motzkin numbers, Sum_{k>=0} C(n,k)*C(k), where C(k) is the extended Catalan number A057977(k).

Original entry on oeis.org

1, 2, 4, 10, 25, 66, 177, 484, 1339, 3742, 10538, 29866, 85087, 243478, 699324, 2015082, 5822619, 16865718, 48958404, 142390542, 414837699, 1210439958, 3536809521, 10347314544, 30306977757, 88861597426, 260798283502, 766092871654, 2252240916665
Offset: 0

Views

Author

Peter Luschny, May 01 2011

Keywords

Comments

a(n) = Sum_{k=0..n} binomial(n,k)*A057977(k). For comparison:
A001006(n) = Sum_{k=0..n} binomial(n,k)*A057977(k)*[k is even],
A005717(n) = Sum_{k=0..n} binomial(n,k)*A057977(k)*[k is odd].
Thus one might simply say: The extended Motzkin numbers are the binomial sum of the extended Catalan numbers. Moreover: The Catalan numbers aerated with 0's at odd positions (A126120) are the inverse binomial transform of the Motzkin numbers (A001006). The complementary Catalan numbers (A001700) aerated with 0's at even positions (A138364) are the inverse binomial transform of the complementary Motzkin numbers (A005717). The extended Catalan numbers (A057977 = A126120 + A138364) are the inverse binomial transform of the extended Motzkin numbers (A189912).
David Scambler observed that [1, a(n-1)] for n >= 1 count the Dyck paths of semilength n which satisfy the condition "number of peaks <= number of returns + number of hills". - Peter Luschny, Oct 22 2012

Crossrefs

Programs

  • Maple
    A189912 := proc(n) local k;
    add(n!/(((n-k)!*iquo(k,2)!^2)*(iquo(k,2)+1)),k=0..n) end:
    M := proc(n) option remember; `if`(n<2, 1, (3*(n-1)*M(n-2)+(2*n+1)*M(n-1))/(n+2)) end:
    A189912 := n -> n*M(n-1)+M(n);
    seq(A189912(i), i=0..28); # Peter Luschny, Sep 12 2011
  • Mathematica
    A057977[n_] := n!/(Quotient[n, 2]!^2*(Quotient[n, 2] + 1)); a[n_] := Sum[Binomial[n, k]*A057977[k], {k, 0, n}]; Table[a[n], {n, 0, 28}] (* Jean-François Alcover, May 21 2013, after Peter Luschny *)
    Table[Sum[n!/(((n-k)!*Floor[k/2]!^2)*(Floor[k/2]+1)), {k,0,n}], {n,0,30}] (* G. C. Greubel, Jan 24 2017 *)
    A057977[n_] :=  Sum[n! (n + 1 - 2 k)/((k + 1)! (k!) (n - 2 k)!), {k, 0, n}] (* Per W. Alexandersson, May 28 2020 *)
  • PARI
    a(n) = sum(k=0, n, binomial(n,k)*k!/( (k\2)!^2 * (k\2+1)) );
    vector(30, n, a(n-1)) \\ G. C. Greubel, Jan 24 2017; Mar 28 2020
  • Sage
    @CachedFunction
    def M(n): return (3*(n-1)*M(n-2)+(2*n+1)*M(n-1))/(n+2) if n>1 else 1
    A189912 = lambda n: n*M(n-1) + M(n)
    [A189912(i) for i in (0..28)] # Peter Luschny, Oct 22 2012
    

Formula

a(n) = Sum_{k=0..n} n!/(((n-k)!*floor(k/2)!^2)*(floor(k/2)+1)).
Recurrence: (n+2)*(n^2 + 2*n - 5)*a(n) = (2*n^3 + 7*n^2 - 14*n - 7)*a(n-1) + 3*(n-1)*(n^2 + 4*n - 2)*a(n-2). - Vaclav Kotesovec, Mar 20 2014
a(n) ~ 3^(n+1/2) / (2*sqrt(Pi*n)). - Vaclav Kotesovec, Mar 20 2014
Conjecture: a(n) = Sum_{k=0..floor(n/2)} (n+1-2*k)*A055151(n,k). - Werner Schulte, Oct 23 2016
a(n) = Sum_{k=0..floor(n/2)} (n+1-2*k)*n!/(k!*(k+1)!*(n-2*k)!). - Per W. Alexandersson, May 28 2020

A189231 Extended Catalan triangle read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 2, 3, 1, 2, 8, 3, 4, 1, 10, 5, 15, 4, 5, 1, 5, 30, 9, 24, 5, 6, 1, 35, 14, 63, 14, 35, 6, 7, 1, 14, 112, 28, 112, 20, 48, 7, 8, 1, 126, 42, 252, 48, 180, 27, 63, 8, 9, 1, 42, 420, 90, 480, 75, 270, 35, 80, 9, 10, 1, 462, 132, 990, 165, 825, 110, 385, 44, 99, 10, 11, 1
Offset: 0

Views

Author

Peter Luschny, May 01 2011

Keywords

Comments

Let S(n,k) denote the coefficients of the positive powers of the Laurent polynomials C_n(x) = (x+1/x)^(n-1)*(x-1/x)*(x+1/x+n) (if n>0) and C_0(x) = 0.
Then T(n,k) = S(n+1,k+1) for n>=0, k>=0.
The classical Catalan triangle A053121(n,k) can be recovered from this triangle by setting T(n,k) = 0 if n-k is odd.
The complementary Catalan triangle A189230(n,k) can be recovered from this triangle by setting T(n,k) = 0 if n-k is even.
T(n,0) are the extended Catalan numbers A057977(n).

Examples

			The Laurent polynomials:
C(0,x) =                 0
C(1,x) =               x - 1/x
C(2,x) =         x^2 + x - 1/x - 1/x^2
C(3,x) = x^3 + 2 x^2 + x - 1/x - 2/x^2 -1/x^3
Triangle T(n,k) = S(n+1,k+1) starts
[0]   1,
[1]   1,  1,
[2]   1,  2,  1,
[3]   3,  2,  3,  1,
[4]   2,  8,  3,  4,  1,
[5]  10,  5, 15,  4,  5,  1,
[6]   5, 30,  9, 24,  5,  6,  1,
[7]  35, 14, 63, 14, 35,  6,  7, 1,
    [0],[1],[2],[3],[4],[5],[6],[7]
		

Crossrefs

Programs

  • Maple
    A189231_poly := (n,x)-> `if`(n=0,0,(x+1/x)^(n-2)*(x-1/x)*(x+1/x+n-1)):
    seq(print([n],seq(coeff(expand(A189231_poly(n,x)),x,k),k=1..n)),n=1..9);
    A189231 := proc(n,k) option remember; `if`(k>n or k<0, 0, `if`(n=k, 1, A189231(n-1,k-1)+modp(n-k,2)*A189231(n-1,k)+A189231(n-1,k+1))) end:
    seq(print(seq(A189231(n,k),k=0..n)),n=0..9);
  • Mathematica
    t[n_, k_] /; (k > n || k < 0) = 0; t[n_, n_] = 1; t[n_, k_] := t[n, k] = t[n-1, k-1] + Mod[n-k, 2]*t[n-1, k] + t[n-1, k+1]; Table[t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 30 2013 *)

Formula

Recurrence: If k>n or k<0 then T(n,k) = 0 else if n=k then T(n,k) = 1; otherwise T(n,k) = T(n-1,k-1) + ((n-k) mod 2)*T(n-1,k) + T(n-1,k+1).
S(n,k) = (k/n)* A162246(n,k) for n>0 where S(n,k) are the coefficients from the definition provided the triangle A162246 is indexed in Laurent style by the recurrence: if abs(k) > n then A162246(n,k) = 0 else if n = k then A162246(n,k) = 1 and otherwise A162246(n,k) = A162246(n-1,k-1)+ modp(n-k,2) * A162246(n-1,k) + A162246(n-1,k+1).
Row sums: A189911(n) = A162246(n,n) + A162246(n,n+1) for n>0.

A162246 Swinging polynomials, coefficients read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 3, 3, 6, 3, 3, 1, 1, 4, 4, 12, 6, 12, 4, 4, 1, 1, 5, 5, 20, 10, 30, 10, 20, 5, 5, 1, 1, 6, 6, 30, 15, 60, 20, 60, 15, 30, 6, 6, 1, 1, 7, 7, 42, 21, 105, 35, 140, 35, 105, 21, 42, 7, 7, 1
Offset: 0

Views

Author

Peter Luschny, Jun 28 2009

Keywords

Comments

Let p(n,x) = (1+x^2)^n+n*x*(1+x^2)^(n-1), then T(n,k) are the coefficients of these polynomials, read by rows, n = 0,1,...
The central numbers of the rows, i.e., the coefficients of x^n of p(n,x), are the swinging factorial numbers A056040(n).
Row sums: sum_{k=0..2n} T(n,k) = A001792(n).
sum_{k=0..2n} isodd(n+k)T(n,k) = 2^n(isodd(n)+(n/2)isodd(n+1))
= 0, 2, 4, 8, 32, 32, 192, 128, 1024, 512, 5120, ...
sum_{k=0..2n} iseven(n+k)T(n,k) = 2^n(isodd(n)(n/2)+isodd(n+1))
= 1, 1, 4, 12, 16, 80, 64, 448, 256, 2304, 1024, ...

Examples

			The central coefficients are marked by [].
[1]
1,[1],1
1,2,[2],2,1
1,3,3,[6],3,3,1
1,4,4,12,[6],12,4,4,1
1,5,5,20,10,[30],10,20,5,5,1
1,6,6,30,15,60,[20],60,15,30,6,6,1
1,7,7,42,21,105,35,[140],35,105,21,42,7,7,1
p(0,x) = 1
p(1,x) = x^2+x+1
p(2,x) = x^4+2x^3+2x^2+2x+1
p(3,x) = x^6+3x^5+3x^4+6x^3+3x^2+3x+1
p(4,x) = x^8+4x^7+4x^6+12x^5+6x^4+12x^3+4x^2+4x+1
p(5,x) = x^10+5x^9+5x^8+20x^7+10x^6+30x^5+10x^4+20x^3+5x^2+5x+1
		

Crossrefs

Programs

  • Maple
    p := (n,x) -> (1+x^2)^n+n*x*(1+x^2)^(n-1):
    seq(print(seq(coeff(expand(p(n,x)),x,i),i=0..2*n)),n=0..7);
    T := (n,k) -> n!/((n-ceil(k/2))!*floor(k/2)!);
    seq(print(seq(T(n,k),k=0..2*n)),n=0..7);
  • Mathematica
    t[n_, k_] := If[EvenQ[k], Binomial[n, k/2], Binomial[n, (k-1)/2]*(n-(k-1)/2)]; Table[t[n, k], {n, 0, 7}, {k, 0, 2*n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

Formula

T(n,k) = n!/((n-ceiling(k/2))!*floor(k/2)!).

A163210 Swinging Wilson quotients ((p-1)$ +(-1)^floor((p+2)/2))/p, p prime. Here '$' denotes the swinging factorial function (A056040).

Original entry on oeis.org

1, 1, 1, 3, 23, 71, 757, 2559, 30671, 1383331, 5003791, 245273927, 3362110459, 12517624987, 175179377183, 9356953451851, 509614686432899, 1938763632210843, 107752663194272623
Offset: 1

Views

Author

Peter Luschny, Jul 24 2009

Keywords

Examples

			The 5th prime is 11, (11-1)$ = 252, the remainder term is (-1)^floor((11+2)/2)=1. So the quotient (252+1)/11 = 23 is the 5th member of the sequence.
		

Crossrefs

Programs

  • Maple
    swing := proc(n) option remember; if n = 0 then 1 elif irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:
    WQ := proc(f,r,n) map(p->(f(p-1)+r(p))/p,select(isprime,[$1..n])) end:
    A163210 := n -> WQ(swing,p->(-1)^iquo(p+2,2),n);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; a[n_] := (p = Prime[n]; (sf[p - 1] + (-1)^Floor[(p + 2)/2])/p); Table[a[n], {n, 1, 19}] (* Jean-François Alcover, Jun 28 2013 *)
    a[p_] := (Binomial[p-1, (p-1)/2] - (-1)^((p-1)/2)) / p
    Join[{1, 1}, a[Prime[Range[3,20]]]] (* Peter Luschny, May 13 2017 *)
  • PARI
    a(n, p=prime(n)) = ((p-1)!/((p-1)\2)!^2 - (-1)^(p\2))/p \\ David A. Corneth, May 13 2017
Showing 1-10 of 48 results. Next