MATS 4217 Tutorial 4
MATS 4217 Tutorial 4
1. (a) Explain why the statement “one-fifth of all numbers are congruent to 2 modulo 5” makes sense
by using the counting function
(b) Explain why the statement “most numbers are not squares” makes sense by using the counting
function
S(x) = #{square numbers less than x}.
Find a simple function of x that is approximately equal to S(x) when x is large.
2. (a) Check that every even number between 70 and 100 is a sum of two primes.
(b) How many different ways can 70 be written as a sum of two primes 70 = p + q with p ≤ q?
Same question for 90? Same question for 98?
3. The number n! (n factorial) is the product of all numbers from 1 to n. For example, 4! = 1·2·3·4 = 24
and 7! = 1 · 2 · 3 · 4 · 5 · 6 · 7 = 5040. If n ≥ 2, show that all the numbers
n! + 2, n! + 3, n! + 4, · · · , n! + (n − 1), n! + n
4. (a) Do you think there are infinitely many primes of the form N 2 + 2?
(b) Do you think there are infinitely many primes of the form N 2 − 2?
(c) Do you think there are infinitely many primes of the form N 2 + 3N + 2?
(d) Do you think there are infinitely many primes of the form N 2 + 2N + 2?
5. The Prime Number Theorem says that the number of primes smaller than x is approximately x/ ln(x).
This exercise asks you to explain why certain statements are plausible. So do not try to write down
formal mathematical proofs. Instead, explain as convincingly as you can in words why the Prime
Number Theorem makes each of the following statements reasonable.
(a) If you choose a random integer between 1 and x, then the probability that you chose a prime
number is approximately 1/ ln(x).
(b) If you choose two random integers between 1 and x, then the probability that both of them are
prime numbers is approximately 1/(ln x)2 .
(c) The number of twin primes between 1 and x should be approximately x/(ln x)2 . [Notice that
this explains the conjectured limit formula for the twin prime counting function T (x).]
6. (This exercise is for people who have taken some calculus.) The Prime Number Theorem says that
the counting function for primes, π(x), is approximately equal to R xx/ ln(x) when x is large. It turns
out that π(x) is even closer to the value of the definite integral 2 dt/ ln(t).
(a) Finish the proof of Korselt’s Criterion by proving that p − 1 divides n − 1. [Hint. We will prove
in Chapter 28 that for every prime p there is a number g whose powers g, g 2 , g 3 , · · · , g p−1 are
all different modulo p. (Such a number is called a primitive root.) Try putting a = g into the
Carmichael congruence an = a (mod n).]
n
(b) Prove that p − 1 actually divides the smaller number p − 1.
8. Are there any Carmichael numbers that have only two prime factors? Either find an example or
prove that none exists.
9. Use Korselt’s Criterion to determine which of the following numbers are Carmichael numbers.
10. Suppose that k is chosen so that the three numbers are all prime numbers.
6k + 1, 12k + 1, 18k + 1
(a) Prove that their product n = (6k + 1)(12k + 1)(18k + 1) is a Carmichael number.
(b) Find the first five values of k for which this method works and give the Carmichael numbers
produced by the method.
(a) Write a computer program that uses Korselt’s Criterion to check if a number n is a Carmichael
number.
(b) Earlier we listed all Carmichael numbers that are less than 10, 000. Use your program to extend
this list up to 100, 000.
(c) Use your program to find the smallest Carmichael number larger than 1, 000, 000.
269 (mod 1105), 22·59 (mod 1105), 24·59 (mod 1105), 28·69 (mod 1105),
14. (cmpt) Program the Rabin-Miller test with multiprecision integers and use it to investigate which of
the following numbers are composite.
(a) 155196355420821961
(b) 155196355420821889
(c) 285707540662569884530199015485750433489
(d) 285707540662569884530199015485751094149