Lecture 023

Number Theory Revisit

Division

$a|b \land a | c \implies a| (bx+cy)$

Euclidean Algorithm

Continuously divide remainder gives gcd(a,b) TODO: Proof

Bezout's Lemma

1. gcd(a, b) can be written in gcd(a, b) = ax + by
2. gcd(a,b) is the smallest positive integer written in multiples of a and b $xa + yb$ TODO: Proof

Corollary to Bezout's Lemma

1. $t|a \land t|d \implies t|gcd(a,b)$ greatest divisor divides common divisor
2. a number divisible by gcd(a,b) can be written as $ax+by$
3. $gcd(a, b)=1 \implies ax+by=1$ if a,b coprime, then we can find some number of multiple that gets close but not 0. (special case for Bezout's Lemma)
4. $gcd(ma, mb) = m \times gcd(a,b)$

Least Common Multiple

lcm[a,b]

• only multiples of lcm[a,b] are common multiple

Corollary to LCM

• $lcm[a,b] = |b| \iff a|b$

• $lcm[ma, mb] = m \times lcm[a, b]$

Number Theory on Friday

Euclid's Lemma (coprime)

$gcd(a,b)=1 \land a|bc \implies a|c$ TODO: proof

When a is prime: $p|bc \implies p|b \lor p|c$

Fundamental Theorem of Arithmetic (FTA)

Every integer n > 1 can be written as a product of primes in a unique way.

The Infinitude of Primes

The next prime is a prime for $P = (\prod_{i=1}^n p_i)+1$

Divisors

$ord_p(n) = max\{a\in \mathbb{N} | p^a|n\}$

• order(p, n) is how many times n can be divide by prime p.

so n can be expressed as $n=p_1^{ord_{p_1}(n)}p_2^{ord_{p_2}(n)}...$

so a > b means that

1. the power of b's factorization is smaller equal to the power of a's factorization. ($(\forall p \in \mathbb{P})(ord_p(a) \leq ord_p(n))$)
2. we can calculate how many possible divisor of a and b

GCD-LCM Theorem

We can express $a = \prod_{i=1}^n p_q^{a_i}$ $b = \prod_{i=1}^n p_q^{b_i}$ Then $gcd(a,b) = \prod_{i=1}^n p_i^{min\{a_i, b_i\}}$ $lcm(a,b) = \prod_{i=1}^n p_i^{max\{a_i, b_i\}}$ TODO: proof

Corollary to GCD-LCM Theorem

$ab = gcd(a,b) \times lcm[a,b]$

gcd(a,b)|c iff a(kx)+b(ky)=c (ax+by=gcd(a,b)) d|a, d|b -> d|gcd(a,b)

Table of Content