Quiz # 1 for Dr. Z.s Number Theory Course for Sept. 26, 2013
NAME: (print!)
E-MAIL ADDRESS: (print!)
1. (3 points) Convert 51 (written in the usual decimal notation) to to binary, in (i) sparse notation
(ii) dense notation (iii) positional notation.
2. (3

Dr. Z.s Number Theory Lecture 10 Handout: Linear Congruences and Modular Inverse
By Doron Zeilberger
Version of Oct. 7, 2013 (some typos corrected)
Important Theorem
If a and b are any integers, and n is a positive integer, the linear congruence
ax b (mod

NAME: (print!)
E-Mail address:
MATH 356, Dr. Z. , Final Exam, Mon., Dec. 23, 2013, 8-11am, SEC-218
Do not write below this line (oce use only)
1.
(out of 10)
2.
(out of 10)
3.
(out of 10)
4.
(out of 10)
5.
(out of 10)
6.
(out of 10)
7.
(out of 10)
8.
(out

MATH 356, Dr. Z. , Solutions to Exam I, Mon., Oct. 14, 2013, 10:20-11:40am,
SEC-218
1. (10 pts.) Solve, if possible, the following linear congruences
3x 8
(mod 35)
,k Z
Ans.: x = 26 + 35k
OR
x 26 (mod 35)
We rst nd [31 ]35 aka as 31 (mod 35), by applying

NAME: (print!)
E-Mail address:
MATH 356, Dr. Z. , Exam II, Tue., Nov. 26, 2013, 10:20-11:40am, SEC-218
No Calculators! No Cheatsheets!
Write the nal answer to each problem in the space provided. Incorrect answers (even due
to minor errors) can receive at

Dr. Z.s Number Theory Lecture 11 Handout: The Chinese Remainder Theorem
By Doron Zeilberger
Version of Oct. 7,2013 (a few typos corrected).
Denition: If a and b are integers then
[a, b] := cfw_n Z | a n b
.
Warning: In many number theory books and article

Dr. Z.s Number Theory Lecture 12 Handout: Divisibility Rules and Perpetual Calendar
By Doron Zeilberger
To nd out whether n, given in decimal, is divisible by 3, just add the digits, and see whether it is
divisible by 3, why?
Recall from Lecture 4, that o

Dr. Z.s Number Theory Lecture 15 Handout: Eulers Totient Function
By Doron Zeilberger
Important Denition: If n is a positive integer, then (n) equals the number of integers between
1 and n that are relatively prime to n.
In symbols
(n) := |cfw_1 i n | gcd

\
NAME: (print!)
E-Mail address: \. cam.
MATH 356, Dr. Z. , Exam II, 'Iue., Nov. 26, 2013, 10:20-11:40am, SEC-218
No Calculators! No Cheatsheets!
Write the nal answer to each problem in the space provided. Incorrect answers (even due
to minor errors)

Dr. Z.s Number Theory Lecture 16 Handout: Eulers Theorem and The RSA Encrypton
By Doron Zeilberger
Important Theorem: If a and n are coprime (alias relatively prime) then
a(n) 1
(mod n)
Problem 16.1: Check Eulers theorem for n = 6.
Solution of 16.1: The s

Dr. Z.s Number Theory Lecture 13 Handout: Wilsons Theorem and Fermats little theorem
By Doron Zeilberger
Wilsons Theorem: If n > 1 is a natural number, (n 1)! 1
(mod n) i n is a prime.
Problem 13.1: Check empirically Wilsons theorem for (i) n = 6 and (ii)

Dr. Z.s Number Theory Lecture 14 Handout: Pseudoprimes and Probablistic Primality Tests
By Doron Zeilberger
Recall that Fermats Little Theorem tells you that if p is prime, and a is such that 1 a p 1
then we must have that
ap1 1 (mod p) .
But the converse

Dr. Z.s Number Theory Lecture 1 Handout
By Doron Zeilberger
Natural Numbers
The most natural way to represent natural numbers is in unary notation
1=1 ,
2 = 11
,
3 = 111 ,
4 = 1111 ,
.
How to add two natural numbers?
To nd a + b, simply write-down a (in u

Dr. Z.s Number Theory Lecture 18 Handout: Perfect Numbers and Mersenne Primes
By Doron Zeilberger
Version of Nov. 4, 2013 (correcting a few errors, please discard previous version)
Important Denition: A perfect number is a a positiv integer that equals to

Dr. Z.s Number Theory Lecture 17 Handout: The Number and Sum of Divisors
By Doron Zeilberger
Important Denitions: The number of divisors function, d(n), of a positive integer n is,
obviously
d(n) :=
1
d|n
The sum of divisors of n is, obviously
(n) :=
d
.

Dr. Z.s Number Theory Lecture 4 Handout: Representation of integers; Addition and Multiplication
By Doron Zeilberger
In Lecture 1 we met the unary representation, aka as the cavemans way for representing positive
integers. It is an eective way, i.e. one c

Dr. Z.s Number Theory Lecture 6 Handout: The Fundamental Theorem of Arithmetic
By Doron Zeilberger
The prime numbers are the atoms of multiplication.
Fundamental Theorem of Arithmetic
Every positive integer n can be written uniquely as a product of primes

Dr. Z.s Number Theory Lecture 5 Handout: Prime Numbers, the sieve of Eratosthenes
By Doron Zeilberger
Denition: A prime number is a positive integer (larger than 1) that is only divisible by 1 and
itself.
How to decide whether a positive integer n is prim

Dr. Z.s Number Theory Lecture 3 Handout: Fibonacci numbers
By Doron Zeilberger
The Fibonacci numbers are dened by the initial conditions
F0 = 0 ,
F1 = 1 ,
and for n 2 by
Fn = Fn1 + Fn2
.
Problem 3.1: Write down Fn for 1 n 5
Solution to 3.1:
F2 = F21 + F22

Dr. Z.s Number Theory Lecture 2 Handout: Incomplete and Complete Mathematical Induction
By Doron Zeilberger
Incomplete Induction: Looking at several cases, detecting a pattern, and generalizing.
Problem 2.1: Guess a nice formula for
n
S(n) := 1 + 3 + 5 +

NAME: (print!) bfg _:@i:72 _- _-
EMail address: 3: :izi-
:2
MATH 356, Dr. Z. , Final Exam, Mon., Dec. 23, 2013, 811am, SEC218
Do not write bglgw this line (Cree use only)
14. out of 10
15. out of 10
out of 10
10 if out of 10)
11 1/19 ou

Dr. Z.s Number Theory Lecture 7 Handout: The Greatest Common Divisor
By Doron Zeilberger
Obvious (but Important!) Fact: If a and b are positive integers, then there are non-negative
integers, q and r called the quotient and remainder, respectively, with 0

Dr. Z.s Number Theory Homework assignment 1
1. Using unary (no credit for other methods!), compute
a. 11 + 1111111
b. 111111 + 11
2. Using unary (no credit for other methods!), compute
a. 11 111
b. 1111 1111111
3. Write the integers 0 through 9 in von-Neu

Dr. Z.s Number Theory Lecture 9 Handout: Modular Arithmetics
By Doron Zeilberger
Version of Oct. 3, 2013 (thanks to Josena Mansour, who corrected two typos, or rather
arithematical errors that I committed by doing mental math). She gets a prize of one dol

Solutions to Quiz # 1 for Dr. Z.s Number Theory Course for Sept. 26, 2013
1. (3 points) Convert 51 (written in the usual decimal notation) to to binary, in (i) sparse notation
(ii) dense notation (iii) positional notation.
Sol. to 1.: 25 51 but 26 > 51 so

Dr. Z.s Number Theory Lecture 8 Handout: The Euclidean Algorithm
By Doron Zeilberger
The Original Euclidean Algorithm
Input: Two positive integers a and b, with a > b .
Output: The positive integer gcd(a, b), their greatest common divisor.
If b = 0 then R

NAME: (print!)
E-Mail address:
MATH 356, Dr. Z. , Exam I, Mon., Oct. 14, 2013, 10:20-11:40am, SEC-218
No Calculators! No Cheatsheets!
Write the nal answer to each problem in the space provided. Incorrect answers (even due
to minor errors) can receive at m