Professional Documents
Culture Documents
r se
1 Necessary Theorems
ou
Go read 104 Number Thoery Problems by Titu Andrescu, Dorin Andrica, and Zuming Feng. RIGHT NOW.
Theorem 1.1 (What can you do in MOD?) — We all know that a ≡ b (mod m) means m | a − b. The
C
following are the valid operations you can do in mod:
integer k, ak ≡ bk (mod m)
Theorem 1.3 (Dirichlet’s Theorem) — There are infinitely many primes of the form ak + b where a, b,
are two relatively prime integers.
This basically means that there are infinitely many primes in an arithmetic sequence.
Theorem 1.4 (Chinese Remainder Theorem) — Let (m1 , m2 , . . . mn ) is a set of parewise coprime inte-
gers, that is gcd(mi , mj ) = 1 for all i, j . Also let (a1 , a2 . . . an ) be any integers. Then the Chinese
Remainder theorem tells us that there is an integer x such that the following equivalencs are all
1
satisfied:
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
..
.
x ≡ an (mod mn )
Lemma 1.5 — Let p be a prime. If x and y are integers such that xy ≡ 0 (mod m), then either x ≡ 0
(mod p) or y ≡ 0 (mod p) or both.
se
Theorem 1.6 — Let m be a positive integer, and let a and b be integers relatively prime to m. If x
and y are integers such that
r
then
ou
agcd(x,y) ≡ bgcd(x,y) (mod m)
Definition (Residue Classes)— In modular arithmetic, we classify every integer into an unique class according
to their remainder on division by n. For example, {1, 11, 21, 31 . . . } all can be classified to 1 (or 11, 21, or 31)
modulo 10.
C
We call these classes according to dividsion by n, residue classes. So there are n residue classes modulo n.
Definition (Complete set of residue classes)— The set of all residue classes modulo n is called the complete
set of residue classes.
sh
For example, there are 5 residue classes, and the complete set of residue classes is {0, 1, 2, 3, 4} modulo 5. Note
that {0, 6, 2, 13, −1} is also another complete set of residue classes.
ra
Lemma 1.7 — The following can be checked using complete set of residue classes:
1. n2 ≡ 0 or 1 (mod 3)
C
2. n2 ≡ 0 or ±1 (mod 5)
3. n2 ≡ 0 or 1 or 4 (mod 8)
4. n3 ≡ 0 or ±1 (mod 9)
O
5. n4 ≡ 0 or 1 (mod 16)
Lemma 1.8 — Let {a1 , a2 , . . . an } be a complete set of residuce classes modulo n. Then the following
dM
results hold:
Theorem 1.9 — Let m be a positive integer. Let a be an integer relatively prime to m, and let b be
an integer. There exist integers x such that ax ≡ b (mod m), and all these integers form exactly one
residue class modulo m.
Definition (Inverse)— Setting b = 1 in the previous theorem, we get that for all integer a coprime to m,
there is a number x with ax ≡ 1 (mod m). This x is called the inverse of a modulo m, and is written as a−1
or a1 .
2
Definition (Wilson’s theorem)— For any prime p,
(p − 1)! ≡ −1 (mod p)
Theorem 1.10 (Fermat’s Little Theorem) — Let p be a prime, and let a be an integer not divisible by
p. Then we have,
ap ≡ a (mod p), and ap−1 ≡ 1 (mod p)
se
2 Intro Problems
r
Problem 2.1. Let m be an even positive integer. Assume that {a1 , a2 , . . . , am } and {b1 , b2 , . . . , bm } are
two complete sets of residue classes modulo m. Prove that
ou
{a1 + b1 , a2 + b2 , . . . , am + bm }
C
Problem 2.2. Prove Lemma 1.8.2.
sh
3 Hard Problems
Problem 3.1 (Russia 2001). Find all primes p, q such that p + q = (p − q)3 .
ra
C
O
dM
B