A Story That Begins With a Bored Schoolboy
When his teacher told the class to add the numbers $1$ to $100$ to keep them busy, eight-year-old Carl Friedrich Gauss had the answer in under a minute.
The sum of natural numbers formula — also called the Gauss sum or the triangular number formula — is:
$$\sum_{k=1}^{n} k = 1 + 2 + 3 + \ldots + n = \frac{n(n+1)}{2}.$$
For $n = 100$, that gives $\frac{100 \cdot 101}{2} = 5050$ — the answer the young Gauss called out before the chalk dust had settled.
The Formula
For any positive integer $n$:
$$\boxed{;S_n = \sum_{k=1}^{n} k = 1 + 2 + 3 + \ldots + n = \frac{n(n+1)}{2};}$$
The companion identities:
$$\sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6} \quad\text{(sum of first $n$ squares)}$$
$$\sum_{k=1}^{n} k^3 = \left(\frac{n(n+1)}{2}\right)^2 \quad\text{(sum of first $n$ cubes — equals the square of the sum of first $n$ integers)}$$
The cube-sum identity is the most elegant: $\sum k^3 = (\sum k)^2$. No other power obeys such a clean relationship.
Quick facts.
Closed form: $S_n = \frac{n(n+1)}{2}$.
Also called: the $n$th triangular number $T_n$.
Grade introduced: CCSS-M HSA-SSE.B.4; NCERT Class 10 Chapter 5 — Arithmetic Progressions.
First few values: $T_1 = 1, T_2 = 3, T_3 = 6, T_4 = 10, T_5 = 15, T_6 = 21, T_7 = 28, T_8 = 36, T_9 = 45, T_{10} = 55$.
Special case of AP sum: $S_n = \frac{n}{2}[2a + (n-1)d]$ with $a = 1, d = 1$.
Two Proofs
Proof 1 — Pairing (Gauss's method).
Write the sum forwards and backwards on two lines:
$$S = 1 + 2 + 3 + \ldots + (n-1) + n$$ $$S = n + (n-1) + (n-2) + \ldots + 2 + 1$$
Add term-by-term. Every column sums to $n + 1$. There are $n$ columns, so:
$$2S = n(n+1).$$
Divide by $2$: $S = \frac{n(n+1)}{2}$.
Proof 2 — Induction.
Base case ($n = 1$): $S_1 = 1 = \frac{1 \cdot 2}{2} = 1$. ✓
Inductive step. Assume $S_n = \frac{n(n+1)}{2}$. Then:
$$S_{n+1} = S_n + (n+1) = \frac{n(n+1)}{2} + (n+1) = \frac{n(n+1) + 2(n+1)}{2} = \frac{(n+1)(n+2)}{2}.$$
This is the formula with $n$ replaced by $n+1$. The pattern propagates. By induction, $S_n = \frac{n(n+1)}{2}$ for all positive integers.
The pairing proof is the one a child can grasp. The induction proof is what an algebraist would write.
Three Worked Examples, From Quick to Stretch
Quick. Find $1 + 2 + 3 + \ldots + 10$.
$$S_{10} = \frac{10 \cdot 11}{2} = 55.$$
Final answer: $55$.
Standard (Wrong-Path-First). Find $50 + 51 + 52 + \ldots + 100$.
Wrong path. A student in our McKinney TX Grade 9 cohort once wrote: "$S_{100} = \frac{100 \cdot 101}{2} = 5050$." That's the sum from $1$ to $100$, not from $50$ to $100$. The student substituted into the formula without checking that the formula assumes the sum starts at 1.
Correct. Use subtraction:
$$\sum_{k=50}^{100} k = \sum_{k=1}^{100} k - \sum_{k=1}^{49} k = \frac{100 \cdot 101}{2} - \frac{49 \cdot 50}{2} = 5050 - 1225 = 3825.$$
Final answer: $50 + 51 + \ldots + 100 = 3825$.
Cross-check using the AP formula directly: $n = 51$ terms, first term $50$, last term $100$, so $S = \frac{51}{2}(50 + 100) = \frac{51 \cdot 150}{2} = 3825$. ✓
Stretch. Find $n$ such that the sum $1 + 2 + 3 + \ldots + n = 210$.
Set $\frac{n(n+1)}{2} = 210$. Then $n^2 + n = 420$, so $n^2 + n - 420 = 0$.
Quadratic formula: $n = \frac{-1 \pm \sqrt{1 + 1680}}{2} = \frac{-1 \pm \sqrt{1681}}{2} = \frac{-1 \pm 41}{2}$.
Positive root: $n = \frac{40}{2} = 20$.
Final answer: $n = 20$. Check: $\frac{20 \cdot 21}{2} = 210$. ✓
Where the Formula Lives — Beyond Counting
The sum-of-naturals formula isn't a one-off classroom trick — it sits at the foundation of several mathematical structures.
Handshakes in a room. The number of distinct handshakes between $n+1$ people is $\binom{n+1}{2} = \frac{n(n+1)}{2}$ — exactly the sum-of-naturals. The two formulas describe the same combinatorial fact.
Algorithm complexity. Bubble sort and insertion sort perform $\frac{n(n-1)}{2}$ comparisons in the worst case — a Gauss-sum cousin one position offset.
Bowling-pin arrangements. A standard 10-pin bowling rack is $T_4 = \frac{4 \cdot 5}{2} = 10$ pins. Snooker triangular racks are $T_5 = 15$ balls. The triangular number is literally the shape it counts.
Stacking — pyramids and balls. The sum of the first $n$ triangular numbers gives the tetrahedral numbers $T_n^{(3)} = \frac{n(n+1)(n+2)}{6}$ — the number of cannonballs you can stack in a triangular pyramid $n$ layers high. The recursion bottoms out in the Gauss sum.
Discrete probability. The expected number of trials to see all faces of an $n$-sided die at least once (the coupon collector problem) is $n \cdot H_n$, where $H_n$ is the $n$th harmonic number. Bounds on this expectation are commonly proven using the Gauss sum as an intermediate step.
The formula is a single rational expression. It threads through combinatorics, computer science, and probability.
Pitfalls to Avoid With the Gauss Sum
1. Forgetting the formula assumes the sum starts at $1$.
Where it slips in: Problems phrased "sum of natural numbers from $50$ to $100$."
Don't do this: Plug $100$ into $\frac{n(n+1)}{2}$ and call that the answer to "sum from $50$ to $100$."
The correct way: For sums that don't start at $1$, compute the cumulative sum and subtract: $\sum_{k=a}^{b} k = \frac{b(b+1)}{2} - \frac{(a-1)a}{2}$. Or use the AP formula $S = \frac{n}{2}(\text{first} + \text{last})$.
2. Mixing $n$ with the count of terms when the sum doesn't start at $1$.
Where it slips in: Same family of problems as Mistake 1.
Don't do this: Take $n$ to be the largest term in a range that doesn't start at $1$.
The correct way: For a sum from $a$ to $b$, the count of terms is $b - a + 1$, not $b$. For $50$ to $100$, the count is $51$, not $100$ or $50$. Roughly five out of every ten Grade 9 students in our McKinney TX cohort make this counting slip on the first attempt — the fix is to write the count out explicitly before plugging in.
3. Using the formula on non-integer "natural numbers."
Where it slips in: Word problems where the variable could be fractional ("sum of values from $1$ to $n$ where $n = 7.5$").
Don't do this: Plug $7.5$ into $\frac{n(n+1)}{2}$.
The correct way: The formula assumes $n$ is a positive integer. If the problem produces a non-integer $n$, the problem statement is asking something else — re-read it. Continuous analogues exist (the integral $\int_0^x t , dt = \frac{x^2}{2}$), but they are not the same as the discrete sum.
4. Mixing the Gauss sum with the sum-of-squares formula — the Apollo Guidance Computer lesson.
Where it slips in: Problems that switch between $\sum k$, $\sum k^2$, $\sum k^3$ in succession.
Don't do this: Apply $\frac{n(n+1)}{2}$ to a sum of squares.
The correct way: $\sum k = \frac{n(n+1)}{2}$. $\sum k^2 = \frac{n(n+1)(2n+1)}{6}$. $\sum k^3 = \left(\frac{n(n+1)}{2}\right)^2$. The Apollo Guidance Computer — the onboard computer that landed Neil Armstrong on the moon — used pre-computed lookup tables for sums of powers to save processor cycles. Mixing the formulas in flight code would have been catastrophic. The principle holds in classroom too: each formula is its own object.
The famous "1202 alarm" during Apollo 11's descent (NASA's own account — Aldrin and Armstrong landed despite repeated computer alarms) was a CPU overload, not a sum-formula error, but the spirit applies: numerical formulas demand the right formula for the right quantity.
A Story About Gauss and the Schoolmaster
In 1786, when Carl Friedrich Gauss (1777–1855, Germany) was eight or nine years old, his arithmetic teacher in Brunswick — a man named Büttner — set the class to add the numbers $1$ to $100$. The exercise was intended to keep the class occupied for an hour while Büttner attended to other matters.
Gauss put his slate on the teacher's desk within minutes. "Ligget se," he said in his local dialect — "There it lies." On the slate was a single number: $5050$.
He had paired $1 + 100 = 101$, $2 + 99 = 101$, $3 + 98 = 101$, and so on — fifty pairs, each summing to $101$. $50 \cdot 101 = 5050$.
Büttner was reportedly stunned. He sent away to Hamburg for the most advanced arithmetic book he could find, gave it to the boy, and Gauss soon outgrew his teacher's ability to teach him. By age 19, Gauss had proven the constructibility of the regular 17-gon — a problem unsolved for $2000$ years. By age 24, he had published Disquisitiones Arithmeticae and become Europe's leading mathematician.
The pairing trick is now the standard derivation of the sum-of-naturals formula taught to every student worldwide. The boy who invented it ended up on the German 10-mark note.
Conclusion
The sum of natural numbers formula for the first $n$ positive integers is $S_n = \frac{n(n+1)}{2}$.
The pairing proof (Gauss's method) is short — write the sum twice, once forwards and once backwards, and add.
The formula assumes the sum starts at $1$; for other ranges, subtract two Gauss sums or use the general AP formula.
The sum of the first $n$ cubes equals the square of the sum: $\sum k^3 = (\sum k)^2$ — a uniquely clean identity.
The most common mistake is forgetting that the formula counts from $1$ — always check the lower bound first.
Quick Self-Check — Try These
Try these before moving on. If you slip on starting-point, come back to Mistake 1.
Find $1 + 2 + 3 + \ldots + 50$.
Find $30 + 31 + 32 + \ldots + 80$.
For what $n$ does $\frac{n(n+1)}{2} = 1275$? (Hint: solve a quadratic.)
Want a live Bhanzu trainer to walk through more sum of natural numbers formula problems with your child? Book a free demo class — online globally.
Was this article helpful?
Your feedback helps us write better content