Modular
Modular
PETER MCNAMRA
Bucknell University
and Trinity College Dublin
Motivating Problems.
(a) Find the remainder when 2123 is divided by 29.
(b) Do there exist integer solutions to
x2 + y2 = z2 ?
x n + y n = z n for n > 2 ?
1. MODULAR ARITHMETIC
Main definition. Integers a, b, m with m 6= 0.
We say “a is congruent to b modulo m” and write
a≡b (mod m) if
m | a−b i.e. m divides a − b.
Examples.
4 ≡ 9 (mod 5).
23 ≡ 1 (mod 2).
−5 ≡ 3 (mod 4).
In other words...
We say a≡b (mod m) if
So
(25)k ≡ 3k (mod 29).
Next,
2120 ≡ (215)8 ≡ (−2)8 (mod 29).
Finally,
Answer: 18.
6
Similarly,
b = jm + r2 with 0 ≤ r2 ≤ m − 1.
2. DIOPHANTINE EQUATIONS.
Main trick for today: pick an appropriate modulus.
Problem 4. Show there are no integer solutions to
Key point:
x 2 + y 2 ≡ 0, 1 or 2 (mod 4).
Meanwhile,
10z − 1 ≡ 102 . 10z−2 − 1 ≡ −1 ≡ 3 (mod 4).
Lots of nice proofs (Art of Problem Solving wiki has 4). Simple one
in Group Theory (college).
Example. a = 57 and b = 29:
5728 ≡ 1 (mod 29).
Solution to Problem 5.
First, apply Fermat’s Little Theorem:
1335 = 1335.
415 > 275.
5 . 1334 . 41 = 205 . 1334 > 110 . 1334 + 84 . 1334 > 1105 + 845.
Answer: n = 144.
10
or
w 6 + x 6 + y 6 + z 6 = 1012 + 4.
Problem 9.
(a) Show that an integer is divisible by 9 if and only if the sum of
its digits is divisible by 9.
(b) Show that an integer is divisible by 11 if and only if the alter-
nating sum (add the first digit, subtract the second, add the third,
subtract the fourth, etc.) of its digits is divisible by 11.
Problem 10. It’s nice when the number of things in a list is divisible
by 10. Discuss.