The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A087960 a(n) = (-1)^binomial(n+1,2). 21
 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS Period 4: repeat [1, -1, -1, 1]. - Joerg Arndt, Feb 14 2016 Also equal to the sign of product(j-i, 1<=j=0 (for n=0 the empty product is put to 1). See the Gradstein-Ryshik reference, p. 63, 1.396 2. with x = sqrt(-1). - Wolfdieter Lang, Oct 22 2013 a(n) + a(n-2) = 0 for n>1, a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 07 2016 E.g.f.: cos(x) - sin(x). - Ilya Gutkovskiy, Jul 07 2016 EXAMPLE a(1) = -1 since (-1)^binomial(2,2) = (-1)^1 = -1. G.f. = 1 - x - x^2 + x^3 + x^4 - x^5 - x^6 + x^7 + x^8 - x^9 - x^10 + ... MAPLE A087960:=n->(-1)^binomial(n+1, 2): seq(A087960(n), n=0..100); # Wesley Ivan Hurt, Jul 07 2016 MATHEMATICA (-1)^Binomial[Range[0, 110], 2] (* or *) LinearRecurrence[{0, -1}, {1, 1}, 110] (* Harvey P. Dale, Jul 07 2014 *) a[ n_] := (-1)^(n (n + 1) / 2); (* Michael Somos, Jul 20 2015 *) a[ n_] := (-1)^Quotient[ n + 1, 2]; (* Michael Somos, Jul 20 2015 *) PROG (PARI) {a(n) = (-1)^((n + 1)\2)}; /* Michael Somos, Jul 20 2015 */ (Haskell) a087960 n = (-1) ^ (n * (n + 1) `div` 2) a087960_list = cycle [1, -1, -1, 1]  -- Reinhard Zumkeller, Nov 15 2015 (MAGMA) [(-1)^Binomial(n+1, 2) : n in [0..100]]; // Wesley Ivan Hurt, Jul 07 2016 CROSSREFS Cf. A000217, A021913, A057077, A097331, A097332, A108299, A180662. Sequence in context: A265643 A283131 A008836 * A164660 A212159 A106400 Adjacent sequences:  A087957 A087958 A087959 * A087961 A087962 A087963 KEYWORD sign,easy AUTHOR W. Edwin Clark, Sep 17 2003 EXTENSIONS More terms from Benoit Cloitre and Ray Chandler, Sep 19 2003 Offset and Vandermonde formula corrected by R. J. Mathar, Sep 25 2009 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.

Last modified April 13 21:24 EDT 2021. Contains 342941 sequences. (Running on oeis4.)