This is approximately grade 10 math.
The simple solution is..
(1+ 2+ 3 +4 +5+...+100)+
(100+99 +98+.... +1)=
101+101+.... +101= 100*101=10100
But we counted each number twice so divide by 2.
10100/2=5050
Similiarly 1+2+...+n=n*(n+1)/2
(m+1)+(m+2)+...+n= n*(n+1)/2 - m*(m+1)/2
The story is that Guass (Arguably the greatest mathematician ever) was asked this by his teacher when he was about 7 (with a goal of keeping him and the rest of his class quite for the day). He wrote down the answer to the teachers annoyance and amazement.
Originally posted by VirakCorrect apart from the slight mistake in the second part. You added from (m+1) to n, should be m to n:
This is approximately grade 10 math.
The simple solution is..
(1+ 2+ 3 +4 +5+...+100)+
(100+99 +98+.... +1)=
101+101+.... +101= 100*101=10100
But we counted each number twice so divide by 2.
10100/2=5050
Similiarly 1+2+...+n=n*(n+1)/2
(m+1)+(m+2)+...+n= n*(n+1)/2 - m*(m+1)/2
The story is that Guass (Arguably the ...[text shortened]... his class quite for the day). He wrote down the answer to the teachers annoyance and amazement.
m+(m+1)+(m+2)+...+n = (n*(n+1)/2) - (m*(m+1)/2) + m
Which could be simplified to:
http://www.lunacy.force9.co.uk/images/gauss.jpg