Gauss’s Trick
1 min readApr 22, 2020
What’s the sum of numbers 1 to 10? Well erm, it’s 1+2 +3 +4+5+6+7+8+9+10 So 55?
Cool Cool. So what about the sum of numbers 1 to 1*10⁶ then?
This is where Guass’s trick comes into play and it’s as follows:
Guass’s trick = n/2(n + 1)10 / 2 (10 + 1) = 55 1 * 10^6 / 2 (1*10^6 +1) = 5.000005*10^11
So basically it’s a quick way to sum consecutive natural numbers quickly.
See below for workings: