Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Oct 05 2018 08:06:01
%S 4,12,24,24,16,-32,-312,-1656,-1644,-1524,-336,10224,10208,9984,6864,
%T -33456,-33436,-33076,-26616,82824,82800,82272,70680,-172200,-172172,
%U -171444,-152544,319200,319168,318208,289440,-543840,-543804,-542580,-501000,869880
%N a(n) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 + ... - (up to the n-th term).
%C 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.
%e a(1) = 4;
%e a(2) = 4*3 = 12;
%e a(3) = 4*3*2 = 24;
%e a(4) = 4*3*2*1 = 24;
%e a(5) = 4*3*2*1 - 8 = 16;
%e a(6) = 4*3*2*1 - 8*7 = -32;
%e a(7) = 4*3*2*1 - 8*7*6 = -312;
%e a(8) = 4*3*2*1 - 8*7*6*5 = -1656;
%e a(9) = 4*3*2*1 - 8*7*6*5 + 12 = -1644;
%e a(10) = 4*3*2*1 - 8*7*6*5 + 12*11 = -1524;
%e a(11) = 4*3*2*1 - 8*7*6*5 + 12*11*10 = -336;
%e a(12) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 = 10224;
%e a(13) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16 = 10208;
%e a(14) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15 = 9984;
%e a(15) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14 = 6864;
%e a(16) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 = -33456;
%e a(17) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 + 20 = -33436;
%e a(18) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 + 20*19 = -33076;
%e a(19) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 + 20*19*18 = -26616;
%e a(20) = 4*3*2*1 - 8*7*6*5 + 12*11*10*9 - 16*15*14*13 + 20*19*18*17 = 82824;
%e etc.
%p 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
%Y For similar sequences, see: A001057 (k=1), A319885 (k=2), A319886 (k=3), this sequence (k=4), A319888 (k=5), A319889 (k=6), A319890 (k=7), A319891 (k=8), A319892 (k=9), A319893 (k=10).
%K sign,easy
%O 1,1
%A _Wesley Ivan Hurt_, Sep 30 2018