%I #34 Dec 04 2024 12:19:18
%S 1,2,6,24,120,720,5040,40320,362880,362890,362990,364200,380040,
%T 603120,3966480,58020480,980542080,17643588480,17643588499,
%U 17643588860,17643596460,17643764040,17647626360,17740497600,20066316480,80634516480,1718398644480
%N 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*25*26*27 + ... + (up to n).
%C In general, for sequences that multiply the first k natural numbers, and then add the product of the next k natural numbers (preserving the order of operations up to n), we have a(n) = Sum_{i=1..floor(n/k)} (k*i)!/(k*i-k)! + Sum_{j=1..k-1} (1-sign((n-j) mod k)) * (Product_{i=1..j} n-i+1). Here, k=9.
%H Colin Barker, <a href="/A319211/b319211.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = Sum_{i=1..floor(n/9)} (9*i)!/(9*i-9)! + Sum_{j=1..8} (1-sign((n-j) mod 9)) * (Product_{i=1..j} n-i+1).
%e a(1) = 1;
%e a(2) = 1*2 = 2;
%e a(3) = 1*2*3 = 6;
%e a(4) = 1*2*3*4 = 24;
%e a(5) = 1*2*3*4*5 = 120;
%e a(6) = 1*2*3*4*5*6 = 720;
%e a(7) = 1*2*3*4*5*6*7 = 5040;
%e a(8) = 1*2*3*4*5*6*7*8 = 40320;
%e a(9) = 1*2*3*4*5*6*7*8*9 = 362880;
%e a(10) = 1*2*3*4*5*6*7*8*9 + 10 = 362890;
%e a(11) = 1*2*3*4*5*6*7*8*9 + 10*11 = 362990;
%e a(12) = 1*2*3*4*5*6*7*8*9 + 10*11*12 = 364200;
%e a(13) = 1*2*3*4*5*6*7*8*9 + 10*11*12*13 = 380040;
%e a(14) = 1*2*3*4*5*6*7*8*9 + 10*11*12*13*14 = 603120;
%e a(15) = 1*2*3*4*5*6*7*8*9 + 10*11*12*13*14*15 = 3966480;
%e a(16) = 1*2*3*4*5*6*7*8*9 + 10*11*12*13*14*15*16 = 58020480;
%e a(17) = 1*2*3*4*5*6*7*8*9 + 10*11*12*13*14*15*16*17 = 980542080;
%e a(18) = 1*2*3*4*5*6*7*8*9 + 10*11*12*13*14*15*16*17*18 = 17643588480;
%e a(19) = 1*2*3*4*5*6*7*8*9 + 10*11*12*13*14*15*16*17*18 + 19 = 17643588499; etc.
%t a[n_]:=Sum[(9*i)!/(9*i-9)!, {i, 1, Floor[n/9] }] + Sum[(1-Sign[Mod[n-j, 9]])*Product[n-i+1, {i, 1, j}], {j, 1, 8}] ; Array[a, 27] (* _Stefano Spezia_, Apr 18 2023 *)
%t Table[Total[Times@@@Partition[Range[n],UpTo[9]]],{n,30}] (* _Harvey P. Dale_, Dec 04 2024 *)
%Y Cf. A093361, (k=1) A000217, (k=2) A228958, (k=3) A319014, (k=4) A319205, (k=5) A319206, (k=6) A319207, (k=7) A319208, (k=8) A319209, (k=9) this sequence, (k=10) A319212.
%K nonn,easy
%O 1,2
%A _Wesley Ivan Hurt_, Sep 13 2018