Thursday, April 3, 2014

Find the sum given below:

sum%28%282k-10%29%2C+k=7%2C+37%29 
2%2Asum%28k%2C+k=7%2C+37%29-10%2Asum%281%2C+k=7%2C+37%29 
The sums are a little tricky because we are not summing from 1 to n... 
2%2Asum%28k%2C+k=a%2C+b%29=b%2A%28b%2B1%29%2Ba%2A%28a-1%29 
and 

10%2Asum%281%2C+k=a%2C+b%29=10%28b-a%2B1%29 
putting them together... 
%28%2837%29%2837%2B1%29%2B%287-1%29%287%2B1-1%29%29-%2810%2837-7%2B1%29%29 
1364-310%29 

or 1054

No comments: