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 with Euclid's algorithm, prove that the algorithm works, and express the gcd as (Bézout's identity)
- Prove Euclid's lemma — if a prime divides , then divides or divides — 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.
Use Euclid's algorithm to compute .
- 2.
Which pairs satisfy ? (Choose all that apply.)
- A.
- B.
- C.
- D.
- E.
- 3.
For which of these numbers is it true that for all integers : if then or ? (Choose all that apply.)
- A.
- B.
- C.
- D.
- E.
- 4.
Compute .
- 5.
Which of these fractions have a terminating decimal expansion? (Choose all that apply.)
- A.
- B.
- C.
- D.
- E.
- 6.
In the proof of Euclid's lemma we assume and , and then say . Why?
- A.The positive divisors of are only and , and does not divide , so the only positive common divisor is .
- B.By Bézout's identity.
- C.Because .
- D.Any two different numbers are coprime.
- 7.
With a -litre jug, a -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.
In the Hilbert numbers (numbers of the form ), which statement is true?
- A. are two different factorisations into irreducibles, so unique factorisation fails.
- B. is not irreducible, because .
- 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.
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
- A.
- 10.
Write
extended_gcd(a, b)for natural numbersa, b(not both zero), returning a triple(g, x, y)withg == gcd(a, b)anda * x + b * y == g. Use the recursion: ifb == 0return(a, 1, 0); otherwise get(g, x, y)for(b, a % b)and back-substitute usinga % b == a - (a // b) * b.Computational — Practice