First let's consider the case of even numbers. Suppose n is even, then it must be double some other number, so we have:
n = 2k
Where k is another natural number. We want to find out what:
1 + 2 + ... + (n - 1) + n
is equal to.
We can write this as :
1 + 2 + ... + (k - 1) + k + (k + 1) + (k + 2) + ... + (n - 1) + n
Now let's rearrange this equation, by pairing the first term with the last, second with the second last and so on. We end up with:
(1 + n) + (2 + (n - 1)) + ... + ((k - 1) + (k + 2)) + (k + (k + 1)) ()
Notice how each pair has the same value, which is (n + 1), and that there are k pairs. So we are adding (n + 1) to itself k times, which means the whole sum is actually :
k(n + 1)
But since n is double k, the sum is also:
1/2(n)(n + 1)
Which is what we were looking for. If n is odd, we have a slight problem, because we can't pair up the numbers like we did at (). We can easily fix this by re-writing the sum like this:
0 + 1 + 2 + ... + (n - 1) + n
And carrying on just as we did earlier.