Exercises — HCF (GCD) — prime factorization method, Euclidean algorithm
Two reminders you will reuse constantly, in plain words. First we fix the vocabulary and notation, then two pictures show the whole page in miniature.
Figure 1 — the prime-brick view of HCF. Each column is a stack of one prime's copies; two adjacent columns compare how many copies of that prime live in versus . The HCF keeps, for each shared prime, only the shorter stack (the min); primes present in just one number are dropped. This is "take the smaller count" made visible.

Figure 2 — the Euclidean view. The starting rectangle is . We carve out the biggest square we can (), and whatever strip is left over is the remainder . Repeating on the leftover strip shrinks the rectangle until a square tiles it perfectly — that final square's side is the HCF. The picture literally shows why replacing by keeps the same answer: any square tiling the whole rectangle must also tile every leftover piece.

Level 1 — Recognition
L1.1
State whether each is TRUE or FALSE, and say why in one line. (a) . (b) . (c) for every . (d) can be larger than .
Recall Solution L1.1
(a) TRUE. "" reads " divides ", meaning with a whole number. Here , remainder . ✅ (b) FALSE. , remainder , so does not divide (). (c) FALSE. The convention is , not . Every number divides (since ), so the biggest divisor of still wins. Hence . (d) FALSE. A common divisor must divide both numbers, so it cannot exceed the smaller one. Therefore always.
L1.2
For and , WITHOUT computing the numbers, write as a product of prime powers.
Recall Solution L1.2
Line the primes up and take the minimum exponent for each (missing prime = exponent ):
- prime :
- prime :
- prime : → dropped
- prime : → dropped
(Check: , ; . ✅)
L1.3
What is ?
Recall Solution L1.3
Careful edge case. The convention was stated for . For there is no largest common divisor, because every positive integer divides — there is no biggest one to pick. By universal convention we therefore define . (Reason: is the number that every integer divides, so is the natural "top" element under the divisibility order — it is the greatest common divisor in that ordering sense.)
Level 2 — Application
L2.1
Find by prime factorization.
Recall Solution L2.1
Factor : . Factor : . Take min exponents:
- , → both dropped
L2.2
Find by the Euclidean algorithm. Show the steps.
Recall Solution L2.2
Each step is "" — fit whole copies of the smaller into the bigger , keep the leftover , then slide . (Recall = quotient, = remainder; each slide is valid by Euclid's invariant from the formula box above.)
- Step 1: → new pair .
- Step 2: → new pair .
- Step 3: → new pair .
- Step 4: → new pair .
- Step 5: → remainder is , stop.
Remainder hit at Step 5; the last non-zero remainder is , so .
L2.3
Find and .
Recall Solution L2.3
: order doesn't matter, and gives . : the biggest number dividing is itself, and it also divides the other .
Level 3 — Analysis
L3.1
Using the identity , find from L2.1.
Recall Solution L3.1
From L2.1, . Rearrange the identity (justified in the formula box at the top of this page): Sanity check by max exponents (LCM — Least Common Multiple): , , so . ✅
L3.2
Explain (with a subtraction argument, not by factoring) why for every .
Recall Solution L3.2
Let be any common divisor of and . Then divides their difference: The only positive integer dividing is itself, so the greatest common divisor is . Meaning: any two consecutive integers are coprime — they share no prime brick at all. This is the "divisors survive subtraction" idea from Euclid's lemma, used in a single stroke.
L3.3
A student claims . Is the answer correct, and is the reasoning complete? Justify by the min rule.
Recall Solution L3.3
The answer is correct — but only if you handle every prime, not just prime . Line up primes:
Min exponents: ; . So the value is right. The reasoning is only complete if the student also noticed that prime contributes and therefore drops out. A student who wrote " because " got the correct number but skipped the check on prime ; a student who kept the (writing ) would be wrong. Verdict: correct answer, and the min rule confirms it — provided the is explicitly dropped.
Level 4 — Synthesis
L4.1
Find integers with (use your L2.2 steps). This is Bézout's identity.
Recall Solution L4.1
Target from L2.2: . Take the Euclid steps and back-substitute, replacing each remainder by the equation that produced it.
From the steps: , and , and , and .
Start at and climb: Replace : Replace : Replace : So : check . ✅ (See Diophantine Equations — solutions exist exactly when the target is a multiple of the gcd.)
L4.2
Reduce the fraction to lowest terms.
Recall Solution L4.2
Divide top and bottom by their HCF (from L2.2, ): and share no prime, so — the fraction is now in lowest terms. This is precisely what Reducing Fractions to Lowest Terms does: strip the common HCF.
L4.3
Three ribbons of length cm, cm, cm must be cut into equal pieces with no waste, using the longest possible piece. What piece length, and how many pieces total?
Recall Solution L4.3
"Longest length that divides all three exactly" is . As warned in the L3 trap above (the identity does not extend to three numbers), we do not use any product shortcut — we compute the gcd pairwise, step by step:
- : , → min gives .
- : , so .
Piece length cm. Count of pieces: pieces.
Level 5 — Mastery
L5.1
Find . (Hint: there is a beautiful shortcut — you do NOT factor these giants.)
Recall Solution L5.1
Key theorem: for Mersenne-type numbers, . The exponents obey Euclid! So first run Euclid on the exponents and (same "" machine, with the quotient and the remainder):
- → .
Therefore Why the shortcut works (sketch): subtracting -type numbers mirrors subtracting exponents, so common divisors track of exponents — Euclid's "survive subtraction" idea lifted one level up. This is the flavour behind fast gcd in Modular Arithmetic & RSA.
L5.2
Show that if (coprime) and , then . (This is Euclid's Lemma, the engine of unique factorization.)
Recall Solution L5.2
Since , Bézout gives integers with Multiply both sides by : Now inspect the two terms on the left:
- (obviously, is a factor).
- because we are given , so divides times anything.
A number dividing both summands divides their sum, so . This is exactly why a prime dividing a product must divide one of the factors — the backbone of the Fundamental Theorem of Arithmetic.
L5.3
A rectangular room measures cm by cm and is to be tiled with identical square tiles, no cutting. What is the fewest tiles possible, in terms of and ? Then evaluate for .
Recall Solution L5.3
Fewest tiles largest square side. A square of side tiles both directions exactly iff and ; the largest such is . Number of tiles . Notice this equals = "tiles across" "tiles down". For : (from L2.2), so Check as a grid: tiles across, tiles down, and . ✅
Connections
- HCF (GCD) — prime factorization method, Euclidean algorithm — parent note (all machinery built there)
- Fundamental Theorem of Arithmetic — L5.2 is its engine
- LCM — Least Common Multiple — L3.1 product identity
- Diophantine Equations — L4.1 Bézout coefficients
- Reducing Fractions to Lowest Terms — L4.2
- Modular Arithmetic & RSA — L5.1 fast gcd flavour
- Prime Numbers & Factorization