I don’t understand why Greg divided 35+85 by 2.
The first step makes sense as we are dividing by 2 to exclude the even integers and we get 26 odd integers for the given interval.
But while trying to find the sum of intervals, i.e. 35 and 85. I am not sure why its being divided by 2. Since, we have already reduced the count while trying to find the number of odd integers.
We’re first finding the total number of terms b/w 35 to 85 (and including them both in it; hence, the +1
that you see )
Then we are sum of an arithmetic series
formula to get the sum of the odd numbers b/w 35 to 85.
S = \dfrac{n}{2} \times(a+l)
where n
is the number of terms, a
is the first term, and l
is the last term. This formula is used to calculate the sum of the odd numbers.