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=4.
EXAMPLE
a(1) = 4;
a(2) = 4*3 = 12;
a(3) = 4*3*2 = 24;
a(4) = 4*3*2*1 = 24;
a(5) = 4*3*2*1 - 8 = 16;
a(6) = 4*3*2*1 - 8*7 = -32;
a(7) = 4*3*2*1 - 8*7*6 = -312;
a(8) = 4*3*2*1 - 8*7*6*5 = -1656;
a(9) = 4*3*2*1 - 8*7*6*5 + 12 = -1644;
a(10) = 4*3*2*1 - 8*7*6*5 + 12*11 = -1524;
a(11) = 4*3*2*1 - 8*7*6*5 + 12*11*10 = -336;
a(12) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 = 10224;
a(13) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16 = 10208;
a(14) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15 = 9984;
a(15) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14 = 6864;
a(16) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 = -33456;
a(17) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 + 20 = -33436;
a(18) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 + 20*19 = -33076;
a(19) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 + 20*19*18 = -26616;
a(20) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 + 20*19*18*17 = 82824;
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, 4), n=1..40); # Muniru A Asiru, Sep 30 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Wesley Ivan Hurt, Sep 30 2018
STATUS
approved