|
Sum of even numbers:-
Got this question from a compilation.
Q. The sum of the even numbers between 1 and n is 79*80, where n is an odd number, then n=?
My approach has been:-
The set of numbers give is (1,2,3,4,5,6,....n-1,n)
So the num of even numbers in that set is
sum = 2 + 4 + 6 + 8 ...(n-1)
=2*(1+2+3+4...+(n-1)/2)
=2*(((n-1)/2)*((n-1)/2)+1))/2 (sum of ni consecutive numbers)
= ((n-1)*(n+1))/4 = 79*80
Solving gives n = 159.
But the answer given is 79. Can somebody confirm my answer?
|