Sub topic 14
Sums of the First \(n\) Natural Numbers, Squares and Cubes
Assume you can manipulate algebraic expressions, solve simple equations, and use exponents. These formulas are useful when CAT questions ask for the total of many consecutive values without requiring term-by-term addition.
The three standard formulas
The first \(n\) natural numbers are \(1,2,3,\ldots,n\). Their sum is
\[ 1+2+\cdots+n=\frac{n(n+1)}{2}. \]
The sum of their squares is
\[ 1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}. \]
The sum of their cubes is
\[ 1^3+2^3+\cdots+n^3=\left(\frac{n(n+1)}{2}\right)^2. \]
The cube formula has a useful interpretation: the sum of the first \(n\) cubes equals the square of the sum of the first \(n\) natural numbers.
| Quantity | Formula |
|---|---|
| \(1+2+\cdots+n\) | \(\frac{n(n+1)}{2}\) |
| \(1^2+2^2+\cdots+n^2\) | \(\frac{n(n+1)(2n+1)}{6}\) |
| \(1^3+2^3+\cdots+n^3\) | \(\left(\frac{n(n+1)}{2}\right)^2\) |
Applying the formulas
For \(n=10\),
\[ 1+2+\cdots+10=\frac{10(11)}{2}=55. \]
The sum of the squares is
\[ 1^2+2^2+\cdots+10^2 =\frac{10(11)(21)}{6}=385. \]
The sum of the cubes is
\[ 1^3+2^3+\cdots+10^3 =\left(\frac{10(11)}{2}\right)^2 =55^2=3025. \]
A CAT question may begin at a number other than 1. For example,
\[ 6^2+7^2+\cdots+20^2 \]
can be found by subtracting the first five squares from the first twenty squares:
\[ \sum_{k=6}^{20}k^2 =\frac{20(21)(41)}{6}-\frac{5(6)(11)}{6}. \]
This subtraction method also works for natural numbers and cubes.
n = 10
natural_sum = n * (n + 1) // 2
square_sum = n * (n + 1) * (2 * n + 1) // 6
cube_sum = natural_sum ** 2
print(natural_sum) # 55
print(square_sum) # 385
print(cube_sum) # 3025Recognising the required formula
First identify the power applied to each term. A sum of \(k\) uses the natural-number formula, a sum of \(k^2\) uses the square formula, and a sum of \(k^3\) uses the cube formula.
CAT checks and common errors
- Do not confuse \(\sum k^2\) with \((\sum k)^2\). They are different.
- In the square formula, use \(2n+1\), not \(2n-1\).
- For a range such as \(a\) to \(b\), include \(b-a+1\) terms.
- Cancel factors before multiplying large numbers to reduce arithmetic errors.
Exercise
Find \(6^3+7^3+\cdots+10^3\).
Show answer
Use the cube formula for the first 10 terms and subtract the first 5 terms: \(\left(\frac{10\cdot11}{2}\right)^2-\left(\frac{5\cdot6}{2}\right)^2=3025-225=2800\).