In short
Beyond the sum of the first n natural numbers (\frac{n(n+1)}{2}), there are closed-form formulas for sums of higher powers:
The sum of cubes is always the square of the sum of the first n natural numbers — a surprising and beautiful identity. The method of differences provides a systematic way to derive all these formulas.
Stack 10 cannonballs in a square pyramid. The bottom layer is a 4 \times 4 square (16 balls), the next is 3 \times 3 (9 balls), then 2 \times 2 (4 balls), and a single ball on top. The total is 1 + 4 + 9 + 16 = 1^2 + 2^2 + 3^2 + 4^2 = 30 cannonballs. An ammunition depot stores these pyramids, and the quartermaster needs to know how many cannonballs sit in a pyramid with n layers without counting them one by one.
The sum 1^2 + 2^2 + 3^2 + \dots + n^2 is a special series — a summation where the terms follow a power pattern rather than an arithmetic or geometric one. You already know the formula for \sum k = \frac{n(n+1)}{2} from arithmetic progressions. This article derives the formulas for \sum k^2 and \sum k^3, introduces the method of differences that produces all such formulas, and reveals a striking connection: the sum of cubes is always a perfect square.
Sum of squares: \sum_{k=1}^{n} k^2
Derivation by the method of differences
The method of differences uses a telescoping identity. Consider the cube (k+1)^3 - k^3. Expand:
Now sum both sides from k = 1 to k = n:
The left side telescopes — most terms cancel:
The right side separates:
Setting the two sides equal:
Expand (n+1)^3 - 1 = n^3 + 3n^2 + 3n + 1 - 1 = n^3 + 3n^2 + 3n. So:
Isolate \sum k^2:
Divide by 3:
You can also verify this formula by mathematical induction. The base case n = 1 gives \frac{1 \cdot 2 \cdot 3}{6} = 1, matching 1^2 = 1. For the inductive step, assume the formula holds for k and add (k+1)^2:
That is the formula with n = k + 1.
Sum of cubes: \sum_{k=1}^{n} k^3
Derivation by the method of differences
Use the same telescoping approach, but start one power higher. Consider (k+1)^4 - k^4:
Sum from k = 1 to n. The left side telescopes to (n+1)^4 - 1:
You already know \sum k = \frac{n(n+1)}{2} and \sum k^2 = \frac{n(n+1)(2n+1)}{6}. Expand (n+1)^4 - 1 = n^4 + 4n^3 + 6n^2 + 4n. Substitute:
Expand the right side (excluding 4\sum k^3):
So:
Divide by 4:
This is a remarkable result: the sum of the first n cubes equals the square of the sum of the first n natural numbers. In other words:
Check a few values: for n = 3, 1^3 + 2^3 + 3^3 = 1 + 8 + 27 = 36 = 6^2 = (1+2+3)^2. For n = 5, 1^3 + 2^3 + 3^3 + 4^3 + 5^3 = 225 = 15^2 = (1+2+3+4+5)^2. The identity holds every time.
The method of differences — the general machine
The derivations above used the same strategy: take a power (k+1)^{p+1} - k^{p+1}, expand, sum, and telescope. This is the method of differences, and it works for any power.
The recipe for \sum k^p:
- Expand (k+1)^{p+1} - k^{p+1} using the binomial theorem.
- Sum from k = 1 to n; the left side telescopes to (n+1)^{p+1} - 1.
- The right side involves \sum k^p, \sum k^{p-1}, ..., \sum k, \sum 1 — all of which are known from earlier steps.
- Isolate \sum k^p.
Each formula builds on the ones before it. The sum of first powers gives you the sum of squares, which gives you the sum of cubes, which gives you the sum of fourth powers, and so on. The pattern extends indefinitely, though the formulas grow longer with each step.
Sum of fourth powers (a taste)
Telescope (k+1)^5 - k^5 = 5k^4 + 10k^3 + 10k^2 + 5k + 1. Sum from 1 to n:
Using the known formulas and solving for \sum k^4:
The formulas get more complex, but the method stays the same.
Worked examples
Example 1: Find the value of $1^2 + 2^2 + 3^2 + \dots + 20^2$
Step 1. Identify the formula.
This is \sum_{k=1}^{20} k^2, so use the sum-of-squares formula with n = 20.
Why: direct recognition — the terms are consecutive perfect squares starting from 1.
Step 2. Plug into the formula.
Why: n = 20, n + 1 = 21, 2n + 1 = 41.
Step 3. Compute.
Why: 20 \times 21 = 420, 420 \times 41 = 17220, 17220 \div 6 = 2870.
Step 4. Quick check with a smaller case.
For n = 5: \frac{5 \times 6 \times 11}{6} = 55. And 1 + 4 + 9 + 16 + 25 = 55. The formula checks out.
Why: verifying the formula on a case small enough to compute by hand catches any formula-recall errors.
Result: 1^2 + 2^2 + 3^2 + \dots + 20^2 = 2870.
The bar chart shows why the sum grows so fast: the later terms are much larger than the earlier ones. The 20-th term (400) is 400 times the first term (1), and it alone accounts for about 14\% of the total.
Example 2: Show that $1^3 + 2^3 + 3^3 + \dots + 10^3 = (1 + 2 + 3 + \dots + 10)^2$, and find the value.
Step 1. Compute the sum of the first 10 natural numbers.
Why: this is the base quantity whose square should equal the sum of cubes.
Step 2. Compute the sum of cubes using the formula.
Why: the sum-of-cubes formula says \sum k^3 = (\sum k)^2, so you just square the sum of natural numbers.
Step 3. Verify by partial computation.
1^3 + 2^3 + 3^3 + 4^3 + 5^3 = 1 + 8 + 27 + 64 + 125 = 225 = 15^2 = (1+2+3+4+5)^2. The pattern holds for n = 5, building confidence for n = 10.
Why: checking an intermediate case is faster than computing all 10 cubes and still validates the formula.
Step 4. State the result.
1^3 + 2^3 + \dots + 10^3 = 3025 = 55^2 = (1 + 2 + \dots + 10)^2. The identity is confirmed.
Why: the final statement exhibits both the numerical value and the structural identity.
Result: 1^3 + 2^3 + 3^3 + \dots + 10^3 = 3025 = 55^2.
The identity \sum k^3 = (\sum k)^2 is one of those results that feels almost too clean to be true. The sum of cubes, a complicated-sounding quantity, collapses into the square of a simple sum. The method-of-differences derivation shows exactly why.
Common confusions
-
"The sum of cubes formula is \frac{n^2(n+1)^2}{6}." The denominator is 4, not 6. The 6 belongs to the sum of squares. Mixing up the denominators is the most common error. To remember: sum of squares has three factors in the numerator divided by 6; sum of cubes has two squared factors divided by 4.
-
"\sum k^2 = (\sum k)^2." No. The sum of cubes equals the square of the sum. The sum of squares does not have such a neat relationship — \frac{n(n+1)(2n+1)}{6} is not a perfect square in general. For n = 3: \sum k^2 = 14 but (\sum k)^2 = 36.
-
"The method of differences requires induction." The telescoping derivation is a direct computation — it does not assume the formula and prove it by induction. Induction is an alternative verification method, not a prerequisite for the method of differences. However, both approaches are valid and are often used side by side: derive by differences, verify by induction.
-
"The formula for \sum k^p is always a polynomial of degree p in n." Close: it is a polynomial of degree p + 1. The sum of the first n natural numbers (degree 1 terms) gives a degree-2 polynomial; the sum of squares (degree 2 terms) gives a degree-3 polynomial; the sum of cubes gives a degree-4 polynomial. The degree goes up by one because summing is analogous to integration, which raises the degree by one.
-
"These formulas only work for sums starting at k = 1." The formulas are for \sum_{k=1}^{n}. If you need \sum_{k=m}^{n} k^2 for some m > 1, compute \sum_{k=1}^{n} k^2 - \sum_{k=1}^{m-1} k^2. The formulas handle the pieces; subtraction handles the range.
Going deeper
If you came here to learn the formulas for \sum k^2 and \sum k^3, see their derivations, and use the method of differences, you have everything you need. The rest of this section is for readers who want to see the broader pattern and a visual proof of the sum-of-cubes identity.
A visual proof that \sum k^3 = (\sum k)^2
There is a beautiful geometric proof. Arrange n^2 unit squares into an n-wide L-shaped border (called a gnomon) around the previous square. The k-th gnomon has 2k - 1 unit squares arranged in an L-shape around a (k-1) \times (k-1) square. But if each unit square in the k-th gnomon is replaced by a k \times k square, the gnomon's area becomes k^2 \times (2k - 1) = 2k^3 - k^2.
A more direct approach: tile a square of side 1 + 2 + 3 + \dots + n = T_n as follows. Place a 1 \times 1 square in one corner. Around it, place an L-shaped gnomon of width 2 (area 2 \cdot 1 \cdot 2 + 2^2 = 8 = 2^3). Around that, an L-shaped gnomon of width 3 (area 3^3). Each k-th gnomon has area k^3, and they fit together to fill the T_n \times T_n square exactly. So \sum k^3 = T_n^2. This tiling proof, attributed to various mathematicians across centuries, is one of the most elegant "proofs without words" in mathematics.
Faulhaber's formulas
The method of differences produces a formula for \sum k^p for every positive integer p. These are called Faulhaber's formulas (after a 17th-century mathematician who computed them up to p = 17). A remarkable pattern: when p is odd, \sum k^p can always be expressed as a polynomial in T_n = \frac{n(n+1)}{2}. For p = 1: \sum k = T_n. For p = 3: \sum k^3 = T_n^2. For p = 5: \sum k^5 = \frac{T_n^2(4T_n - 1)}{3}.
The deeper reason these formulas exist connects to Bernoulli numbers, a sequence of rational numbers that appear throughout number theory and analysis. The general formula involves Bernoulli numbers in its coefficients, but working out the details requires tools from combinatorics and generating functions that go beyond the scope of this article.
Connection to integration
Just as \sum k \approx \int_0^n x \, dx = \frac{n^2}{2}, you get:
The leading terms of the exact formulas are \frac{n^3}{3} (for \sum k^2) and \frac{n^4}{4} (for \sum k^3), matching the integrals. The remaining lower-order terms are correction factors that account for the discrete "staircase" nature of summation versus the smooth nature of integration. This connection is the starting point for the Euler-Maclaurin summation formula, which makes the relationship between sums and integrals precise.
Where this leads next
- Sum of Arithmetic Progression — the formula \sum k = \frac{n(n+1)}{2} is the foundation that the sum-of-squares and sum-of-cubes derivations build on.
- Mathematical Induction — all three formulas (\sum k, \sum k^2, \sum k^3) are classic induction exercises, and induction provides an alternative verification path.
- Algebraic Identities — the binomial expansion (k+1)^p - k^p drives the method of differences, and identities like (a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3 appear directly in the derivations.
- Sigma and Pi Notation — the concise notation \sum_{k=1}^{n} k^p is the language in which these formulas are naturally stated.
- Polynomials Introduction — the closed forms \frac{n(n+1)(2n+1)}{6} and \frac{n^2(n+1)^2}{4} are polynomials in n, and their degrees and roots connect to the theory of polynomials.