The sum of the even numbers between 1 and n is 79*80, where n is an odd number. N=?
HI guys I'm looking for a faster way to solve this problem.
I just got the range from 2 to n-1. Obtained the average (n-1+2)2
multiplied it by the number of terms (n-1)/2, and equated it to 79 and 80.
Can anyone suggest a faster way of arriving at the answer? I think the method that I used is time consuming.
I know know whether this is any better, but here it goes:
If n is an odd number (obviously positive) we can write n=2k+1 where k is a positive integer. The greatest even number less than n is 2k.
So the sum of the positive even numbers less than n= 2+4+6+...+2k =2(1+2+3....+k)=2(k+1)k/2 =(k)(k+1)=79(80)
Thus k=79 and n=2(79)+1=159
This took about 1 minute