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 A319549 #15 Oct 05 2024 14:45:21 %S A319549 1,2,6,24,120,720,5040,40320,40311,40230,39330,28440,-114120,-2121840, %T A319549 -32392080,-518878080,-518878063,-518877774,-518872266,-518761800, %U A319549 -516436200,-465156720,716713200,29135312640,29135312615,29135311990,29135295090,29134821240 %N A319549 a(n) = 1*2*3*4*5*6*7*8 - 9*10*11*12*13*14*15*16 + 17*18*19*20*21*22*23*24 - ... + (up to n). %C A319549 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=8. %C A319549 An alternating version of A319209. %F A319549 a(n) = (-1)^floor(n/8) * Sum_{i=1..7} (1-sign((n-i) mod 8)) * (Product_{j=1..i} (n-j+1)) + Sum_{i=1..n} (-1)^(floor(i/8)+1) * (1-sign(i mod 8)) * (Product_{j=1..8} (i-j+1)). %e A319549 a(1) = 1; %e A319549 a(2) = 1*2 = 2; %e A319549 a(3) = 1*2*3 = 6; %e A319549 a(4) = 1*2*3*4 = 24; %e A319549 a(5) = 1*2*3*4*5 = 120; %e A319549 a(6) = 1*2*3*4*5*6 = 720; %e A319549 a(7) = 1*2*3*4*5*6*7 = 5040; %e A319549 a(8) = 1*2*3*4*5*6*7*8 = 40320; %e A319549 a(9) = 1*2*3*4*5*6*7*8 - 9 = 40311; %e A319549 a(10) = 1*2*3*4*5*6*7*8 - 9*10 = 40230; %e A319549 a(11) = 1*2*3*4*5*6*7*8 - 9*10*11 = 39330; %e A319549 a(12) = 1*2*3*4*5*6*7*8 - 9*10*11*12 = 28440; %e A319549 a(13) = 1*2*3*4*5*6*7*8 - 9*10*11*12*13 = -114120; %e A319549 a(14) = 1*2*3*4*5*6*7*8 - 9*10*11*12*13*14 = -2121840; %e A319549 a(15) = 1*2*3*4*5*6*7*8 - 9*10*11*12*13*14*15 = -32392080; %e A319549 a(16) = 1*2*3*4*5*6*7*8 - 9*10*11*12*13*14*15*16 = -518878080; %e A319549 a(17) = 1*2*3*4*5*6*7*8 - 9*10*11*12*13*14*15*16 + 17 = -518878063; etc. %t A319549 a[n_]:=(-1)^Floor[n/8]*Sum[(1-Sign[Mod[n-i,8]])*Product[n-j+1,{j,1,i}],{i,1,7}]+Sum[(-1)^(Floor[i/8]+1)*(1-Sign[Mod[i,8]])*Product[i-j+1,{j,1,7}],{i,1,n}]; Array[a, 30] (* _Stefano Spezia_, Sep 23 2018 *) %t A319549 Table[Total[Times@@@Partition[Riffle[Times@@@Partition[Range[n],UpTo[8]],{1,-1},{1,-1,2}],2]],{n,30}] (* _Harvey P. Dale_, Oct 05 2024 *) %Y A319549 For similar sequences, see: A001057 (k=1), A319373 (k=2), A319543 (k=3), A319544 (k=4), A319545 (k=5), A319546 (k=6), A319547 (k=7), this sequence (k=8), A319550 (k=9), A319551 (k=10). %Y A319549 Cf. A319209. %K A319549 sign,easy %O A319549 1,2 %A A319549 _Wesley Ivan Hurt_, Sep 22 2018