c 2013, Michael Rubinstein.
These notes are intended for the use of my students. Do not circulate.
I also prefer that you do not waste paper by printing these pages out, especially
repeatedly. If you insist on printing them, please use the page range opti

Application 3. If 2m + 1 is prime, then m = 2n for some integer n 0.
Proof. By contrapositive. Suppose that m is not a power of 2. Then m = 2n q
for some odd q > 1. Now the polynomial f (x) = xq + 1 has a root at x = 1,
so it is divisible by x + 1. Since

PMATH 340
Assignment 3
Solutions
1. For this exercise use technology. This is a good time to implement the
program in Excel prescribed on pages 70-72 of Taste. Only the answers,
and not your actual program, are required.
[4]
(a) Reduce 43211234 mod 5678.

Name:
ID#
PMATH 340
1.
Assignment 6/Practice Final
2013
(a) Solve the congruence 20112012
Due:
(mod 2003).
1331
(b) Find the last four digits of the number 13572468
.
(c) Find all 11-th power residues modulo 2017.
(d) Prove that there exists an integer k

Name:
ID#
PMATH 340
Assignment 2
Due: Friday, February 6, 8:30 AM
The assignment is out of 130.
The marks for each question are shown in the margins.
Please submit your solutions in the same order as the questions.
My suggestion is to print these question

PMATH 340
[4]
Assignment 2
Solutions
1. How many positive factors do 67375 and 70875 have in common?
Solution
Since any common factor of these two numbers is a factor of their gcd, the
question is asking us to count the number of positive factors of gcd(6

Name:
ID#
PMATH 340
Assignment 3
Due: Friday, February 27, 8:30 AM
The assignment is out of 111.
The marks for each question are shown in the margins.
Please submit your solutions in the same order as the questions.
My suggestion is to print these questio

PMATH 340: Homework Set 2
Due: February 1, 2010
NOTE TO THE STUDENT: All solutions are expected to be written with complete
sentences. Those written without complete sentences will marked down, the depth of which
is left to the marker.
1. Prove that there

Elementary Number Theory, PMATH 340
Winter 2013
MC 2038, MWF 1:30-2:20
Instructor: Michael Rubinstein
Office hours: MWF 2:20-3:00
Email: [email protected]
or by appointment
Phone: 519-888-4567, ext. 36172
Office: MC5044
TAs: a) Daniel Pareja,

Name:
ID#
PMATH 340
Assignment 4
Due: Friday, March 13, 8:30 AM
The assignment is out of 108.
The marks for each question are shown in the margins.
Please submit your solutions in the same order as the questions.
My suggestion is to print these questions,

Name:
ID#
PMATH 340
Assignment 4
Due: Friday, March 13, 8:30 AM
The assignment is out of 108.
The marks for each question are shown in the margins.
Please submit your solutions in the same order as the questions.
My suggestion is to print these questions,

Q1 (a) Solution: By Fermat little theorem, notice that 2003 is a prime. Therefore, a2002 = 1 mod 2003 for any a that is not a multiple of 2003. Hence, an =
an mod 2002 mod 2003. It now suces to compute 20122013 mod 2002 = 102013
mod 2002
Notice now 2002 =

PMATH 340
Assignment 2, due Feb 8
1. Let p, q be distinct odd primes, and a, b positive integers. Show pa q b cannot be perfect.
n
2
2. Let fn = 22 + 1. Show for n 1, that fn = fn1 2fn1 + 2.
3. Prove that fn 7 mod 10, for n 2. Hint: use the previous probl

Week 3
The group of units
3.1 Euler's function and Euler's Theorem
We begin with two definitions, which are really just defining notation for things we've already seen. Definition 9. We denote by Zm the set of residue classes modulo m. Addition and multip

PMATH 340: Homework Set 1
Due: January 18, 2010
NOTE TO THE STUDENT: All solutions are expected to be written with complete
sentences. Those written without complete sentences will marked down, the depth of which
is left to the marker.
1. Let p be a prime

