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=5.
EXAMPLE
a(1) = 5;
a(2) = 5*4 = 20;
a(3) = 5*4*3 = 60;
a(4) = 5*4*3*2 = 120;
a(5) = 5*4*3*2*1 = 120;
a(6) = 5*4*3*2*1 - 10 = 110;
a(7) = 5*4*3*2*1 - 10*9 = 30;
a(8) = 5*4*3*2*1 - 10*9*8 = -600;
a(9) = 5*4*3*2*1 - 10*9*8*7 = -4920;
a(10) = 5*4*3*2*1 - 10*9*8*7*6 = -30120;
a(11) = 5*4*3*2*1 - 10*9*8*7*6 + 15 = -30105;
a(12) = 5*4*3*2*1 - 10*9*8*7*6 + 15*14 = -29910;
a(13) = 5*4*3*2*1 - 10*9*8*7*6 + 15*14*13 = -27390;
a(14) = 5*4*3*2*1 - 10*9*8*7*6 + 15*14*13*12 = 2640;
a(15) = 5*4*3*2*1 - 10*9*8*7*6 + 15*14*13*12*11 = 330240;
a(16) = 5*4*3*2*1 - 10*9*8*7*6 + 15*14*13*12*11 - 20 = 330220;
a(17) = 5*4*3*2*1 - 10*9*8*7*6 + 15*14*13*12*11 - 20*19 = 329860;
a(18) = 5*4*3*2*1 - 10*9*8*7*6 + 15*14*13*12*11 - 20*19*18 = 323400;
a(19) = 5*4*3*2*1 - 10*9*8*7*6 + 15*14*13*12*11 - 20*19*18*17 = 213960;
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, 5), n=1..40); # Muniru A Asiru, Sep 30 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Wesley Ivan Hurt, Sep 30 2018
STATUS
approved