fixed minor typos

fixed minor typos like some sums running from i=0 to i=N (in which case there would be N+1 summands), instead of i=1 to i=N.