Skip to content
The Lumenary

Each worksheet prints cleanly on A4 or Letter. Answer keys are on a separate page.

The Lumenary · Grades 9–12

Divisibility, Euclid's algorithm and unique factorisation

Name: ______________________

Date: ______________________

You will learn to

  • Use the definition of divisibility and division with remainder to prove basic facts about divisors
  • Compute gcd⁡(a,b)\gcd(a, b) with Euclid's algorithm, prove that the algorithm works, and express the gcd as ax+byax + by (Bézout's identity)
  • Prove Euclid's lemma — if a prime pp divides abab, then pp divides aa or pp divides bb — and see why primality is needed
  • Prove the existence and uniqueness of prime factorisation, and explain why uniqueness needs a proof
  • Deduce that a fraction in lowest terms has a terminating decimal exactly when its denominator has no prime factors other than 2 and 5
  • Distinguish the greatest common divisor from the least common multiple, and compute both
  1. 1.

    Use Euclid's algorithm to compute gcd⁡(252,198)\gcd(252, 198).

  2. 2.

    Which pairs (x,y)(x, y) satisfy 5x+3y=15x + 3y = 1? (Choose all that apply.)

    • A.(2,−3)(2, -3)
    • B.(−1,2)(-1, 2)
    • C.(1,−1)(1, -1)
    • D.(−4,7)(-4, 7)
    • E.(3,−4)(3, -4)
  3. 3.

    For which of these numbers dd is it true that for all integers a,ba, b: if d∣abd \mid ab then d∣ad \mid a or d∣bd \mid b? (Choose all that apply.)

    • A.d=2d = 2
    • B.d=4d = 4
    • C.d=6d = 6
    • D.d=7d = 7
    • E.d=9d = 9
  4. 4.

    Compute lcm⁡(84,90)\operatorname{lcm}(84, 90).

  5. 5.

    Which of these fractions have a terminating decimal expansion? (Choose all that apply.)

    • A.740\tfrac{7}{40}
    • B.112\tfrac{1}{12}
    • C.312\tfrac{3}{12}
    • D.11125\tfrac{11}{125}
    • E.215\tfrac{2}{15}
  6. 6.

    In the proof of Euclid's lemma we assume p∣abp \mid ab and p∤ap \nmid a, and then say gcd⁡(p,a)=1\gcd(p, a) = 1. Why?

    • A.The positive divisors of pp are only 11 and pp, and pp does not divide aa, so the only positive common divisor is 11.
    • B.By Bézout's identity.
    • C.Because a<pa < p.
    • D.Any two different numbers are coprime.
  7. 7.

    With a 66-litre jug, a 1515-litre jug and a tap, what is the smallest positive amount of water you can measure exactly (by filling, emptying and pouring between the jugs)?

  8. 8.

    In the Hilbert numbers 1,5,9,13,17,21,…1, 5, 9, 13, 17, 21, \dots (numbers of the form 4k+14k + 1), which statement is true?

    • A.441=9⋅49=21⋅21441 = 9 \cdot 49 = 21 \cdot 21 are two different factorisations into irreducibles, so unique factorisation fails.
    • B.99 is not irreducible, because 9=3⋅39 = 3 \cdot 3.
    • C.Euclid's lemma still holds: if an irreducible divides a product, it divides a factor.
    • D.Some Hilbert numbers have no factorisation into irreducibles at all.
  9. 9.

    Which Lean statement correctly formalises Euclid's lemma for natural numbers?

    • A.∀ p a b : ℕ, p.Prime → p ∣ a * b → p ∣ a ∨ p ∣ b
    • B.∀ p a b : ℕ, p ∣ a * b → p ∣ a ∨ p ∣ b
    • C.∀ p a b : ℕ, p.Prime → p ∣ a ∨ p ∣ b → p ∣ a * b
    • D.∀ p a b : ℕ, p.Prime → p ∣ a * b → p ∣ a ∧ p ∣ b
  10. 10.

    Write extended_gcd(a, b) for natural numbers a, b (not both zero), returning a triple (g, x, y) with g == gcd(a, b) and a * x + b * y == g. Use the recursion: if b == 0 return (a, 1, 0); otherwise get (g, x, y) for (b, a % b) and back-substitute using a % b == a - (a // b) * b.

    Computational — Practice

Code: Apache-2.0 · Content: CC BY-SA 4.0