CHAPTER 1 Prime factorisation Flashcards
Motivation: Diophantine eq
x^n +y^n=z^n
has only trivial solutions for n>=3
how many integer solutions?
x^2+y^2=z^2 has integer solutions 3^2+4^2=5^2
N
N := {0, 1, 2, . . . }
integers
Z := {. . . , −2, −1, 0, 1, . . .}.
Definition 1.1.1 (Divisibility)
Let n, d ∈ Z. We say that d is a factor n, or d is a divisor of n, or that d divides n if there is some q ∈ Z such that n = qd. When this is the case, we write d | n, otherwise we write d ∤ n.
d divides n if
Take n,d in Z
d| n if there is k in Z s.t nk=d
d is a divisor/factor of n
12|24 8 doesnt divide 15
10|10a+20b
Example 1.1.2. 5 | 10, 5 ∤ 11, −5 ∤ 10. Moreover, note that n | 0 for all n ∈ Z. When is it
true that 1 | n? And what about 0 | n?
The number 1 divides n for any n ∈ Z because n = n · 1. On the other
hand, 0 | n only when n = 0, because n = q · 0 implies n = 0.
5|0?
yes 0 = 5 x 0
n|0?
Every n|0 including 0 itself
.
1|n?
for every n in N n=n x 1
The number 1 divides n for any n ∈ Z because n = n · 1.
0|n?
On the other
hand, 0 | n only when n = 0, because n = q · 0 implies n = 0
d|a and d|b then
d| (a+b)
a=dxk b =d x c
a+b = d(k+c) by def k+c in integers
more generally d|(ax+by) for every x,y in Z. if we write a = qd, b = rd, then ax + by = (qx + ry)d.
a | b, b | c imply that a | c
TRANSITIVE
a | b, b | c imply that a | c
- It is reflexive: n | n because n = n · 1.
- It is transitive: suppose that n | m and m | k. This means that m = nq, k = mr for some q, r ∈ Z. Then k = n(qr), so n | k.
- It is not symmetric: for instance, 2 | 4 but 4 ∤ 2.
An additional detail: within N, divisibility is antisymmetric. Indeed, if a | b | a,
there are k, ℓ ∈ N such that b = ka, a = ℓb, so a = kℓa, hence k = ℓ = 1, therefore a = b. This makes | a partial order on N.
gcd definition 1.1.4
Let a, b ∈ Z not both zero. The highest common factor or greatest common divisor of a and b is the largest positive integer d such that d divides both a and b.
It is denoted gcd(a, b) := d, or sometimes (a, b) := d. We also set gcd(0, 0) := 0.
coprime
If gcd(a, b) = 1, then we say that a and b are coprime or relatively prime
gcd(8, 12) =
gcd(9, 0) =
gcd(8, 12) = 4, gcd(9, 0) = 0,
gcd(0,0)
=0
as common divisors are all naturals so can we take a max?
are 7 and 9 coprime?
gcd(7, 9) = 1 (hence 7 and 9 are coprime).
Exercise 1.1.6. What is gcd(n, n)?
1,n are definitely common divisors
gcd(n, n) = |n|
By def gcd(0,0)=0 so consider case
n ̸= 0:
|n| divides n, since |n|=n or |n|=-n so gcd(n,n) ≥ |n|.
Moreover, if d ≥ 0 divides n, meaning that n = qd for some q, then |n| = |q||d|, thus |d| ≤ |n| because |q| ≥ 1, hence gcd(n, n) ≤ |n|.
It follows that gcd(n, n) = |n|.
remark lcm
lcm(a, b) := ab/gcd(a,b) is
the ‘least upper bound’ of a, b (where lcm(a, b) = 0 when one of a, b is zero).
Lemma 1.1.7 DIVISION ALGORITHM
Let a, b ∈ Z, where b≠ 0. Then there exist unique q,r ∈ Z (respectively quotient, remainder) such that
a = qb + r and 0 ≤ r < |b|.
PROOF
Lemma 1.1.7 DIVISION ALGORITHM
Differs from notes
Proof. Suppose that b > 0. The set Q = {q′: q′b ≤ a} is bounded from above (for
instance, Q ≤ |a|), so it has a maximum q.
Note in particular that a < (q + 1)b. Let r = a − qb. By construction, 0 ≤ r < b.
When b < 0, we first use the conclusion with −b > 0 in place of b. We find that
a = q′(−b) + r where 0 ≤ r < −b = |b|. Now simply set q =−q′: we have
a =(−q′)b + r = qb + r, as desired
50 = 2 · 24 + 2
division 50 hours by 24
2 x 24 +2
2 days 2 hours
Example 1.1.9 (Clocks). Times are the prototypical example of integer division.
90 minutes are equal to 1 hour and 30 minutes, because 90 = 1 · 60 + 30.
50 hours are 2 days and 2 hours because 50 = 2 · 24 + 2