Let's start with something simpler: 1+2+3+4+5
What if we went and paired up 1 with 4, 2 with 3 and 5 with... well let's throw a 0 in for symmetry. So now we have 0+1+2+3+4+5 = (1+4) + (2+3) + (5+0). obviously these three pairs all make 5 + 5 + 5 = 15. So we started with 6 terms (after adding in the zero for convenience) which made three pairs, all evaluating to 5. So the answer, 15 was really 5 * 6/2 (6/2 represents the thee pairs and 5 represents the largest number). Notice the 6 was just 5+1 i.e. the largest number + 1 because we added the 0 in with the rest of the terms. So if we want 0+1+2+3+4...+n we know the answer is n * (n+1)/2 = n(n+1)/2. How cool is that?
BUT, you may be thinking what happens when n is even, as you'll get something like 1+2+3+4+5+6 where if you use the above method you can't pair up the 3 with anything. Alright well we already have an even number of terms (no need to add a zero) so lets do some pairing again with what we have. (1+6) + (2+5) + (3+4) = 7 + 7 + 7 = 21. Interesting results: we had 3 pairs of 7 or 6/2 pairs of (6+1). As here, 6=n, we can generalise to say that even with n being even, n(n+1)/2 still works. The difference is that in the above paragraph the n represented the value of each pair and (n+1)/2 was the number of pairs, whereas here (n+1) represents the value of each pair and n/2 represents the number of pairs. Two different approaches yielding the same result.
So back to the problem of adding 1+2+3...+100, it's just 100(100+1)/2 = 100*101/2 = 5050.
That was easy!
When I was talking to my brother about this he thought of visualising it like a staircase i.e. you start with one dot when n=1 and when n=2 you put a dot beside it and a dot on top of that new one and then you repeat the process like so:
Now if the black part donated 2.5 dots to the grey part it would be exactly half the square and 2.5 = 5/2. Coincidence? I think not! So you can get 5*5/2 to get half the square and then add 5/2 to get the black dots shown there. But with 5*5/2 + 5/2 you can factor out 5/2 to get 5/2(5+1) but 5=n so this is n/2(n+1) or more familiarly n(n+1)/2.
Hopefully this has given you some intuition on why n(n+1)/2 is the formula for adding up to n starting from 1, don't worry it's going to be useful later on I promise.
No comments:
Post a Comment