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
Intuition
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
From the bank · past-year question
[Q17 · CDS (II) 2017 — Elementary Mathematics · 2017]
The last-digit test only rules out, never rules in
Concept 2 of 6
The nearest perfect square above or below
Intuition
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
From the bank · past-year question
[Q20 · CDS (I) 2022 — Elementary Mathematics · 2022]
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
Intuition
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
From the bank · past-year question
[Q90 · CDS (I) 2019 — Elementary Mathematics · 2019]
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
Intuition
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
From the bank · past-year question
[Q96 · CDS (I) 2019 — Elementary Mathematics · 2019]
An odd middle coefficient needs the factor of 4
Concept 5 of 6
Expressions that are always perfect squares
Intuition
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
From the bank · past-year question
[Q79 · CDS (II) 2024 — Elementary Mathematics · 2024]
Pair the OUTER factors, not adjacent ones
Concept 6 of 6
Cubes, fourth powers and taxicab numbers
Intuition
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
From the bank · past-year question
[Q22 · CDS (II) 2016 — Elementary Mathematics · 2016]
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
Drill every past-year question on this subtopic
14 questions from the bank — paginated, with cart and Word-export support.