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

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

A137752 First numerator and then denominator (left to right) of Leibniz's harmonic-like triangle.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 5, 6, 1, 3, 1, 4, 7, 12, 7, 12, 1, 4, 1, 5, 9, 20, 31, 30, 9, 20, 1, 5, 1, 6, 11, 30, 49, 60, 49, 60, 11, 30, 1, 6, 1, 7, 13, 42, 71, 105, 209, 140, 71, 105, 13, 42, 1, 7, 1, 8, 15, 56, 97, 168, 351, 280, 351, 280, 97, 168
Offset: 1

Views

Author

Mohammad K. Azarian, Feb 10 2008

Keywords

Comments

In this triangle the right-hand edge consists of the reciprocals of the positive integers. A number that is not in this edge is obtained by adding the number diagonally above it to the number to its immediate right. Note that in Leibniz's harmonic triangle we subtract the two numbers to get a number which is not on the right-hand edge.

Examples

			1/1;
1/2, 1/2;
1/3, 5/6, 1/3;
1/4, 7/12, 7/12, 1/4;
1/5, 9/20, 31/30, 9/20, 1/5;
		

Crossrefs

A137753 First denominator and then numerator (left to right) of Leibniz's harmonic-like triangle.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 3, 1, 6, 5, 3, 1, 4, 1, 12, 7, 12, 7, 4, 1, 5, 1, 20, 9, 30, 31, 20, 9, 5, 1, 6, 1, 30, 11, 60, 49, 60, 49, 30, 11, 6, 1, 7, 1, 42, 13, 105, 71, 140, 209, 105, 71, 42, 13, 7, 1, 8, 1, 56, 15, 168, 97, 280, 351, 280, 351, 168, 97
Offset: 1

Views

Author

Mohammad K. Azarian, Feb 10 2008

Keywords

Examples

			1/1; --> 1 1
1/2, 1/2; --> 2 1 2 1
1/3, 5/6, 1/3; --> 3 1 6 5 3 1
1/4, 7/12, 7/12, 1/4; --> 4 1 12 7 12 7 4 1
1/5, 9/20, 31/30, 9/20, 1/5; --> 5 1 20 9 30 31 20 9 5 1
		

Crossrefs

A046205 In Leibniz's Harmonic Triangle, write numerator first and then denominator of each element.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 1, 6, 1, 3, 1, 4, 1, 12, 1, 12, 1, 4, 1, 5, 1, 20, 1, 30, 1, 20, 1, 5, 1, 6, 1, 30, 1, 60, 1, 60, 1, 30, 1, 6, 1, 7, 1, 42, 1, 105, 1, 140, 1, 105, 1, 42, 1, 7, 1, 8, 1, 56, 1, 168, 1, 280, 1, 280, 1, 168, 1, 56, 1, 8, 1, 9, 1, 72, 1, 252, 1, 504, 1, 630, 1, 504, 1
Offset: 1

Views

Author

Keywords

Examples

			1/1;
1/2, 1/2;
1/3, 1/6, 1/3;
1/4, 1/12, 1/12, 1/4;
1/5, 1/20, 1/30, 1/20, 1/5; ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 83, Problem 25.

Crossrefs

Extensions

More terms from Gregory D Johnson (gjohn(AT)iname.com)
Edited by M. F. Hasler, Apr 05 2015

A137754 Numerators (left to right) of Leibniz's harmonic-like triangle.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 7, 7, 1, 1, 9, 31, 9, 1, 1, 11, 49, 49, 11, 1, 1, 13, 71, 209, 71, 13, 1, 1, 15, 97, 351, 351, 97, 15, 1, 1, 17, 127, 545, 1471, 545, 127, 17, 1, 1, 19, 161, 799, 2561, 2561, 799, 161, 19, 1, 1, 21, 199, 1121, 4159, 10625, 4159, 1121, 199, 21, 1
Offset: 1

Views

Author

Mohammad K. Azarian, Feb 10 2008

Keywords

Examples

			1/1; --> 1
1/2, 1/2; --> 1 1
1/3, 5/6, 1/3; --> 1 5 1
1/4, 7/12, 7/12, 1/4; --> ...
1/5, 9/20, 31/30, 9/20, 1/5;
		

Crossrefs

A137755 Nontrivial numerators (left to right) of Leibniz's harmonic-like triangle.

Original entry on oeis.org

5, 7, 7, 9, 31, 9, 11, 49, 49, 11, 13, 71, 209, 71, 13, 15, 97, 351, 351, 97, 15, 17, 127, 545, 1471, 545, 127, 17, 19, 161, 799, 2561, 2561, 799, 161, 19, 21, 199, 1121, 4159, 10625, 4159, 1121, 199, 21
Offset: 1

