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

A267313
Expansion of x*(-1 + 2*x + 3*x^2 - 2*x^3 + x^4)/((1 - x)^3*(1 + x + x^2)^2).
1
0, -1, 1, 4, 0, 5, 11, 4, 12, 21, 11, 22, 34, 21, 35, 50, 34, 51, 69, 50, 70, 91, 69, 92, 116, 91, 117, 144, 116, 145, 175, 144, 176, 209, 175, 210, 246, 209, 247, 286, 246, 287, 329, 286, 330, 375, 329, 376, 424, 375, 425, 476, 424, 477, 531, 476, 532, 589, 531, 590, 650, 589, 651, 714, 650, 715
OFFSET
0,4
COMMENTS
First differences are -1, 2, 3, -4, 5, 6, -7, 8, 9, -10, 11, 12, ... - N. J. A. Sloane, May 20 2019
FORMULA
G.f.: x*(-1 + 2*x + 3*x^2 - 2*x^3 + x^4)/((1 - x)^3*(1 + x + x^2)^2).
a(n) = Sum_{k = 0..n} (-1)^(k mod 3)*k.
a(n) = Sum_{k = 0..n} -(-1)^A010882(k)*k.
From G. C. Greubel, Feb 03 2016: (Start)
a(n+7) = a(n+6) + 2*a(n+4) - 2*a(n+3) - a(n+1) + a(n).
E.g.f.: (1/18)*exp(-x/2)*((3*x^2+6*x-4)*exp(3*x/2) + 4*(1-3*x)*cos(sqrt(3)*x/2) - 4*sqrt(3)*(1+x)*sin(sqrt(3)*x/2)). (End)
EXAMPLE
a(0) = 0;
a(1) = 0 - 1 = -1;
a(2) = 0 - 1 + 2 = 1;
a(3) = 0 - 1 + 2 + 3 = 4;
a(4) = 0 - 1 + 2 + 3 - 4 = 0;
a(5) = 0 - 1 + 2 + 3 - 4 + 5 = 5;
a(6) = 0 - 1 + 2 + 3 - 4 + 5 + 6 = 11;
a(7) = 0 - 1 + 2 + 3 - 4 + 5 + 6 - 7 = 4;
a(8) = 0 - 1 + 2 + 3 - 4 + 5 + 6 - 7 + 8 = 12;
a(9) = 0 - 1 + 2 + 3 - 4 + 5 + 6 - 7 + 8 + 9 = 21, etc.
MATHEMATICA
Table[Sum[(-1)^Mod[k, 3] k, {k, 0, n}], {n, 0, 65}]
LinearRecurrence[{1, 0, 2, -2, 0, -1, 1}, {0, -1, 1, 4, 0, 5, 11}, 65]
CoefficientList[Series[x (1 -2 x -3 x^2 +2 x^3 -x^4)/(x^7 -x^6 -2 x^4 + 2 x^3 +x -1), {x, 0, 70}], x] (* Vincenzo Librandi, Jan 13 2016 *)
PROG
(PARI) Vec(x*(1-2*x-3*x^2+2*x^3-x^4)/(x^7-x^6-2*x^4+2*x^3+x-1) + O(x^100)) \\ Altug Alkan, Jan 25 2016
(Magma)
A267313:= func< n | (&+[(-1)^(k mod 3)*k : k in [0..n]]) >;
[A267313(n): n in [0..70]]; // G. C. Greubel, Sep 18 2024
(SageMath)
def A267313(n): return sum((-1)^(k%3)*k for k in range(n+1))
[A267313(n) for n in range(71)] # G. C. Greubel, Sep 18 2024
CROSSREFS
Sequence in context: A355921 A164108 A064520 * A108174 A134530 A351571
KEYWORD
sign,easy
AUTHOR
Ilya Gutkovskiy, Jan 13 2016
STATUS
approved