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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A055634 2-adic factorial function. 13
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

REFERENCES

Serge Lang, Cyclotomic Fields I and II, Springer-Verlag, 1990, p. 315.

LINKS

Kenny Lau, Table of n, a(n) for n = 0..806

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

Cf. A006882, A001147, A133221.

Sequence in context: A290344 A217858 A185275 * A133221 A232097 A110096

Adjacent sequences:  A055631 A055632 A055633 * A055635 A055636 A055637

KEYWORD

sign

AUTHOR

Michael Somos, Jun 06 2000

STATUS

approved

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 November 20 02:34 EST 2019. Contains 329323 sequences. (Running on oeis4.)