1.6 Number Theory
Divisibility
Definition
For integers with , divides denoted if .
Properties
If and , then
If , then for any .
If and , then for all .
Greatest Common Divisor (GCD) and LCM
Definition
For , the greatest common divisor is the largest such that and . The least common multiple is the smallest positive with and .
Euclidean Algorithm
Compute by repeated division: , then replace until remainder .
Relation
Primes and Fundamental Theorem
Prime
An integer whose only positive divisors are and .
Fundamental Theorem of Arithmetic
Every integer has a unique factorization into primes up to order:
Modular Arithmetic
For modulus , define equivalence if . Operations respect congruence: if and then , .
Residue Classes
The set are representatives of .
Euler's Totient Function
number of integers in relatively prime to . If then
Congruences and Linear Equations
Solve . A solution exists iff
; then there are solutions mod .
Chinese Remainder Theorem
If are pairwise coprime, the system
has a unique solution mod .
Diophantine Equations
Linear: has integer solutions iff , general solution from one particular.