<p>There are many ways to solve this.</p>
<p>Perhaps the simplest is to look at the question as an arithmetic sequence.
For odd numbers:
(remember an = a1 + (n-1)d)
a1 (first term) = 1
an (last term n) = 99
d (difference) = 2</p>
<p>Solve for n.
99 = 1 + (n-1)2
You get: n (number of terms) = 50</p>
<p>Sum of arithmetic sequence: Sumn = ((a1+an)/2)*n</p>
<p>Plug in: Sum50 = ((1+99)/2)*50
Sum50 = 2500</p>
<p>Same concept for even numbers.</p>
<p>Different method, solving for even numbers this time:
2,4,6....94,96,98,100</p>
<p>You may notice that the sum of numbers at the beginning of the sequence and the end of it, remains unchanged for equally distanced numbers from each side.</p>
<p>So: 102 = 2+100 = 4 + 98 = 6 + 96 ..etc.</p>
<p>You have 50 even numbers, or 25 pairs that each equals 102.
Multiply: 102 * 25 = 2550. and Voila.</p>
<p>Edit: Fixed a careless mistake on the 2nd solution!</p>