CDS Mathematics · Number System
Perfect Squares, Cubes & Difference of Squares
Recognising and building perfect squares — which last digits are possible, how far the nearest square is, and above all how to turn a difference of squares into a factor-pair count with a parity constraint.
Why this matters
Fourteen PYQs, and the difference-of-squares factorisation carries four of them on its own. The rest are recall (a square never ends in 2, 3, 7 or 8) or a nearest-square computation. One HARD question needs the completing-the-square trick, which turns an apparently open search into a two-case factor problem.
Concept 1 of 6: The last digit of a perfect square
Definition
A perfect square can end only in or .
- Ending in or is impossible — this is a complete disqualifier.
- The converse fails: ending in 4 does not make a number a square (14 does not).
- A square's number of divisors is odd, and an odd square is .
| Unit digit of n | Unit digit of n squared |
|---|---|
| 0 | 0 |
| 1 or 9 | 1 |
| 2 or 8 | 4 |
| 3 or 7 | 9 |
| 4 or 6 | 6 |
| 5 | 5 So the possible endings are exactly 0, 1, 4, 5, 6, 9 — and 2, 3, 7, 8 never occur. |
Practice this conceptself-check · 4 quick reps
The same idea in a real exam question:
Example 1 · Number System · Perfect Squares, Cubes and Difference of Squares
The last-digit test only rules out, never rules in
Concept 2 of 6: The nearest perfect square above or below
Definition
Given , find the integer with . Then:
- the least amount to subtract to reach a square is ;
- the least amount to add is .
The same method works for higher powers — for a fourth power, bracket between and . Useful landmarks: , , , , .
Distance to the neighbouring squares
Worked example
Practice this conceptself-check · 4 quick reps
The same idea in a real exam question:
Example 2 · Number System · Perfect Squares, Cubes and Difference of Squares
The number itself may not be a square even when it looks round
Concept 3 of 6: Difference of squares and the parity constraint on factor pairs
Definition
Set , so . Write with ; then
- odd: every factor pair is odd-odd, so all pairs work.
- : only the even-even pairs work.
- : no pairs work, so such an is never a difference of squares.
The same setup solves , which rearranges to .
Difference of squares
Worked example
Practice this conceptself-check · 4 quick reps
The same idea in a real exam question:
Example 3 · Number System · Perfect Squares, Cubes and Difference of Squares
Mixed-parity factor pairs must be discarded
A prime target forces a unique pair
Concept 4 of 6: Completing the square to force a factorisation
Definition
To solve :
- complete the square on the left, giving ;
- if is odd, multiply through by 4 first to keep everything integral: ;
- rearrange to and factor as a difference of squares;
- enumerate the same-parity factor pairs of that constant and solve each.
Reduce to a constant difference of squares
Worked example
Practice this conceptself-check · 4 quick reps
The same idea in a real exam question:
Example 4 · Number System · Perfect Squares, Cubes and Difference of Squares
An odd middle coefficient needs the factor of 4
Concept 5 of 6: Expressions that are always perfect squares
Definition
Two identities CDS uses directly:
- Four consecutive integers plus one. Put ; then
- Consecutive pair with their product. If , and , then
Four consecutive integers plus one
Worked example
Practice this conceptself-check · 4 quick reps
The same idea in a real exam question:
Example 5 · Number System · Perfect Squares, Cubes and Difference of Squares
Pair the OUTER factors, not adjacent ones
Concept 6 of 6: Cubes, fourth powers and taxicab numbers
Definition
Cubes worth knowing on sight: , , , , , , , , , .
- To solve , factorise into a single prime power; gives .
- — two ways, and the only number below 2000 with that property.
- For a mixed condition (a cube now, a square later) the small cases are few enough to list.
Taxicab identity
Worked example
Practice this conceptself-check · 4 quick reps
The same idea in a real exam question:
Example 6 · Number System · Perfect Squares, Cubes and Difference of Squares
m to the n has a trivial solution that the question does not intend
Summary — formulas & gotchas at a glance
A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.
Formulas (5)
- The nearest perfect square above or below
Distance to the neighbouring squares
- Difference of squares and the parity constraint on factor pairs
Difference of squares
- Completing the square to force a factorisation
Reduce to a constant difference of squares
- Expressions that are always perfect squares
Four consecutive integers plus one
- Cubes, fourth powers and taxicab numbers
Taxicab identity
Reference tables (1)
The last digit of a perfect square6 rows
| Unit digit of n | Unit digit of n squared |
|---|---|
| 0 | 0 |
| 1 or 9 | 1 |
| 2 or 8 | 4 |
| 3 or 7 | 9 |
| 4 or 6 | 6 |
| 5 | 5 So the possible endings are exactly 0, 1, 4, 5, 6, 9 — and 2, 3, 7, 8 never occur. |
Watch out for (7)
- The last-digit test only rules out, never rules in→ The last digit of a perfect square
- The number itself may not be a square even when it looks round→ The nearest perfect square above or below
- Mixed-parity factor pairs must be discarded→ Difference of squares and the parity constraint on factor pairs
- A prime target forces a unique pair→ Difference of squares and the parity constraint on factor pairs
- An odd middle coefficient needs the factor of 4→ Completing the square to force a factorisation
- Pair the OUTER factors, not adjacent ones→ Expressions that are always perfect squares
- m to the n has a trivial solution that the question does not intend→ Cubes, fourth powers and taxicab numbers
Test yourself on Number System
20 past CDS questions from this chapter, timed at 24 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.