summation from 1 to n of c^k