Prime Numbers: Exercises
Prime Numbers: Exercises
1. Use the Sieve of Eratosthenes to find all primes less than 200.
2. Suppose that p, q, r, s are four distinct primes. Could pq = rs? Why or why
not?
5. Prove rigorously that 397 is prime. (You may use a calculator to carry out
the division algorithm, but construct a proof in which the number of divisions
is minimum.)
(a) 4800
(b) 2012
(c) 371
(d) 220 − 1 = 1048575.
9. If n is an even positive integer, how many primes are there of the form 2n − 1?
10. How many primes can be written in the form a3 − 1, where a is an integer?
12. Which primes, if any, can be written in the form a4 −b4 for integers a, b? Prove
your answer.
13. If p is a prime, how many positive divisors does pn have? Prove your answer.
15. Suppose that a = pu1 1 pu2 2 · · · puk k and b = pv11 pv22 · · · pvkk , where p1 , . . . , pk are
mk
distinct primes. Show that gcd(a, b) = pm 1 m2
1 p2 · · · pk , where mj = min(uj , vj )
for each j = 1, . . . , k.
1
16. Use the result of the previous problem to compute the following:
17. Show that if p, q are distinct primes then pr and q s are relatively prime for
any positive integers r, s.
n
18. Define Gn = 22 − 1, for each positive integer n.
20. Show that p(x) = x2 − x + 41 is prime for all x = 1, 2, 3, . . . , 40. What does
this imply about p(41)? Is p(41) prime?
(a) 2279
(b) 11413.
23. According to the famed prime number theorem, what is the approximate num-
ber of primes ≤ 100, 000? How about the approximate number of primes not
exceeding one million?