OFFSET
0,3
REFERENCES
V. van der Noort and N. J. A. Sloane, Paper in preparation, 2007.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..500
FORMULA
See A127080 for e.g.f..
a(n) = (-1)^binomial(n,2)*b(n), where b(2*n) = (2*n)!/n! and b(2*n+1) = 4^n*n!* Sum_{j=0..n} binomial(2*j,j)/8^j. - G. C. Greubel, Jan 30 2020
MAPLE
seq( (-1)^binomial(n, 2)*(`if`(`mod`(n, 2)=0, n!/(n/2)!, 2^(n-1)*((n-1)/2)!*add( binomial(2*j, j)/8^j, j=0..((n-1)/2)) ) ), n=0..30); # G. C. Greubel, Jan 30 2020
MATHEMATICA
Q[0, k_]:= (-1)^Binomial[k, 2]*If[EvenQ[k], k!/(k/2)!, 2^((k-1)/2)*(k)!! Beta[1/2, 1/2, (k+1)/2]/Sqrt[2]]//FullSimplify; Table[Q[0, k], {k, 0, 30}] (* G. C. Greubel, Jan 30 2020 *)
PROG
(PARI) a(n) = (-1)^binomial(n, 2)*if(n%2==0, n!/(n/2)!, 2^(n-1)*((n-1)/2)!*sum( j=0, (n-1)/2, binomial(2*j, j)/8^j));
vector(31, n, a(n-1)) \\ G. C. Greubel, Jan 30 2020
(Magma)
function b(n)
if n mod 2 eq 0 then return Factorial(n)/Gamma(n/2+1);
else return 2^(n-1)*Gamma((n+1)/2)*(&+[Binomial(2*j, j)/8^j: j in [0..((n-1)/2)]]);
end if; return b; end function;
[Round((-1)^Binomial(n, 2)*b(n)): n in [0..30]]; // G. C. Greubel, Jan 30 2020
(Sage)
@CachedFunction
def b(k):
if (mod(k, 2)==0): return factorial(k)/factorial(k/2)
else: return 2^(k-1)*factorial((k-1)/2)*sum(binomial(2*j, j)/8^j for j in (0..(k-1)/2))
def a(k): return (-1)^binomial(k, 2)*b(k)
[a(n) for n in (0..30)] # G. C. Greubel, Jan 30 2020
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Mar 24 2007
EXTENSIONS
Typo in name corrected by G. C. Greubel, Jan 30 2020
STATUS
approved