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.

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

A056067 Numbers k such that k! is divisible by the square of (f+d)!^2 for d=0 and d=1 (and possibly larger d), where f = floor(k/2).

Original entry on oeis.org

1, 10, 11, 28, 29, 54, 55, 82, 83, 88, 89, 130, 131, 152, 153, 180, 181, 218, 219, 250, 251, 278, 279, 304, 305, 310, 311, 338, 339, 372, 373, 378, 379, 406, 407, 416, 417, 418, 419, 438, 439, 454, 455, 460, 461, 474, 475, 530, 531, 550, 551, 596, 597, 614
Offset: 1

Views

Author

Labos Elemer, Jul 26 2000

Keywords

Comments

Observe that all terms (except 1) are pairs of consecutive numbers starting with an even number (e.g., 88, 89).
Numbers k such that A056039(k) > floor(k/2). - Amiram Eldar, May 24 2024

Examples

			For n = 10 and 11, 10! and 11! are both divisible by 5!^2 and 6!^2.
		

Crossrefs

A056068 is a subsequence.

Programs

  • Mathematica
    q[n_] := Module[{k = 1}, NestWhile[#/(++k)^2 &, n!, IntegerQ]; k - 1] > Floor[n/2]; Select[Range[620], q] (* Amiram Eldar, May 24 2024 *)

A056068 Numbers k such that k! is divisible by the square of (f+d)!^2 for d = 0, 1 and 2 (and possibly larger d), where f = floor(k/2).

Original entry on oeis.org

416, 417, 916, 917, 1974, 1975, 2440, 2441, 2910, 2911, 3194, 3195, 3778, 3779, 4024, 4025, 4288, 4289, 4660, 4661, 4954, 4955, 5326, 5327, 5982, 5983, 6706, 6707, 6830, 6831, 6860, 6861, 6878, 6879, 6950, 6951, 6952, 6953, 7102, 7103, 7126, 7127
Offset: 1

Views

Author

Labos Elemer, Jul 26 2000

Keywords

Comments

Numbers k such that A056039(k) > floor(k/2) + 1. - Amiram Eldar, May 24 2024

Crossrefs

Subsequence of A056067.

Programs

  • Mathematica
    q[n_] := Module[{k = 1}, NestWhile[#/(++k)^2 &, n!, IntegerQ]; k - 1] > Floor[n/2] + 1; Select[Range[7200], q] (* Amiram Eldar, May 24 2024 *)

A096123 Least product n*(n-1)*(n-2)*...*(n-k+1) divisible by (n-k)!.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Jul 01 2004

Keywords

Comments

Conjecture: a(n) = n!/(p-1)! for all sufficiently large n, where p is the least prime such that n <= 2*p (Amarnath Murthy). A096974 gives numbers n such that a(n) = n!/(nextprime(n/2)-1)! and indicates that this conjecture is most probably false.

Examples

			a(10) = 5040 as 10*9 is not divisible by 8!, 10*9*8 is not divisible by 7! but 10*9*8*7 = 5040 is divisible by 6! = 720.
		

Crossrefs

Programs

  • PARI
    {for(n=1,24,p=1;k=0;b=1;while(b&&k
    				

Extensions

Edited and extended by Klaus Brockhaus, Jul 17 2004
Showing 1-4 of 4 results.