login
A319868
a(n) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 + 16*15*14*13 + ... + (up to the n-th term).
9
4, 12, 24, 24, 32, 80, 360, 1704, 1716, 1836, 3024, 13584, 13600, 13824, 16944, 57264, 57284, 57644, 64104, 173544, 173568, 174096, 185688, 428568, 428596, 429324, 448224, 919968, 920000, 920960, 949728, 1783008, 1783044, 1784268, 1825848, 3196728, 3196768
OFFSET
1,1
COMMENTS
For similar multiply/add sequences in descending blocks of k natural numbers, we have: a(n) = 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} (floor(j/k)-floor((j-1)/k)) * (Product_{i=1..k} j-i+1). Here, k=4.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,5,-5,0,0,-10,10,0,0,10,-10,0,0,-5,5,0,0,1,-1).
FORMULA
From Colin Barker, Oct 19 2018: (Start)
G.f.: 4*x*(1 + 2*x + 3*x^2 - 3*x^4 + 2*x^5 + 55*x^6 + 336*x^7 + 3*x^8 - 10*x^9 - 23*x^10 + 960*x^11 - x^12 + 6*x^13 - 35*x^14 + 240*x^15) / ((1 - x)^6*(1 + x)^5*(1 + x^2)^5).
a(n) = a(n-1) + 5*a(n-4) - 5*a(n-5) - 10*a(n-8) + 10*a(n-9) + 10*a(n-12) - 10*a(n-13) - 5*a(n-16) + 5*a(n-17) + a(n-20) - a(n-21) for n>21.
(End)
EXAMPLE
a(1) = 4;
a(2) = 4*3 = 12;
a(3) = 4*3*2 = 24;
a(4) = 4*3*2*1 = 24;
a(5) = 4*3*2*1 + 8 = 32;
a(6) = 4*3*2*1 + 8*7 = 80;
a(7) = 4*3*2*1 + 8*7*6 = 360;
a(8) = 4*3*2*1 + 8*7*6*5 = 1704;
a(9) = 4*3*2*1 + 8*7*6*5 + 12 = 1716;
a(10) = 4*3*2*1 + 8*7*6*5 + 12*11 = 1836;
a(11) = 4*3*2*1 + 8*7*6*5 + 12*11*10 = 3024;
a(12) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 = 13584;
a(13) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 + 16 = 13600;
a(14) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 + 16*15 = 13824;
a(15) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 + 16*15*14 = 16944;
a(16) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 + 16*15*14*13 = 57264;
a(17) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 + 16*15*14*13 + 20 = 57284;
a(18) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 + 16*15*14*13 + 20*19 = 57644;
a(19) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 + 16*15*14*13 + 20*19*18 = 64104;
a(20) = 4*3*2*1 + 8*7*6*5 + 12*11*10*9 + 16*15*14*13 + 20*19*18*17 = 173544;
etc.
MAPLE
a:=(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((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
MATHEMATICA
k:=4; a[n_]:=Sum[(Floor[(n-j)/k]-Floor[(n-j-1)/k])*Product[n-i-j+k+1, {i, 1, j }], {j, 1, k-1} ] + Sum[(Floor[j/k]-Floor[(j-1)/k])*Product[j-i+1, {i, 1, k}], {j, 1, n}]; Array[a, 50] (* Stefano Spezia, Sep 30 2018 *)
LinearRecurrence[{1, 0, 0, 5, -5, 0, 0, -10, 10, 0, 0, 10, -10, 0, 0, -5, 5, 0, 0, 1, -1}, {4, 12, 24, 24, 32, 80, 360, 1704, 1716, 1836, 3024, 13584, 13600, 13824, 16944, 57264, 57284, 57644, 64104, 173544, 173568}, 60] (* Harvey P. Dale, Jan 29 2020 *)
PROG
(PARI) Vec(4*x*(1 + 2*x + 3*x^2 - 3*x^4 + 2*x^5 + 55*x^6 + 336*x^7 + 3*x^8 - 10*x^9 - 23*x^10 + 960*x^11 - x^12 + 6*x^13 - 35*x^14 + 240*x^15) / ((1 - x)^6*(1 + x)^5*(1 + x^2)^5) + O(x^40)) \\ Colin Barker, Oct 19 2018
CROSSREFS
For similar sequences, see: A000217 (k=1), A319866 (k=2), A319867 (k=3), this sequence (k=4), A319869 (k=5), A319870 (k=6), A319871 (k=7), A319872 (k=8), A319873 (k=9), A319874 (k=10).
Sequence in context: A156678 A277513 A319887 * A274187 A353991 A286040
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Sep 29 2018
STATUS
approved