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!)
A267314 Expansion of 2*x*(1 + 2*x - x^2)/((1 - x)*(1 + x^2)^2). 0
0, 2, 6, 0, -8, 2, 14, 0, -16, 2, 22, 0, -24, 2, 30, 0, -32, 2, 38, 0, -40, 2, 46, 0, -48, 2, 54, 0, -56, 2, 62, 0, -64, 2, 70, 0, -72, 2, 78, 0, -80, 2, 86, 0, -88, 2, 94, 0, -96, 2, 102, 0, -104, 2, 110, 0, -112, 2, 118, 0, -120, 2, 126, 0, -128, 2, 134, 0, -136, 2, 142, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
G.f.: 2*x*(1 + 2*x - x^2)/((1 - x)*(1 + x^2)^2).
a(n) = Sum_{k = 0..n} (2k)*(-1)^((-sin((Pi*k)/2) + cos((Pi*k)/2) + 1)/2).
a(n) = Sum_{k = 0..n} A005843(k)*(-1)^A133872(k + 1).
a(n) = 1 - (-1)^(n*(n+1)/2) - (1+(-1)^n)*(-1)^(n/2)*n. [Bruno Berselli, Jan 19 2016]
EXAMPLE
a(0) = 0;
a(1) = 0 + 2 = 2;
a(2) = 0 + 2 + 4 = 6;
a(3) = 0 + 2 + 4 - 6 = 0;
a(4) = 0 + 2 + 4 - 6 - 8 = -8;
a(5) = 0 + 2 + 4 - 6 - 8 + 10 = 2;
a(6) = 0 + 2 + 4 - 6 - 8 + 10 + 12 = 14;
a(7) = 0 + 2 + 4 - 6 - 8 + 10 + 12 - 14 = 0;
a(8) = 0 + 2 + 4 - 6 - 8 + 10 + 12 - 14 - 16 = -16;
a(9) = 0 + 2 + 4 - 6 - 8 + 10 + 12 - 14 - 16 + 18 = 2, etc.
MATHEMATICA
Table[Sum[(2k)*(-1)^((-sin((Pi k)/2)+cos((Pi k)/2)+1)/2), {k, 0, n}], {n, 0, 80}]
CoefficientList[Series[2 x (x^2 - 2 x - 1) / ((x - 1) (x^2 + 1)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Jan 13 2016 *)
Table[1 - (-1)^(n (n + 1)/2) - (1 + (-1)^n) (-1)^(n/2) n, {n, 0, 80}] (* Bruno Berselli, Jan 19 2016 *)
PROG
(PARI) concat(0, Vec(2*x*(1+2*x-x^2)/((1-x)*(1+x^2)^2) + O(x^100))) \\ Michel Marcus, Jan 13 2016
(Magma) &cat [[-8*n, 2, 8*n+6, 0]: n in [0..20]]; // Bruno Berselli, Jan 19 2016
CROSSREFS
Sequence in context: A294789 A197035 A227805 * A180314 A065344 A131105
KEYWORD
sign,easy
AUTHOR
Ilya Gutkovskiy, Jan 13 2016
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 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)