login

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”).

A055634
2-adic factorial function.
12
1, -1, 1, -3, 3, -15, 15, -105, 105, -945, 945, -10395, 10395, -135135, 135135, -2027025, 2027025, -34459425, 34459425, -654729075, 654729075, -13749310575, 13749310575, -316234143225, 316234143225, -7905853580625, 7905853580625, -213458046676875, 213458046676875
OFFSET
0,4
COMMENTS
Also known as Morita's 2-adic gamma function. - Harry Richman, Jul 26 2023
REFERENCES
Serge Lang, Cyclotomic Fields I and II, Springer-Verlag, 1990, p. 315.
LINKS
Daniel Barsky, On Morita's p-adic Gamma function, Groupe de travail d'analyse ultramétrique, 5 (1977-1978), Talk no. 3, 6 p.
FORMULA
a(2*n) = -a(2*n - 1) = (2*n - 1)!!
a(n) = (-1)^n*n!/A037223(n), A037223(n) = 2^floor(n/2)*floor(n/2)!. Exponential generating function: (1-x)*exp(x^2/2). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 01 2002
MATHEMATICA
a[ n_] := If[ n < 0, 0, n! (-1)^n / (n - Mod[n, 2])!!]; (* Michael Somos, Jun 30 2018 *)
4[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ (1 - x) Exp[x^2/2], {x, 0, n}]]; (* Michael Somos, Jun 30 2018 *)
PROG
(PARI) {a(n) = if( n<1, 1, -if( n%2, n * a(n-1), a(n-1)))};
(PARI) a(n)=(-1)^n*(n=bitor(n-1, 1))!/(n\2)!>>(n\2) \\ Charles R Greathouse IV, Oct 01 2012
(Sage)
def Gauss_factorial(N, n): return mul(j for j in (1..N) if gcd(j, n) == 1)
def A055634(n): return (-1)^n*Gauss_factorial(n, 2)
[A055634(n) for n in (0..28)] # Peter Luschny, Oct 01 2012
(Magma) /* Based on Gauss factorial n_2!: */ k:=2; [IsZero(n) select 1 else (-1)^n*&*[j: j in [1..n] | IsOne(GCD(j, k))]: n in [0..30]]; // Bruno Berselli, Dec 10 2013
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Jun 06 2000
STATUS
approved