summation from 1 to n of k factorial