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!)
A319885 a(n) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 - 12*11 + 14*13 - 16*15 + ... - (up to the n-th term). 9
2, 2, -2, -10, -4, 20, 12, -36, -26, 54, 42, -78, -64, 104, 88, -136, -118, 170, 150, -210, -188, 252, 228, -300, -274, 350, 322, -406, -376, 464, 432, -528, -494, 594, 558, -666, -628, 740, 700, -820, -778, 902, 858, -990, -944, 1080, 1032, -1176, -1126 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For similar sequences that alternate in descending blocks of k natural numbers, we have: a(n) = (-1)^floor(n/k) * Sum_{j=1..k-1} (floor((n-j)/k) - floor((n-j-1)/k)) * (Product_{i=1..j} n-i-j+k+1) + Sum_{j=1..n} (-1)^(floor(j/k)+1) * (floor(j/k) - floor((j-1)/k)) * (Product_{i=1..k} j-i+1). Here, k=2.
The denominators of the generating functions for these sequences are (1 - x)*(1 + x^k)^(k+1). - Georg Fischer and Andrew Howroyd, Mar 07 2020
LINKS
FORMULA
From Colin Barker, Oct 01 2018: (Start)
G.f.: 2*x*(1 + x^2 - 4*x^3) / ((1 - x)*(1 + x^2)^3).
a(n) = a(n-1) - 3*a(n-2) + 3*a(n-3) - 3*a(n-4) + 3*a(n-5) - a(n-6) + a(n-7) for n>7.
(End)
EXAMPLE
a(1) = 2;
a(2) = 2*1 = 2;
a(3) = 2*1 - 4 = -2;
a(4) = 2*1 - 4*3 = -10;
a(5) = 2*1 - 4*3 + 6 = -4;
a(6) = 2*1 - 4*3 + 6*5 = 20;
a(7) = 2*1 - 4*3 + 6*5 - 8 = 12;
a(8) = 2*1 - 4*3 + 6*5 - 8*7 = -36;
a(9) = 2*1 - 4*3 + 6*5 - 8*7 + 10 = -26;
a(10) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 = 54;
a(11) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 - 12 = 42;
a(12) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 - 12*11 = -78;
a(13) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 - 12*11 + 14 = -64;
a(14) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 - 12*11 + 14*13 = 104;
a(15) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 - 12*11 + 14*13 - 16 = 88;
a(16) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 - 12*11 + 14*13 - 16*15 = -136;
a(17) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 - 12*11 + 14*13 - 16*15 + 18 = -118;
a(18) = 2*1 - 4*3 + 6*5 - 8*7 + 10*9 - 12*11 + 14*13 - 16*15 + 18*17 = 170;
etc.
MAPLE
a:=(n, k)->(-1)^(floor(n/k))* add((floor((n-j)/k)-floor((n-j-1)/k))*(mul(n-i-j+k+1, i=1..j)), j=1..k-1) + add( (-1)^(floor(j/k)+1)*(floor(j/k)-floor((j-1)/k))*(mul(j-i+1, i=1..k)), j=1..n): seq(a(n, 2), n=1..50); # Muniru A Asiru, Sep 30 2018
MATHEMATICA
LinearRecurrence[{1, -3, 3, -3, 3, -1, 1}, {2, 2, -2, -10, -4, 20, 12}, 70] (* Harvey P. Dale, Mar 12 2023 *)
PROG
(PARI) Vec(2*x*(1 + x^2 - 4*x^3) / ((1 - x)*(1 + x^2)^3) + O(x^50)) \\ Colin Barker, Oct 01 2018
CROSSREFS
For similar sequences, see: A001057 (k=1), this sequence (k=2), A319886 (k=3), A319887 (k=4), A319888 (k=5), A319889 (k=6), A319890 (k=7), A319891 (k=8), A319892 (k=9), A319893 (k=10).
Sequence in context: A091185 A324956 A268081 * A368958 A125695 A152681
KEYWORD
sign,easy
AUTHOR
Wesley Ivan Hurt, Sep 30 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 13:29 EDT 2024. Contains 371780 sequences. (Running on oeis4.)