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=5.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1) = 5;
a(2) = 5*4 = 20;
a(3) = 5*4*3 = 60;
a(4) = 5*4*3*2 = 120;
a(5) = 5*4*3*2*1 = 120;
a(6) = 5*4*3*2*1 + 10 = 130;
a(7) = 5*4*3*2*1 + 10*9 = 210;
a(8) = 5*4*3*2*1 + 10*9*8 = 840;
a(9) = 5*4*3*2*1 + 10*9*8*7 = 5160;
a(10) = 5*4*3*2*1 + 10*9*8*7*6 = 30360;
a(11) = 5*4*3*2*1 + 10*9*8*7*6 + 15 = 30375;
a(12) = 5*4*3*2*1 + 10*9*8*7*6 + 15*14 = 30570;
a(13) = 5*4*3*2*1 + 10*9*8*7*6 + 15*14*13 = 33090;
a(14) = 5*4*3*2*1 + 10*9*8*7*6 + 15*14*13*12 = 63120;
a(15) = 5*4*3*2*1 + 10*9*8*7*6 + 15*14*13*12*11 = 390720;
a(16) = 5*4*3*2*1 + 10*9*8*7*6 + 15*14*13*12*11 + 20 = 390740;
a(17) = 5*4*3*2*1 + 10*9*8*7*6 + 15*14*13*12*11 + 20*19 = 391100;
a(18) = 5*4*3*2*1 + 10*9*8*7*6 + 15*14*13*12*11 + 20*19*18 = 397560;
a(19) = 5*4*3*2*1 + 10*9*8*7*6 + 15*14*13*12*11 + 20*19*18*17 = 507000;
a(20) = 5*4*3*2*1 + 10*9*8*7*6 + 15*14*13*12*11 + 20*19*18*17*16 = 2251200;
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, 5), n=1..40); # Muniru A Asiru, Sep 30 2018
MATHEMATICA
k:=5; 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 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Sep 29 2018
STATUS
approved