%I #51 Apr 23 2023 13:06:56
%S 1,2,6,10,26,126,133,182,630,640,740,1950,1963,2132,4680,4696,4952,
%T 9576,9595,9956,17556,17578,18062,29700,29725,30350,47250,47278,48062,
%U 71610,71641,72602,104346,104380,105536,147186,147223,148592,202020,202060,203660
%N a(n) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11*12 + 13*14*15 + 16*17*18 + ... + (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=3.
%H Colin Barker, <a href="/A319014/b319014.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_13">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,4,-4,0,-6,6,0,4,-4,0,-1,1).
%F a(n) = Sum_{i=1..floor(n/3)} (3*i)!/(3*i-3)! + Sum_{j=1..2} (1-sign((n-j) mod 3)) * (Product_{i=1..j} n-i+1).
%F From _Colin Barker_, Sep 08 2018: (Start)
%F G.f.: x*(1 + x + 4*x^2 + 12*x^4 + 84*x^5 - 3*x^6 - 9*x^7 + 72*x^8 + 2*x^9 - 4*x^10 + 2*x^11) / ((1 - x)^5*(1 + x + x^2)^4).
%F a(n) = a(n-1) + 4*a(n-3) - 4*a(n-4) - 6*a(n-6) + 6*a(n-7) + 4*a(n-9) - 4*a(n-10) - a(n-12) + a(n-13) for n>13.
%F (End)
%F a(3*k) = 3*k*(k+1)*(3*k-2)*(3*k+1)/4, a(3*k+1) = a(3*k) + 3*k + 1, a(3*k+2) = a(3*k) + (3*k+2)*(3*k+1). - _Giovanni Resta_, Sep 08 2018
%F a(n) = (3*n^4 - 6*n^3 + 9*n^2 + 6*n - 8 - 2*(3*n^3 - 6*n^2 - 6*n + 2)*A061347(n-3) + 6*(n^3 - 6*n^2 + 6*n + 2)*A049347(n-2))/36. - _Stefano Spezia_, Apr 23 2023
%e a(1) = 1;
%e a(2) = 1*2 = 2;
%e a(3) = 1*2*3 = 6;
%e a(4) = 1*2*3 + 4 = 10;
%e a(5) = 1*2*3 + 4*5 = 26;
%e a(6) = 1*2*3 + 4*5*6 = 126;
%e a(7) = 1*2*3 + 4*5*6 + 7 = 133;
%e a(8) = 1*2*3 + 4*5*6 + 7*8 = 182;
%e a(9) = 1*2*3 + 4*5*6 + 7*8*9 = 630;
%e a(10) = 1*2*3 + 4*5*6 + 7*8*9 + 10 = 640;
%e a(11) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11 = 740;
%e a(12) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11*12 = 1950;
%e a(13) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11*12 + 13 = 1963;
%e a(14) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11*12 + 13*14 = 2132;
%e a(15) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11*12 + 13*14*15 = 4680;
%e a(16) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11*12 + 13*14*15 + 16 = 4696;
%e a(17) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11*12 + 13*14*15 + 16*17 = 4952;
%e a(18) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11*12 + 13*14*15 + 16*17*18 = 9576;
%e a(19) = 1*2*3 + 4*5*6 + 7*8*9 + 10*11*12 + 13*14*15 + 16*17*18 + 19 = 9595;
%e etc.
%t CoefficientList[Series[(1 + x + 4*x^2 + 12*x^4 + 84*x^5 - 3*x^6 - 9*x^7 + 72*x^8 + 2*x^9 - 4*x^10 + 2*x^11)/((1 - x)^5*(1 + x + x^2)^4), {x, 0, 50}], x] (* after _Colin Barker_ *)
%o (PARI) Vec(x*(1 + x + 4*x^2 + 12*x^4 + 84*x^5 - 3*x^6 - 9*x^7 + 72*x^8 + 2*x^9 - 4*x^10 + 2*x^11) / ((1 - x)^5*(1 + x + x^2)^4) + O(x^50)) \\ _Colin Barker_, Sep 08 2018
%Y Cf. A093361, (k=1) A000217, (k=2) A228958, (k=3) this sequence, (k=4) A319205, (k=5) A319206, (k=6) A319207, (k=7) A319208, (k=8) A319209, (k=9) A319211, (k=10) A319212.
%Y Cf. A049347, A061347, A268685 (trisection).
%K nonn,easy
%O 1,2
%A _Wesley Ivan Hurt_, Sep 07 2018