function res = cumul(k,t,sp)

l = length(sp);
s = 0;

for m = 1:l
    s = s +sp(m)^k*exp(-i*t*sp(m));
end

res = l^(-1)*s;




end

