This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A319545 #17 Mar 30 2023 17:07:37 %S A319545 1,2,6,24,120,114,78,-216,-2904,-30120,-30109,-29988,-28404,-6096, %T A319545 330240,330224,329968,325344,237216,-1530240,-1530219,-1529778, %U A319545 -1519614,-1275216,4845360,4845334,4844658,4825704,4275336,-12255360,-12255329,-12254368,-12222624 %N A319545 a(n) = 1*2*3*4*5 - 6*7*8*9*10 + 11*12*13*14*15 - ... + (up to n). %C A319545 In general, for alternating sequences that multiply the first k natural numbers, and subtract/add the products of the next k natural numbers (preserving the order of operations up to n), we have a(n) = (-1)^floor(n/k) * Sum_{i=1..k-1} (1-sign((n-i) mod k)) * (Product_{j=1..i} (n-j+1)) + Sum_{i=1..n} (-1)^(floor(i/k)+1) * (1-sign(i mod k)) * (Product_{j=1..k} (i-j+1)). Here k=5. %C A319545 An alternating version of A319206. %H A319545 Harvey P. Dale, <a href="/A319545/b319545.txt">Table of n, a(n) for n = 1..1000</a> %F A319545 a(n) = (-1)^floor(n/5) * Sum_{i=1..4} (1-sign((n-i) mod 5)) * (Product_{j=1..i} (n-j+1)) + Sum_{i=1..n} (-1)^(floor(i/5)+1) * (1-sign(i mod 5)) * (Product_{j=1..5} (i-j+1)). %e A319545 a(1) = 1; %e A319545 a(2) = 1*2 = 2; %e A319545 a(3) = 1*2*3 = 6; %e A319545 a(4) = 1*2*3*4 = 24; %e A319545 a(5) = 1*2*3*4*5 = 120; %e A319545 a(6) = 1*2*3*4*5 - 6 = 114; %e A319545 a(7) = 1*2*3*4*5 - 6*7 = 78; %e A319545 a(8) = 1*2*3*4*5 - 6*7*8 = -216; %e A319545 a(9) = 1*2*3*4*5 - 6*7*8*9 = -2904; %e A319545 a(10) = 1*2*3*4*5 - 6*7*8*9*10 = -30120; %e A319545 a(11) = 1*2*3*4*5 - 6*7*8*9*10 + 11 = -30109; %e A319545 a(12) = 1*2*3*4*5 - 6*7*8*9*10 + 11*12 = -29988; %e A319545 a(13) = 1*2*3*4*5 - 6*7*8*9*10 + 11*12*13 = -28404; %e A319545 a(14) = 1*2*3*4*5 - 6*7*8*9*10 + 11*12*13*14 = -6096; %e A319545 a(15) = 1*2*3*4*5 - 6*7*8*9*10 + 11*12*13*14*15 = 330240; %e A319545 a(16) = 1*2*3*4*5 - 6*7*8*9*10 + 11*12*13*14*15 - 16 = 330224; %e A319545 a(17) = 1*2*3*4*5 - 6*7*8*9*10 + 11*12*13*14*15 - 16*17 = 329968; etc. %t A319545 a[n_]:=(-1)^Floor[n/5]*Sum[(1-Sign[Mod[n-i,5]])*Product[n-j+1,{j,1,i}],{i,1,4}]+Sum[(-1)^(Floor[i/5]+1)*(1-Sign[Mod[i,5]])*Product[i-j+1,{j,1,4}],{i,1,n}]; Array[a, 30] (* _Stefano Spezia_, Sep 23 2018 *) %t A319545 Table[Total[Times@@@Partition[Riffle[Times@@@Partition[Range[n],UpTo[5]],{1,-1},{2,-1,2}],2]],{n,40}] (* _Harvey P. Dale_, Mar 30 2023 *) %Y A319545 For similar sequences, see: A001057 (k=1), A319373 (k=2), A319543 (k=3), A319544 (k=4), this sequence (k=5), A319546 (k=6), A319547 (k=7), A319549 (k=8), A319550 (k=9), A319551 (k=10). %Y A319545 Cf. A319206. %K A319545 sign,easy %O A319545 1,2 %A A319545 _Wesley Ivan Hurt_, Sep 22 2018