login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A319543 a(n) = 1*2*3 - 4*5*6 + 7*8*9 - 10*11*12 + 13*14*15 - ... + (up to n). 9
1, 2, 6, 2, -14, -114, -107, -58, 390, 380, 280, -930, -917, -748, 1800, 1784, 1528, -3096, -3077, -2716, 4884, 4862, 4378, -7260, -7235, -6610, 10290, 10262, 9478, -14070, -14039, -13078, 18666, 18632, 17476, -24174, -24137, -22768, 30660, 30620, 29020 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

In general, for alternating sequences that multiply the first k natural numbers, and subtract/add the products of the next k natural numbers (preserving the order of operations up to n), we have a(n) = (-1)^floor(n/k) * Sum_{i=1..k-1} (1-sign((n-i) mod k)) * (Product_{j=1..i} (n-j+1)) + Sum_{i=1..n} (-1)^(floor(i/k)+1) * (1-sign(i mod k)) * (Product_{j=1..k} (i-j+1)). Here k=3.

An alternating version of A319014.

LINKS

Colin Barker, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (1,0,-4,4,0,-6,6,0,-4,4,0,-1,1).

FORMULA

a(n) = (-1)^floor(n/3) * Sum_{i=1..2} (1-sign((n-i) mod 3)) * (Product_{j=1..i} (n-j+1)) + Sum_{i=1..n} (-1)^(floor(i/3)+1) * (1-sign(i mod 3)) * (Product_{j=1..3} (i-j+1)).

From Colin Barker, Sep 23 2018: (Start)

G.f.: x*(1 + x + 4*x^2 - 12*x^4 - 84*x^5 - 3*x^6 - 9*x^7 + 72*x^8 - 2*x^9 + 4*x^10 - 2*x^11) / ((1 - x)*(1 + x)^4*(1 - x + x^2)^4).

a(n) = a(n-1) - 4*a(n-3) + 4*a(n-4) - 6*a(n-6) + 6*a(n-7) - 4*a(n-9) + 4*a(n-10) - a(n-12) + a(n-13) for n>13.

(End)

EXAMPLE

a(1) = 1;

a(2) = 1*2 = 2;

a(3) = 1*2*3 = 6;

a(4) = 1*2*3 - 4 = 2;

a(5) = 1*2*3 - 4*5 = -14;

a(6) = 1*2*3 - 4*5*6 = -114;

a(7) = 1*2*3 - 4*5*6 + 7 = -107;

a(8) = 1*2*3 - 4*5*6 + 7*8 = -58;

a(9) = 1*2*3 - 4*5*6 + 7*8*9 = 390;

a(10) = 1*2*3 - 4*5*6 + 7*8*9 - 10 = 380;

a(11) = 1*2*3 - 4*5*6 + 7*8*9 - 10*11 = 280;

a(12) = 1*2*3 - 4*5*6 + 7*8*9 - 10*11*12 = -930;

a(13) = 1*2*3 - 4*5*6 + 7*8*9 - 10*11*12 + 13 = -917;

a(14) = 1*2*3 - 4*5*6 + 7*8*9 - 10*11*12 + 13*14 = -748;

a(15) = 1*2*3 - 4*5*6 + 7*8*9 - 10*11*12 + 13*14*15 = 1800; etc.

MAPLE

seq(coeff(series((x*(1+x+4*x^2-12*x^4-84*x^5-3*x^6-9*x^7+72*x^8-2*x^9+4*x^10-2*x^11))/((1-x)*(1+x)^4*(1-x+x^2)^4), x, n+1), x, n), n = 1 .. 45); # Muniru A Asiru, Oct 01 2018

MATHEMATICA

LinearRecurrence[{1, 0, -4, 4, 0, -6, 6, 0, -4, 4, 0, -1, 1}, {1, 2, 6, 2, -14, -114, -107, -58, 390, 380, 280, -930, -917}, 40] (* Stefano Spezia, Sep 23 2018 *)

PROG

(PARI) Vec(x*(1 + x + 4*x^2 - 12*x^4 - 84*x^5 - 3*x^6 - 9*x^7 + 72*x^8 - 2*x^9 + 4*x^10 - 2*x^11) / ((1 - x)*(1 + x)^4*(1 - x + x^2)^4) + O(x^40)) \\ Colin Barker, Sep 23 2018

CROSSREFS

For similar sequences, see: A001057 (k=1), A319373 (k=2), this sequence (k=3), A319544 (k=4), A319545 (k=5), A319546 (k=6), A319547 (k=7), A319549 (k=8), A319550 (k=9), A319551 (k=10).

Cf. A319014.

Sequence in context: A122663 A100892 A324189 * A126287 A236697 A235797

Adjacent sequences:  A319540 A319541 A319542 * A319544 A319545 A319546

KEYWORD

sign,easy

AUTHOR

Wesley Ivan Hurt, Sep 22 2018

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 12 19:41 EST 2019. Contains 329078 sequences. (Running on oeis4.)