A190194 a(n) = Sum_{r=0..n-1} Sum_{s=r+1..n} s! * r^(n-s).
0, 1, 4, 20, 116, 776, 5912, 50648, 482552, 5065016, 58099832, 723315128, 9715154552, 140051879096, 2157103991672, 35355232693688, 614453167841912, 11287370521073336, 218535622980161912, 4447889360078673848, 94944254697268017272, 2120984032794061422776, 49489160848954807154552, 1203943675008917425902008, 30486416629523244528307832
Offset: 0
Keywords
References
- D. E. Knuth, The Art of Computer Programming, Vol. 3, Section 5.2.2, p. 129.
Links
- G. C. Greubel, Table of n, a(n) for n = 0..445
Programs
-
Maple
f:=proc(n) local t1,r,s; t1:=add( add(s!*r^(n-s), s=r+1..n), r=0..n-1); end;
-
Mathematica
Join[{0}, Table[Sum[n! + Sum[s!*k^(n - s), {s, k + 1, n - 1}], {k, 0, n - 1}], {n, 1, 50}]] (* G. C. Greubel, Dec 28 2017 *)
-
PARI
for(n=0,30, print1(if(n==0,0, sum(k=0,n-1, n! + sum(s=k+1,n-1, s!*k^(n-s)))), ", ")) \\ G. C. Greubel, Dec 28 2017
Comments