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!)
A176304 a(n) = (-1)^n * n * a(n-1) - 1, with a(0)=0. 3
0, -1, -3, 8, 31, -156, -937, 6558, 52463, -472168, -4721681, 51938490, 623261879, -8102404428, -113433661993, 1701504929894, 27224078878303, -462809340931152, -8330568136760737, 158280794598454002 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The sequence alternates in the sign and in the odd-even parity.
LINKS
MAPLE
a(n):=`if`(n=0, 0, (-1)^n*n*a(n-1) -1); seq(a(n), n=0..20); # G. C. Greubel, Nov 26 2019
MATHEMATICA
a[n_]:= a[n] = If[n==0, 0, (-1)^n*n*a[n-1] -1]; Table[a[n], {n, 0, 20}]
PROG
(PARI) a(n) = if(n==0, 0, (-1)^n*n*a(n-1) -1); \\ G. C. Greubel, Nov 26 2019
(Magma)
function a(n)
if n eq 0 then return 0;
else return (-1)^n*n*a(n-1) -1;
end if; return a; end function;
[a(n): n in [0..20]]; // G. C. Greubel, Nov 26 2019
(Sage)
@CachedFunction
def a(n):
if (n==0): return 0
else: return (-1)^n*n*a(n-1) -1
[a(n) for n in (0..20)] # G. C. Greubel, Nov 26 2019
CROSSREFS
Sequence in context: A352624 A108492 A003470 * A368208 A180385 A148903
KEYWORD
sign,easy
AUTHOR
Roger L. Bagula, Apr 14 2010
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 27 23:22 EDT 2024. Contains 372020 sequences. (Running on oeis4.)