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.
%I A056040 #117 Jul 04 2025 18:39:57 %S A056040 1,1,2,6,6,30,20,140,70,630,252,2772,924,12012,3432,51480,12870, %T A056040 218790,48620,923780,184756,3879876,705432,16224936,2704156,67603900, %U A056040 10400600,280816200,40116600,1163381400,155117520,4808643120,601080390,19835652870,2333606220 %N A056040 Swinging factorial, a(n) = 2^(n-(n mod 2))*Product_{k=1..n} k^((-1)^(k+1)). %C A056040 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 A056040 Similar to but different from A001405(n) = binomial(n, floor(n/2)), a(n) = lcm(A001405(n-1), A001405(n)) (for n>0). %C A056040 A055773(n) divides a(n), A001316(floor(n/2)) divides a(n). %C A056040 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 A056040 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] %H A056040 Vincenzo Librandi, <a href="/A056040/b056040.txt">Table of n, a(n) for n = 0..400</a> %H A056040 Didier Guillet, <a href="/A056040/a056040.pdf">On swinging factorials and the lonely runner conjecture</a> (Text in French). %H A056040 Peter Luschny, <a href="/A180000/a180000.pdf">Die schwingende Fakultät und Orbitalsysteme</a>, August 2011. %H A056040 Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/Orbitals">Orbitals</a>. %H A056040 Peter Luschny, <a href="http://luschny.de/math/factorial/SwingIntro.pdf">Swinging Factorial</a>. %F A056040 a(n) = n!/floor(n/2)!^2. [Essentially the original name.] %F A056040 a(0) = 1, a(n) = n^(n mod 2)*(4/n)^(n+1 mod 2)*a(n-1) for n>=1. %F A056040 E.g.f.: (1+x)*BesselI(0, 2*x). - _Vladeta Jovovic_, Jan 19 2004 %F A056040 O.g.f.: a(n) = SeriesCoeff_{n}((1+z/(1-4*z^2))/sqrt(1-4*z^2)). %F A056040 P.g.f.: a(n) = PolyCoeff_{n}((1+z^2)^n+n*z*(1+z^2)^(n-1)). %F A056040 a(2n+1) = A046212(2n+1) = A100071(2n+1). - _M. F. Hasler_, Jan 25 2012 %F A056040 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 A056040 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 %F A056040 Sum_{n>=0} 1/a(n) = 4/3 + 8*Pi/(9*sqrt(3)). - _Alexander R. Povolotsky_, Aug 18 2012 %F A056040 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 A056040 Central column of the coefficients of the swinging polynomials A162246. - _Peter Luschny_, Oct 22 2013 %F A056040 a(n) = Sum_{k=0..n} A189231(n, 2*k). (Cf. A212303 for the odd case.) - _Peter Luschny_, Oct 30 2013 %F A056040 a(n) = hypergeometric([-n,-n-1,1/2],[-n-2,1],2)*2^(n-1)*(n+2). - _Peter Luschny_, Sep 22 2014 %F A056040 a(n) = 4^floor(n/2)*hypergeometric([-floor(n/2), (-1)^n/2], [1], 1). - _Peter Luschny_, May 19 2015 %F A056040 Sum_{n>=0} (-1)^n/a(n) = 4/3 - 4*Pi/(9*sqrt(3)). - _Amiram Eldar_, Mar 10 2022 %e A056040 a(10) = 10!/5!^2 = trinomial(10,[5,0,5]); %e A056040 a(11) = 11!/5!^2 = trinomial(11,[5,1,5]). %p A056040 SeriesCoeff := proc(s,n) series(s(w,n),w,n+2); %p A056040 convert(%,polynom); coeff(%,w,n) end; %p A056040 a1 := proc(n) local k; %p A056040 2^(n-(n mod 2))*mul(k^((-1)^(k+1)),k=1..n) end: %p A056040 a2 := proc(n) option remember; %p A056040 `if`(n=0,1,n^irem(n,2)*(4/n)^irem(n+1,2)*a2(n-1)) end; %p A056040 a3 := n -> n!/iquo(n,2)!^2; %p A056040 g4 := z -> BesselI(0,2*z)*(1+z); %p A056040 a4 := n -> n!*SeriesCoeff(g4,n); %p A056040 g5 := z -> (1+z/(1-4*z^2))/sqrt(1-4*z^2); %p A056040 a5 := n -> SeriesCoeff(g5,n); %p A056040 g6 := (z,n) -> (1+z^2)^n+n*z*(1+z^2)^(n-1); %p A056040 a6 := n -> SeriesCoeff(g6,n); %p A056040 a7 := n -> combinat[multinomial](n,floor(n/2),n mod 2,floor(n/2)); %p A056040 h := n -> binomial(n,floor(n/2)); # A001405 %p A056040 a8 := n -> ilcm(h(n-1),h(n)); %p A056040 F := [a1, a2, a3, a4, a5, a6, a7, a8]; %p A056040 for a in F do seq(a(i), i=0..32) od; %t A056040 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 A056040 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 A056040 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 A056040 (PARI) a(n)=n!/(n\2)!^2 \\ _Charles R Greathouse IV_, May 02 2011 %o A056040 (Magma) [(Factorial(n)/(Factorial(Floor(n/2)))^2): n in [0..40]]; // _Vincenzo Librandi_, Sep 11 2011 %o A056040 (Sage) %o A056040 def A056040(): %o A056040 r, n = 1, 0 %o A056040 while True: %o A056040 yield r %o A056040 n += 1 %o A056040 r *= 4/n if is_even(n) else n %o A056040 a = A056040(); [next(a) for i in range(36)] # _Peter Luschny_, Oct 24 2013 %Y A056040 Bisections are A000984 and A002457. %Y A056040 Cf. A000142, A001405, A000188, A055772, A056042, A211226, A162246, A189231, A212303. %K A056040 nonn %O A056040 0,3 %A A056040 _Labos Elemer_, Jul 25 2000 %E A056040 Extended and edited by _Peter Luschny_, Jun 28 2009