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=7.
EXAMPLE
a(1) = 7;
a(2) = 7*6 = 42;
a(3) = 7*6*5 = 210;
a(4) = 7*6*5*4 = 840;
a(5) = 7*6*5*4*3 = 2520;
a(6) = 7*6*5*4*3*2 = 5040;
a(7) = 7*6*5*4*3*2*1 = 5040;
a(8) = 7*6*5*4*3*2*1 - 14 = 5026;
a(9) = 7*6*5*4*3*2*1 - 14*13 = 4858;
a(10) = 7*6*5*4*3*2*1 - 14*13*12 = 2856;
a(11) = 7*6*5*4*3*2*1 - 14*13*12*11 = -18984;
a(12) = 7*6*5*4*3*2*1 - 14*13*12*11*10 = -235200;
a(13) = 7*6*5*4*3*2*1 - 14*13*12*11*10*9 = -2157120;
a(14) = 7*6*5*4*3*2*1 - 14*13*12*11*10*9*8 = -17292240;
a(15) = 7*6*5*4*3*2*1 - 14*13*12*11*10*9*8 + 21 = -17292219;
a(16) = 7*6*5*4*3*2*1 - 14*13*12*11*10*9*8 + 21*20 = -17291820;
a(17) = 7*6*5*4*3*2*1 - 14*13*12*11*10*9*8 + 21*20*19 = -17284260;
a(18) = 7*6*5*4*3*2*1 - 14*13*12*11*10*9*8 + 21*20*19*18 = -17148600;
a(19) = 7*6*5*4*3*2*1 - 14*13*12*11*10*9*8 + 21*20*19*18*17 = -14850360;
a(20) = 7*6*5*4*3*2*1 - 14*13*12*11*10*9*8 + 21*20*19*18*17*16 = 21777840;
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, 7), n=1..35); # Muniru A Asiru, Sep 30 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Wesley Ivan Hurt, Sep 30 2018
STATUS
approved