login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A129724 a(0) = 1; then a(n) = n!*(1 - (-1)^n*Bernoulli(n-1)). 4
1, 2, 3, 7, 24, 116, 720, 5160, 40320, 350784, 3628800, 42940800, 479001600, 4650877440, 87178291200, 2833294464000, 20922789888000, -2166903606067200, 6402373705728000, 6808619561103360000, 2432902008176640000, -26982365129174827008000, 1124000727777607680000 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
MAPLE
a:= proc(n)
if n=0 and n>=0 then 1
elif n mod 2 = 0 then n!*(1 - bernoulli(n-1))
else n!*(1 + bernoulli(n-1))
fi; end;
seq(a(n), n=0..25); # modified by G. C. Greubel, Dec 03 2019
MATHEMATICA
a[0] = 1; a[n_]:= n!*(1-(-1)^n*BernoulliB[n-1]); Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Sep 16 2013 *)
PROG
(PARI) a(n) = if(n==0, 1, n!*(1 - (-1)^n*bernfrac(n-1)) ); \\ G. C. Greubel, Dec 03 2019
(Magma) [n eq 0 select 1 else Factorial(n)*(1 - (-1)^n*Bernoulli(n-1)): n in [0..25]]; // G. C. Greubel, Dec 03 2019
(Sage) [1]+[factorial(n)*(1 - (-1)^n*bernoulli(n-1)) for n in (1..25)] # G. C. Greubel, Dec 03 2019
(GAP) Concatenation([1], List([1..25], n-> Factorial(n)*(1 - (-1)^n*Bernoulli(n-1)) )); # G. C. Greubel, Dec 03 2019
CROSSREFS
Sequence in context: A048824 A355015 A099073 * A358496 A308161 A094697
KEYWORD
sign
AUTHOR
Paul Curtz, Jun 02 2007
EXTENSIONS
Edited with simpler definition by N. J. A. Sloane, May 25 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)