# Lecture 022

## Number Theory

Example:

• Euclid: there exists infinite many positive integer s.t. x^2+y^2=z^2 and grd(x, y, z) = 1

• Fermat's Last Theorem: there don't exist any positive integer x, y, z s.t. x^n+y^n=z^n for n>=3

• Lagrange's Four Square Theorem: Every non-negative integer can be written as the sum of 4 perfect squares

• Golbach's Conjecture: every even integer > 2 can be expressed as the sum of 2 primes (e.g. 14=3+11=7+7)

• Twin Prime conjecture: there are infinite many pairs of primes of the form (p, p+2)

Prime: let $n\in \mathbb{Z}$ s.t $n\geq 2$. n is prime iff its only positive divisors are 1 and itself.

• Theorem: for every integer > 2, is either a prime or a product of primes (every integer has at least one prime factorization)

• Lemma: for non zero m, n, if m|n, then $|m|\leq|n|$

Composite: n is not prime (ie. $(\exists a,b \in \mathbb{Z})(1< a \leq b)

Theorem: if n is composite, then n has a prime factor $p<=\sqrt{n}$

• prove by definition of composite and contradiction and prime factorization (either prime or product of prime)

• Lemma: if $n \in \mathbb{Z} \ {0}$, then n has finitely many divisors (so we always have finite many common divisors) TODO: why

Common Divisor: for $a, b \in \mathbb{Z}$ not both 0, integer d is called a common divisor iff $d|a$ and $d|b$. d is called the greatest common divisor(d=gcd(a, b)) iff d is the greatest of the common divisor

• $d=gcd(a,b) \iff d|a \land d|b \land (\forall x \in \mathbb{Z})(x|a \land x|b \implies x \leq d)$

• note: negative number has the same set of divisors as its positive

• note: gcd(a, b) = gcd(|a|, |b|)

• note: gcd(0, n) = n

• note: gcd(0, 0) undefined

• note: gcd = product of common prime factor

coprime(relatively prime): iff gcd(a,b) = 1

• divide a and b by gcd(a, b) to ensure they are relatively prime

• means no common divisor other than 1.

Theorem: for none zero a,b. d=gcd(a,b) then gcd(a/d, b/d) = 1

• proof: let n be common divisor of a/d and b/d. then |nd| is common divisor of a and b by algebra. |n|d <= d because d=gcd(a,b), n=+-1, so the greatest(among -1 and 1) common divisor is 1.

Euclidean Algorithm:

• gcd(x, y) = gcd(x+my, y) where x can be seen as remainder and m is divisor.

Division Algorithm:

• if a, b \in \mathbb{Z} with b > 0, then there exists unique q,r \in \mathbb{Z} s.t. a=bq+r and 0<=r<b

• proof: consider the set of remainder that divide a by 1~b for a,b: $S_{(a,b)} = \{a-bk | k \in \mathbb{Z} a-bk \geq 0 \}$, set is non-empty, has least element (by WOP-well-ordering-property) then we find the lowest reminder. WTS q,r pair unique, and r<b.

• r=0, then r-b \in S because a-b(g+1) > 0. r-b<r and r is the least element contradicts.
• q,r unique: a=bq_1 + r_1, b=bq_2 + r_2 (r1, r2 between 0 and b), WTS r1=r2,q1=q2. then -b<-r1<=0, -b<b(q1-q2)<b, -1<(q1-q2)<1, q1=q2, r1=r2

Corollary to Division Algorithm (DA): let a, b, in \mathbb{Z} with b!=0. if a=bq+r, then gcd(a,b) = gcd(b,r)

• note that q and r doesn't have to be correct divisor or remainder

• proof: let d1=gdc(a,b), d2=gcd(b,r). $d1|a \land d1|b \implies (\exists k,l \in \mathbb{Z})(a=ka_1 \land b=ld_1)$...

TODO: don't understand

Proposition: $a|b \land a|c \implies a|bx+cy$

Euclidean Algorithm (formal)

Bezout's Lemma

1. $(\exists x, y \in \mathbb{Z})(ax+by = gcd(a,b)))$
2. $(x,y \in \mathbb{Z} \land ax+by>0 \implies ax+by \geq gcd(a,b))$ TODO: proof ignored

3. corollaries: let a,b \in \mathbb{Z}, not both 0. let d=gcd(a,b) then

1. if $t \in \mathbb{Z}$ s.t. $t|a$ and $t|b$, then $t|d$. (greatest common divisor divides any common divisor)
2. $gcd(a,b) | c \iff (\forall c \in \mathbb{Z})(\exists m, n \in \mathbb{Z})(c=am + bn)$
3. if a and b are relatively prime, then $(\exists m, n \in \mathbb{Z})(am+bn=1)$
4. $(\forall m \in \mathbb{Z}^+)(gcd(ma, mb)= m \times gcd(a,b))$

TODO: proof ignored

Table of Content