notesonly.in

One notebook for every subject — open it anywhere.

Log in

Sum of Squares and Cubes of Natural Numbers: Formulas &

The sums of squares and cubes of the first n natural numbers have beautifully compact formulas. While 1 + 2 + … + n = n(n + 1)/2 is familiar, its higher-power cousins are just as useful: 1^2 + 2^2 + … + n^2 = n(n + 1)(2n + 1)/6, and 1^3 + 2^3 + … + n^3 = [n(n + 1)/2]^2. That last one says the sum of cubes is exactly the square of the sum of the numbers themselves.

These formulas matter wherever repeated quantities accumulate with growing weights. Stacked cannonballs, nested-loop algorithm analysis, and statistical variance all reduce to sums of powers.

Key Concepts

  • Sum of first n naturals: S_1 = 1 + 2 + … + n = n(n + 1)/2.
  • Sum of squares: S_2 = 1^2 + 2^2 + … + n^2 = n(n + 1)(2n + 1)/6.
  • Sum of cubes: S_3 = 1^3 + 2^3 + … + n^3 = [n(n + 1)/2]^2 = (S_1)^2.
  • Nicomachus's identity: the sum of cubes equals the square of the triangular sum.
  • n is a positive integer: these formulas count whole terms; fractional or zero n has no meaning here.

Formulas

  • Sum of naturals: n(n + 1)/2.
  • Sum of squares: n(n + 1)(2n + 1)/6.
  • Sum of cubes: [n(n + 1)/2]^2.
  • Assumptions: n is a positive whole number; the sums start at 1.

Worked Example

Find the sum of the squares of the first 10 natural numbers: 10 times 11 times 21/6 = 2310/6 = 385. Check: (1 + 4 + 9 + 16 + 25) + (36 + 49 + 64 + 81 + 100) = 55 + 330 = 385. Now the sum of the cubes of the first 10: [10 times 11/2]^2 = 55^2 = 3025. Check: (1 + 8 + 27 + 64 + 125) + (216 + 343 + 512 + 729 + 1000) = 225 + 2800 = 3025. Notice the identity in action: the sum of the first 10 naturals is 55, and 55^2 = 3025 is exactly the sum of their cubes.

Common Misconceptions

  • (1 + 2 + … + n)^2 = 1^2 + 2^2 + … + n^2: false. The square of the sum equals the sum of the CUBES: for n = 3, 36 = 1 + 8 + 27, not 1 + 4 + 9 = 14.
  • Sum of squares = (sum)^2/n: no such shortcut exists. Only the exact formula n(n + 1)(2n + 1)/6 is correct.
  • The formulas work from 0 or for fractions: they count terms 1 through n. Starting at 0 changes nothing (0^2 = 0), but a non-integer n is meaningless here.

Real-World Applications

  • Stacking problems: cannonballs in a square pyramid total 1^2 + 2^2 + … + n^2.
  • Computer science: a loop whose inner iteration runs k^2 times has total cost given by the sum-of-squares formula — the basis of Big-O analysis.
  • Statistics: the sum of squared deviations, the heart of variance and standard deviation, builds on these sums.
  • Physics: discrete sums of quadratic quantities, such as energy levels in simple models, use the squares formula.

The three power sums — n(n + 1)/2, n(n + 1)(2n + 1)/6, and [n(n + 1)/2]^2 — turn long additions of powers into single evaluations. Remember the star identity that the sum of cubes is the square of the sum, never confuse it with the sum of squares, and keep n a positive integer.