login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056040 Swinging factorial, a(n) = 2^(n-(n mod 2))*Product_{k=1..n} k^((-1)^(k+1)). 134

%I

%S 1,1,2,6,6,30,20,140,70,630,252,2772,924,12012,3432,51480,12870,

%T 218790,48620,923780,184756,3879876,705432,16224936,2704156,67603900,

%U 10400600,280816200,40116600,1163381400,155117520,4808643120,601080390,19835652870,2333606220

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

%C 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)].

%C Similar to but different from A001405(n) = binomial(n, floor(n/2)), a(n) = lcm(A001405(n-1), A001405(n)) (for n>0).

%C A055773(n) divides a(n), A001316(floor(n/2)) divides a(n).

%C Sum_{n>=0} 1/a(n) = 4/3 + 8*Pi/(9*sqrt(3)). - _Alexander R. Povolotsky_, Aug 18 2012

%C 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

%C a(n) is the number of vertices of the polytope resulting of intersection of a n-hypercube with hyperplane perpendicular to its diagonal. - _Didier Guillet_, Jun 11 2018

%D Peter Luschny, "Divide, swing and conquer the factorial and the lcm{1,2,...,n}", preprint, April 2008.

%H Vincenzo Librandi, <a href="/A056040/b056040.txt">Table of n, a(n) for n = 0..400</a>

%H Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/Orbitals">Orbitals.

%H Peter Luschny, <a href="http://luschny.de/math/factorial/SwingIntro.pdf">Swinging Factorial</a>

%F a(0) = 1, a(n) = n^(n mod 2)*(4/n)^(n+1 mod 2)*a(n-1) for n>=1.

%F a(n) = n!/floor(n/2)!^2.

%F E.g.f.: (1+x)*BesselI(0, 2*x). - _Vladeta Jovovic_, Jan 19 2004

%F O.g.f.: a(n) = SeriesCoeff_{n}((1+z/(1-4*z^2))/sqrt(1-4*z^2)).

%F P.g.f.: a(n) = PolyCoeff_{n}((1+z^2)^n+n*z*(1+z^2)^(n-1)).

%F a(2n+1) = A046212(2n+1) = A100071(2n+1). - _M. F. Hasler_, Jan 25 2012

%F 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

%F 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

%F 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

%F Central column of the coefficients of the swinging polynomials A162246. - _Peter Luschny_, Oct 22 2013

%F a(n) = Sum_{k=0..n} A189231(n, 2*k). (Cf. A212303 for the odd case.) - _Peter Luschny_, Oct 30 2013

%F a(n) = hypergeometric([-n,-n-1,1/2],[-n-2,1],2)*2^(n-1)*(n+2). - _Peter Luschny_, Sep 22 2014

%F a(n) = 4^floor(n/2)*hypergeometric([-floor(n/2), (-1)^n/2], [1], 1). - _Peter Luschny_, May 19 2015

%e a(10) = 10!/5!^2 = trinomial(10,[5,0,5]);

%e a(11) = 11!/5!^2 = trinomial(11,[5,1,5]).

%p SeriesCoeff := proc(s,n) series(s(w,n),w,n+2);

%p convert(%,polynom); coeff(%,w,n) end;

%p a1 := proc(n) local k;

%p 2^(n-(n mod 2))*mul(k^((-1)^(k+1)),k=1..n) end:

%p a2 := proc(n) option remember;

%p `if`(n=0,1,n^irem(n,2)*(4/n)^irem(n+1,2)*a2(n-1)) end;

%p a3 := n -> n!/iquo(n,2)!^2;

%p g4 := z -> BesselI(0,2*z)*(1+z);

%p a4 := n -> n!*SeriesCoeff(g4,n);

%p g5 := z -> (1+z/(1-4*z^2))/sqrt(1-4*z^2);

%p a5 := n -> SeriesCoeff(g5,n);

%p g6 := (z,n) -> (1+z^2)^n+n*z*(1+z^2)^(n-1);

%p a6 := n -> SeriesCoeff(g6,n);

%p a7 := n -> combinat[multinomial](n,floor(n/2),n mod 2,floor(n/2));

%p h := n -> binomial(n,floor(n/2)); # A001405

%p a8 := n -> ilcm(h(n-1),h(n));

%p F := [a1, a2, a3, a4, a5, a6, a7, a8];

%p for a in F do seq(a(i), i=0..32) od;

%t 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 *)

%t 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 *)

%t 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 *)

%o (PARI) a(n)=n!/(n\2)!^2 \\ _Charles R Greathouse IV_, May 02, 2011

%o (MAGMA) [(Factorial(n)/(Factorial(Floor(n/2)))^2): n in [0..40]]; // _Vincenzo Librandi_, Sep 11 2011

%o (Sage)

%o def A056040():

%o r, n = 1, 0

%o while True:

%o yield r

%o n += 1

%o r *= 4/n if is_even(n) else n

%o a = A056040(); [a.next() for i in range(36)] # _Peter Luschny_, Oct 24 2013

%Y Bisections are A000984 and A002457.

%Y Cf. A000142, A001405, A000188, A055772, A056042, A211226, A162246, A189231, A212303.

%K nonn

%O 0,3

%A _Labos Elemer_, Jul 25 2000

%E Extended and edited by _Peter Luschny_, Jun 28 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 22 19:56 EST 2019. Contains 320403 sequences. (Running on oeis4.)