Académique Documents
Professionnel Documents
Culture Documents
Kevin Lin
November 10, 2014
(Some inspiration taken from Sohail Farhangis 2011-2012 TJUSAMO Introduction to Number Theory lecture)
jessen1111: game
1
1.1
Mods Basics
Integral Mods
Modular arithmetic is an arithmetic system for integers where two numbers a and b are defined as congruent with
respect to a modulus n, a b (mod n), when they can be written in the form:
a = a1 n + c
b = b1 n + c
for integer values of a1 , b1 , c. A modular residue in mod n is defined as the only possible value of c in [0, 1, 2..., n 1].
Now, lets prove some basic properties.
1.1.1 If a b (mod n) and b c (mod n), prove/disprove that a c (mod n).
1.1.2 If a b (mod n) and c d (mod n), prove/disprove that a + c b + d (mod n).
1.1.3 If a b (mod n) and a b (mod m), prove/disprove that m = n.
1.1.4 If a b (mod n) and c d (mod n), prove disprove that ac bd (mod n).
The operations of addition, subtraction, and multiplication are relatively well defined in modular arithmetic, because
using any of these operators on integers returns another integer - but what about division?
1.2
Inverses
Modular inverses for integers are defined such that the inverse of a, a1 , satisfies the equation:
aa1 1 (mod n)
for modulus n. However, not all values of a have integral inverses: a value of a will have an integral inverse if a and
n are relatively prime. For example, 2 has an inverse in mod 9, which is 5. 2 5 1 (mod 9). However, 2 will not
have an inverse in mod 8, as 2 and 8 are not relatively prime. In this way, we can also define the operation of division
in a modulus if the inverse is defined: dividing by a can be defined as multiplying by its inverse, a1 . For example,
3 2 3 5 6 (mod 9).
Now you might wonder, what about inverses for not relatively-prime a and n. For example, is 4 3 (mod 9) defined?
1.2.1 Is division by a number not relatively prime to the modulus defined?
1.2.2 If a b (mod n), both a and b have inverses mod n, and a b1 (mod n), prove/disprove that a1 b
(mod n).
2
2.1
Counting the total number of factors is relatively simple if you can find the prime factorization. In essence, this is a
nb
n2
1
combinatorics problem. Consider the prime factorization of a number n to be pn
1 p2 ...pb , where pi is prime and ni
is a positive integers. For any pi , you can choose an exponent among 0, 1, 2..., ni , which is ni + 1 choices. Therefore,
the total number of factors, which is often denoted as 0 (n) is:
0 (n) =
b
Y
(ni + 1)
i=1
2.2
Summing Factors
Theres a nice way to think of of summing factors, which is often denoted as 1 (n) or just n. Using the same idea
nb
n2
1
of the prime factorization of n as pn
1 p2 ...pb , we can think of a large distributive product:
(n) =
ni
b X
Y
i=1
2
n1
i
pn
)(1 + p2 + p2 2 ...p2 n2 )...(1 + pb + pb 2 ...pb nb )
i = (1 + p1 + p1 ...p1
The statement of the Chinese Remainder Theorem is that for pairwise relatively prime integers r1 , r2 , r3 ..., rn , there
is exactly one unique solution in the residues of mod r1 r2 r3 ...rn to the system of equations:
x a1 (mod r1 )
x a2 (mod r2 )
..
.
x an (mod rn )
There is a nice way to actually find the solution rather than just state there is one, but that is made much easier
by getting to explain the Euclidean algorithm, which Ill go over later in the middle of December. Im also fiercely
resisting writing about Bezouts Lemma and the Chicken McNugget Theorem so theres still some cool stuff for
December.
Eulers Theorem
Eulers Theorem relies on the Eulers totient function, denoted as (n). It states that for relatively prime a and n:
a(n) 1(mod n)
Furthermore, Eulers totient is defined as:
(n) = n
Y
p|n
4.1
1
1
p
Fermats Little Theorem is a specific corollary of Eulers Theorem for prime moduli. It states that:
an1 1(mod n)
as the value of (n) for any prime n is n 1.
4.2
Wilsons Theorem
Problems
1 What is a value in 800, 801, 802..., 899 equivalent to 2783 9142 (mod 100)?
2 Let a be an integer such that
(Somewhere on AOPS)
1
1
1
2
1
3
++
1
23
a
.
23!
8 If f (x) = xx , find the last two digits of f (17) + f (18) + f (19) + f (20). (PuMAC 2008 Division A
Number Theory Problem 5)