Birgit Anne wrote:sreak1089 wrote:Sum of all even numbers from 1 to 199
== 2 + 4 +6+ 8 + ... + 198 == 2 (1 + 2 + 3 + ... 99) = 2 * (99 * 100) / 2 = 9900
Sum of all odd numbers from 100 to 300
== 101 + 103 + ... + 299
Equally Spaced sets ==> Mean = (101 + 299)/2 = 200
No. of terms = (299 - 101)/2 + 1 = 100
Sum of the series = 200 * 100 = 20000
Can you explain me why you have to add 1 in order to get the no. of terms?
Hi:
It's part of the formula. I think sreak1089's is the easiest way.
This applies for any even or odd number:
No. of terms = (Last-first)/2 +1 .. explanation:
Last and first depend on if we are asked odd or even numbers in a given set ..
Divided by 2 because we take a number every 2 numbers, even if odd or even numbers.
If we were asked multiples of 5, it would be divided by 5, with first and last multiples of 5 within the given range.
Silvia