Mods and Arithmetic Functions

advertisement
Mods and Arithmetic Functions
Kevin Lin
November 10, 2014
(Some inspiration taken from Sohail Farhangi’s 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, a−1 , satisfies the equation:
aa−1 ≡ 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
1
in a modulus if the inverse is defined: dividing by a can be defined as multiplying by its inverse, a−1 . 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 ≡ b−1 (mod n), prove/disprove that a−1 ≡ b
(mod n).
2
2.1
Counting and Summing Factors
Counting Factors
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
There’s 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
0
We can work a little more with this to make it a bit nicer.
2.2.1 Find a nicer (subjective?) formula for σ(n). (Hint: Examine the geometric sequence 1 + pb + pb 2 ...pb nb )
3
Chinese Remainder Theorem :
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 )
2
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 I’ll go over later in the middle of December. I’m also fiercely
resisting writing about Bezout’s Lemma and the Chicken McNugget Theorem so there’s still some cool stuff for
December.
4
Euler’s Theorem
Euler’s Theorem relies on the Euler’s totient function, denoted as ϕ(n). It states that for relatively prime a and n:
aϕ(n) ≡ 1(mod n)
Furthermore, Euler’s totient is defined as:
ϕ(n) = n
Y
p|n
4.1
1
1−
p
The Cool FLT
Fermat’s Little Theorem is a specific corollary of Euler’s Theorem for prime moduli. It states that:
an−1 ≡ 1(mod n)
as the value of ϕ(n) for any prime n is n − 1.
4.2
Wilson’s Theorem
Let’s try this as an exercise.
3.2.1 Find and prove the value of (p − 1)! (mod p) for prime p. Can non-prime ps have this value as well?
5
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!
Find the remainder when a is divided by 13.
3 What is the expected value of a random factor of 302400?
4 Find the sum of the divisors of 251658240. Don’t worry - the factorization is nice.
5 Let k = 20082 + 22008 . What is the units digit of k2 + 2k ? (2008 AMC 12A Problem 15)
6 Find 220 + 330 + 440 + 550 + 660 (mod 7). (Somewhere on AOPS)
7 One of Euler’s conjectures was disproved in the 1960s by three American mathematicians when they
showed there was a positive integer such that 1335 + 1105 + 845 + 275 = n5 . Find the value of n. (1989
AIME Problem 9)
xx
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)
3
Download