Views

Author

Mohammad K. Azarian, Feb 10 2008

Keywords

Examples

			1/1; -->
1/2, 1/2;  -->
1/3, 5/6, 1/3; --> 5
1/4, 7/12, 7/12, 1/4; --> 7 7
1/5, 9/20, 31/30, 9/20, 1/5; --> 9 31 9
		

Crossrefs

A137756 Nontrivial elements in writing the numerator of an element first and then the denominator of that element (left to right) of Leibniz's harmonic-like triangle. That is, the nontrivial elements of A137752.

Original entry on oeis.org

2, 2, 3, 5, 6, 3, 4, 7, 12, 7, 12, 4, 5, 9, 20, 31, 30, 9, 20, 5, 6, 11, 30, 49, 60, 49, 60, 11, 30, 6, 7, 13, 42, 71, 105, 209, 140, 71, 105, 13, 42, 7, 8, 15, 56, 97, 168, 351, 280, 351, 280, 97, 168, 15, 56, 8, 9, 17, 72, 127, 252, 545, 504, 1471
Offset: 1

Views

Author

Mohammad K. Azarian, Feb 10 2008

Keywords

Examples

			1/1; -->
1/2, 1/2; --> 2 2
1/3, 5/6, 1/3; --> 3 5 6 3
1/4, 7/12, 7/12, 1/4; --> ...
1/5, 9/20, 31/30, 9/20, 1/5;
		

Crossrefs

A137757 Nontrivial elements in writing the denominator of an element first and then the numerator of that element (left to right) of Leibniz's harmonic-like triangle. That is, the nontrivial elements of A137753.

Original entry on oeis.org

2, 2, 3, 6, 5, 3, 4, 12, 7, 12, 7, 4, 5, 20, 9, 30, 31, 20, 9, 5, 6, 30, 11, 60, 49, 60, 49, 30, 11, 6, 7, 42, 13, 105, 71, 140, 209, 105, 71, 42, 13, 7, 8, 56, 15, 168, 97, 280, 351, 280, 351, 168, 97, 56, 15, 8, 9, 72, 17, 252, 127, 504, 545, 630, 1471
Offset: 1

Views

Author

Mohammad K. Azarian, Feb 10 2008

Keywords

Examples

			1/1; -->
1/2, 1/2; --> 2 2
1/3, 5/6, 1/3; --> 3 6 5 3
1/4, 7/12, 7/12, 1/4; --> ...
1/5, 9/20, 31/30, 9/20, 1/5;
		

Crossrefs

A137758 Odd elements in writing the denominator of an element first and then the numerator of that element (left to right) of Leibniz's harmonic-like triangle. That is, the odd elements of A137753.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 5, 3, 1, 1, 7, 7, 1, 5, 1, 9, 31, 9, 5, 1, 1, 11, 49, 49, 11, 1, 7, 1, 13, 105, 71, 209, 105, 71, 13, 7, 1, 1, 15, 97, 351, 351, 97, 15, 1, 9, 1, 17, 127, 545, 1471, 545, 127, 17, 9, 1, 1, 19, 161, 799, 2561, 2561, 799, 161, 19, 1
Offset: 1

Views

Author

Mohammad K. Azarian, Feb 10 2008

Keywords

Examples

			1/1; --> 1 1
1/2, 1/2; --> 1 1
1/3, 5/6, 1/3; --> 3 1 5 3 1
1/4, 7/12, 7/12, 1/4; --> ...
1/5, 9/20, 31/30, 9/20, 1/5;
		

Crossrefs

A137759 Odd numbers in writing first numerator and then denominator (left to right) of Leibniz's harmonic-like triangle.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 5, 1, 3, 1, 7, 7, 1, 1, 5, 9, 31, 9, 1, 5, 1, 11, 49, 49, 11, 1, 1, 7, 13, 71, 105, 209, 71, 105, 13, 1, 7, 1, 15, 97, 351, 351, 97, 15, 1, 1, 9, 17, 127, 545, 1471, 545, 127, 17, 1, 9, 1, 19, 161, 799, 2561, 2561, 799, 161, 19, 1
Offset: 1

Views

Author

Mohammad K. Azarian, Feb 11 2008

Keywords

Examples

			1/1; --> 1 1
1/2, 1/2; --> 1 1
1/3, 5/6, 1/3; --> 1 3 5 1 3
1/4, 7/12, 7/12, 1/4; -->
1/5, 9/20, 31/30, 9/20, 1/5;
		

Crossrefs

Showing 1-10 of 20 results. Next