Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Sep 08 2022 08:45:55
%S 1,0,1,5,4,84,296,2680,19776,182336,1812352,19963008,239490560,
%T 3113532928,43589096448,653837290496,10461394714624,177843714539520,
%U 3201186851815424,60822550206644224,1216451004083601408,25545471085864681472,562000363888782868480,12926008369442532360192,310224200866619627405312,7755605021665493184937984
%N a(n) = n!/2-(-2)^(n-2)*(n-2).
%C "Number of positive terms in the ordinary development of a determinant having negative elements in the diagonal and positive elements elsewhere." [Muir]
%D T. Muir, A Treatise on the Theory of Determinants. Dover, NY, 1960, Sect. 132, p. 115.
%F E.g.f.: (1/(1 - x) + (1 + x)*exp(-2*x))/2. - _Ilya Gutkovskiy_, Aug 17 2016
%p f:=n->n!/2-(-2)^(n-2)*(n-2); [seq(f(n),n=0..40)];
%t Table[n!/2 - (-2)^(n - 2)*(n - 2), {n, 0, 25}] (* _Wesley Ivan Hurt_, Aug 17 2016 *)
%o (Magma) [Factorial(n)/2 - (-2)^(n - 2)*(n - 2) : n in [0..30]]; // _Wesley Ivan Hurt_, Aug 17 2016
%K nonn,easy
%O 0,4
%A _N. J. A. Sloane_, Feb 24 2011