print ((n-1)*n)/2
(fold the sequence in half, which gives you 100 + 1 on one end and 50 + 51 on the other.)
I took the 'n' to be the 100, not the 101. A little too quick on the submit there, I should have run it :)
But anyway, that seems to be a damn sight faster than to run a loop to add a bunch of numbers in a fixed interval.
Especially for large 'n'.