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

A134967
List of quadruples: [-2n-1, 2n+2, -2n-1, 2n+2].
6
-1, 2, -1, 2, -3, 4, -3, 4, -5, 6, -5, 6, -7, 8, -7, 8, -9, 10, -9, 10, -11, 12, -11, 12, -13, 14, -13, 14, -15, 16, -15, 16, -17, 18, -17, 18, -19, 20, -19, 20, -21, 22, -21, 22, -23, 24, -23, 24, -25, 26, -25, 26, -27, 28, -27, 28, -29, 30, -29, 30, -31, 32, -31, 32, -33, 34, -33, 34, -35, 36, -35, 36, -37, 38, -37, 38, -39
OFFSET
0,2
COMMENTS
First differences are 3, -3, 3, -5, 7, -7, 7, -9, 11, -11, 11, ... .
FORMULA
a(n) = (1-(2*n+3)*(-1)^n-2*(-1)^((2*n+1-(-1)^n)/4))/4. - Luce ETIENNE, Sep 04 2016
a(n) = cos((n-1)*Pi)*(2*n+3+2*cos(n*Pi/2)-cos(n*Pi)+2*sin(n*Pi/2))/4. - Wesley Ivan Hurt, Oct 02 2017
From Colin Barker, Oct 05 2017: (Start)
G.f.: -(1 - x - x^2 - x^3) / ((1 - x)*(1 + x)^2*(1 + x^2)).
a(n) = (1 - 3*(-1)^n - (1-i)*(-i)^n - (1+i)*i^n - 2*(-1)^n*n) / 4 were i=sqrt(-1).
(End)
MATHEMATICA
Flatten[Table[{-2n-1, 2n+2, -2n-1, 2n+2}, {n, 0, 20}]] (* Harvey P. Dale, Oct 19 2011 *)
PROG
(Magma) [(1-(2*n+3)*(-1)^n-2*(-1)^((2*n+1-(-1)^n)div 4))/4: n in [0..80]]; // Vincenzo Librandi, Oct 04 2017
(Magma) &cat [[-2*n-1, 2*n+2, -2*n-1, 2*n+2]: n in [0..30]]; // Vincenzo Librandi, Oct 04 2017
(PARI) Vec(-(1 - x - x^2 - x^3) / ((1 - x)*(1 + x)^2*(1 + x^2)) + O(x^100)) \\ Colin Barker, Oct 05 2017
CROSSREFS
Sequence in context: A059261 A285869 A162330 * A320581 A240855 A084612
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Feb 04 2008
STATUS
approved