Induction. Three different equivalent versions:
(b) if P(n-1) is true, then P(n) is true,
(b) if P(k) is true for every n_{0} £ k < n, then P(n) is true,
An integer p is prime if whenever p = ab with a,b Î \Bbb Z, either a = ±n or b = ±n .
[For sanity's sake, we will take the position that primes should also be ³ 2 .]
There are infinitely many distinct primes.
Every integer n ³ 2 can be expressed as a product of primes; n = p_{1}·¼·p_{k} .
If we insist that the primes are written in increasing order, p_{1} £ ¼ £ p_{k}, then this representation is unique.
Exponential notation: any n ³ 2 can be uniquely expressed as n = p_{1}^{a1}·¼·p_{r}^{ar} with a_{i} ³ 1 for each i and p_{1} < ¼ < p_{r} .
The Division Algorithm: For any integers n ³ 0 and m > 0, there are unique integers q and r with n = mq+r and 0 £ r £ m-1 .
[Note: this is also true for any integers n,m with m ¹ 0, although you need to replace ``m-1'' with ``|m-1|'' .]
The basic idea: keep repeatedly subtracting m from n until what's left is less than m.
Notation: b|a = ``b divides a'' = ``b is a divisor of a'' = ``a is a multiple of b'', means a = bk for some integer k .
If b|a and a ¹ 0, then |b| £ |a| .
If a|b and b|c, then a|c
If a|c and b|d, then ab|cd
If p is prime and p|ab, then either p|a or p|b
Notation: (a,b) = gcd(a,b) = greatest common divisor of a and b
Different, equivalent, formulations for d = (a,b) :
(1) d|a and d|b, and if c|a and c|b, then c £ d .
(2) d is the smallest positive number that can be written as d = ax+by with a,b Î \Bbb Z .
(3) d|a and d|b, and if c|a and c|b, then c|d .
(4) d is the only divisor of a and b that can be expressed as d = ax+by with a,b Î \Bbb Z .
If c|a and c|b, then c|(a,b)
If c|ab and (c,a) = 1, then c|b
If a|c and b|c, and (a,b) = 1, then ab|c
If a = bq+r, then (a,b) = (b,r)
Euclidean Algorithm: This last fact gives us a way to compute (a,b), using the division algorithm:
Starting with a > b, compute a = bq_{1}+r_{1}, so (a,b) = (b,r_{1}). Then compute b = r_{1}q_{2}+r_{2}, and repeat: r_{i-1} = r_{i}q_{i+1} +r_{i+1} . Continue until r_{n+1} = 0, then (a,b) = (b,r_{1}) = (r_{1},r_{2}) = ¼ = (r_{n},r_{n+1}) = (r_{n},0) = r_{n} .
Since b > r_{1} > r_{2} > r_{3} > ¼ , this process must end, by well-orderedrness.
We can reverse these calculations to recover (a,b) = ax+by, by rewriting each equation in our algorithm as r_{i+1} = r_{i-1}-r_{i}q_{i+1}, and then repeatedly substituting the higher equations into the lowest one, in turn, working up through the list of equations.
Primality Testing:
If n ³ 2 is not prime, then it has a prime factor p £ Ön. So to test if a number n is prime, `just' check to see if p|n for any prime p £ Ön.
The Sieve of Eratosthenes: To find all primes between 2 and n, first make a list, then repeat the following procedure: circle the smallest number p not already either circled or crossed off, then cross off all other multiples of p. Continue until the number you are about to circle is larger than Ön . Then every number either circled or not crossed off is prime, while every number crossed off is not prime.
Congruence modulo n : Notation: a º b (mod n) (also written a\medspace \underset n® º \medspaceb) means n|(b-a)
Equivalently: the division algorithm will give the same remainder for a and b when you divide by n
Congruence mod n is an equivalence relation, which means
(Reflexive) a\medspace \underset n® º \medspacea for every a Î \Bbb Z
(Symmetric) If a\medspace \underset n® º \medspaceb , then b\medspace \underset n® º \medspacea
(Transitive) If a\medspace \underset n® º \medspaceb and b\medspace \underset n® º \medspacec , then a\medspace \underset n® º \medspacec
If a = b , then a\medspace \underset n® º \medspaceb for any n Î \Bbb Z
If a\medspace \underset n® º \medspaceb and k Î \Bbb Z, then ka\medspace \underset n® º \medspacekb
If a\medspace \underset n® º \medspaceb and m|n , then a\medspace \underset m® º \medspaceb
(*) If a\medspace \underset n® º \medspaceb and c\medspace \underset n® º \medspaced, then a+c\medspace \underset n® º \medspaceb+d and ac\medspace \underset n® º \medspacebd
The congruence class of a mod n is the collection of all integers congruent mod n to a:
[a]_{n} = {b Î \Bbb Z : a\medspace \underset n® º \medspaceb} = {b Î \Bbb Z : n|(b-a)}
Because \medspace \underset n® º \medspace is an equivalnce relation, these sets are either disjoint or equal. And because every integer is congruent mod n to its remainder on division by n, there are exactly n congruence classes mod n, which can be represented as [0]_{n} , [1]_{n} , ¼, [n-1]_{n} . The set of these n equivalence classes is denoted \Bbb Z/n\Bbb Z or \Bbb Z_{n}, and is called the integers mod n
(*) tells us that it makes sense to add and multiply congruence classes:
[a]_{n} + [b]_{n} = [a+b]_{n} , [a]_{n}·[b]_{n} = [ab]_{n}
These facts can be used to carry out some otherwise fairly difficult calculations very quickly:
To compute [a^{m}]_{n}, we note that [a^{m}]_{n} = [a]^{m}_{n} , so we first write a = nq+r, so [a^{m}]_{n} = [a]^{m}_{n} = [r]^{m}_{n} . Then we look at the list [r]^{1}_{n},[r]^{2}_{n},[r]^{3}_{n},[r]^{4}_{n},¼ , and continue until the power equals [0]_{n},[1]_{n} or it repeates itself. All of these can be used to reduce m. For example,
[107^{1015}]_{7} : [107]_{7} = [7·15 + 2]_{7} = [2]_{7}, and [2]^{3}_{7} = [8]_{7} = [1]_{7}, so since 1015 = 3·338 + 1, we have [107^{1015}]_{7} = [2]^{1015}_{7} = [2]^{3·338+1}_{7} = ([2]^{3}_{7})^{338}·[2]^{1}_{7} = [1]^{338}_{7}·[2]_{7} = [2]_{7} .
We can show that some equations have no integer solutions by showing that the `same' equations have no solutions in some \Bbb Z_{n} (coefficients need to be interpreted as being in \Bbb Z_{n} ...). The latter is far less difficult to do, in general, because \Bbb Z_{n} has only n elements! For example,
In \Bbb Z_{5}, 0^{2} = 0, 1^{2} = 1, 2^{2} = 4, 3^{2} = 4, and 4^{2} = 1, and so x^{2} = [3]_{5} has no solution in \Bbb Z_{5}. So the equation
has no solution with x,y Î \Bbb Z, since if it did, then
[x^{2}-5y^{2}]_{5} = [x]^{2}_{5}-[5]_{5}·[y]^{3}_{5} = [x]^{2}_{5}-[0]_{5}·[y^{3}]_{5} = [x]^{2}_{5} = [531253]_{5} = [3]_{5}
so [x]^{2}_{5} = [3]_{5} , which we know is impossible!