PMATH 340
[3]
1.
Assignment 1
Solutions
(a) Use the Euclidean Algorithm to nd gcd(84, 385). Do this one by
hand and show the steps in the algorithm.
Solution
Here is the Euclidean Algorithm fully displayed.
385 = 84 4 + 49
84 = 49 1 + 35
49 = 35 1 + 14
35

PMath 340 Elementary Number Theory Spring 2017 Course
Notes
J.C. Saunders
5
Eulers Function
5.1
Units
We have so far learned how to do addition, subtraction, and multiplication in Zn . This leaves open the question
of division, i.e. is there an answer to

PMATH 340
Assignment 4
Due: Friday, July 7
1. How are the systems Z, Zn , Zp where n is composite and p is prime the
same? How are they different?
2. Find two prime values of p such that 7 19 p is a Carmichael number.
3. Find the solutions to 22x3 16x2 +

Proof of Prime Factorisation
J.C. Saunders
Theorem 1. For all n N, there there exists a finite set of primes p1 , p2 , ., pk and e1 , e2 , ., ek N such that
n = pe11 pe22 .penn .
Moreover, such a representation of n is unique. This representation is calle

PMath 340 Elementary Number Theory Spring 2017 Course
Notes
J.C. Saunders
3
Congruences
3.1
Introduction to Congruences
Suppose that you want to tell what day of the week it will be 1000 days from now. How would you do it? Well,
you could start off number

PMath 340 Elementary Number Theory Spring 2017 Course
Notes
J.C. Saunders
2
2.1
Prime Numbers
Distribution of Primes
Our study of divisibility leads directly into the study of prime numbers. First, a definition:
Definition 4. A positive integer p greater

PMath 340 Elementary Number Theory Spring 2017 Course
Notes
J.C. Saunders
1
Divisibility
Definition 1. For a pair of integers a, b, we say b divides a or a is a multiple of b or a is divisible by b or b | a if
and only if there exists an integer c such th

IX = 2.77 cm IY = 2.77 cm IZ = 2.77 cm
C
Angle Bisectors and the INCENTRE
X Y I
The three angle bisectors of a triangle all intersect in a single point I, called the incentre of the triangle. If we drop perpendiculars from I to the three sides at X, Y, an

Math 432-2: Axiomatic Geometry: AXIOMS EUCLIDS AXIOMS/POSTULATES Euclid #1. Given any two distinct points P and Q, there exists a unique line l passing through both points. Euclid #2. For every segment AB and every segment CD, there exists a unique point

PMATH 340
Assignment 3 Solutions
Due: Friday, June 23
1. Describe the method of solving a system of congruences
x a1 (mod n1 )
x a (mod n )
2
2
.
x ak (mod nk ).
in your own words.
One possible answer: We first see if gcd(ni , nj ) | (ai aj ) for all i 6=

PMath 340 Elementary Number Theory Spring 2017 Course
Notes
J.C. Saunders
6
6.1
Quadratic Residues
Quadratic Congruences
Lets say we want to solve a quadratic congruence. In other words, we wish to solve
ax2 + bx + c 0 (mod n)
where a, b, c, and n are fix

UNIVERSITY OF WATERLOO
MIDTERM EXAMINATION
SPRING TERM 2017
Student Name (Print Legibly)
(family name)
(given name)
Signature
Student ID Number
COURSE NUMBER
PMATH 340
COURSE TITLE
Elementary Number Theory
COURSE SECTION
001
DATE OF EXAM
Friday, June 16th

3.1
Strong Induction
As we will use strong induction in the coming lectures, we put it down for the
record now.
Theorem 18 (Strong Principle of Finite Induction). Let S N such that
(i) 1 S
(ii) if 1, 2, . . . , k S , then k + 1 S .
Then S = N.
3.2
The Fun

LECTURE NOTES FOR
PURE MATHEMATICS 340
ELEMENTARY NUMBER THEORY
JANUARY TO APRIL 2015
STANLEY YAO XIAO
A BSTRACT. These are the course notes that I am lecturing out of for the course I am giving on
elementary number theory in Winter 2015. As each lecture