Math 25

Number Theory

Instructor: Carl Pomerance (carl.pomerance at

Abstract | Classes | Tutorials | Staff | Textbook | Grading | News and current assignment | Past assignments | Exams | Honor Code


The final exam is on Saturday, December 6 from 8 AM to 11 AM in our classroom.
Calculators are permitted.

Here are exam solutions.

There is a revised policy on grading, see the explanation below.

Revised office hours for the week of December 1:
Tuesday through Friday 9 AM to 11 AM, and by appointment.


This course is an introduction to number theory. Eric Temple Bell once said that mathematics is the "queen of science" and number theory is the "queen of mathematics." Royalty aside, number theory is downright interesting, accessible, and useful. We will discuss unique factorization into primes and modular arithmetic, with applications in cryptography. Other topics will be broached as time and interest allows.

Here is a tentative syllabus:

1. Divisibility
3 lectures, Jones and Jones Ch. 1.

2. Prime numbers
3 lectures, Jones and Jones Ch. 2.

3. Congruences
4 lectures, Jones and Jones Ch. 3.

4. Congruences with a prime-power modulus
2 lectures, Jones and Jones Ch. 4.

5. Euler's function
2 lectures, Jones and Jones Ch. 5.

6. The group of units
4 lectures, Jones and Jones Ch. 6.

7. Quadratic residues
3 lectures, Jones and Jones Ch. 7.

8. Arithmetic functions
4 lectures, Jones and Jones Ch. 8.


Room: 004 Kemeny
Lectures: Monday-Wednesday-Friday 11:15 am--12:20 pm (11 hour)
X-hour: Tuesday 12:00 noon - 12:50pm


There may be occasional tutorials during our x-period, Tuesdays, 12 noon - 12:50 PM, in our classroom


Carl Pomerance -- 339 Kemeny / Tel. 6-2635
Office hours: Tuesday, Wednesday, Thursday 9:00 AM--9:55 AM and by arrangement at other times.
Homework grader:
Alan Faubert, '11


Gareth A. Jones and J. Mary Jones
Elementary Number Theory, Springer.

This book is available from Wheelock Books and elsewhere.


Homework is due at the start of the class period on the due date. Late homework is not accepted unless there is a prior arrangement.
Homework will be generally due once per week on Mondays.
Assignments will be posted on this website, with extra problems and/or comments added as the week progresses.

Past assignments

Homework due Friday, November 21 is posted here.

Homework for Monday, November 10 is posted here.

Homework for Monday, November 3 is posted here.
Note that a solution to problem 8 is now posted with this assignment.

Homework for Monday, October 27 is posted here.

Homework for Monday, October 20 is posted here.
Comments: We did not get to discuss strong pseudoprimes yet, so delete that word from problem 8.
A hint on problem 7: Assume not and show that there is a unique element of order 2 (terminology from problem 3); but on the other hand, show there are at least 3 elements of order 2.
On problem 1, I forgot to mention that u, v are positive integers.

Homework due Monday, October 13:
1. Describe the integers n for which 3n ≡ 5 (mod 7).

2. Describe the integers n for which 3n ≡ 6 (mod 12).

3. Describe the integers n for which both n ≡ 1 (mod 10) and n ≡ 0 (mod 11).

4. Describe the integers n for which both n ≡ 1 (mod 4) and n ≡ 3 (mod 6).

5. Describe the integers n for which both n ≡ 2 (mod 4) and n ≡ 3 (mod 6).

6. Call a positive integer n special if the congruence x2 ≡ 1 (mod n) has exactly two solutions modulo n. For example, 3 is special since the solutions are 1 and 2 modulo 3, while 2 is not special, since there is just the one solution 1 modulo 2. Find the special numbers up to 20.

7. Using the terminology of problem 6, formulate and prove a characterization of the special numbers. Your proof should have two parts: show that the numbers you say are special actually are special, and show that the numbers you say are not special actually are not special. (So this hard problem is actually 3 problems: the formulation of the conjecture, the proof of one side of the conjecture, and the proof of the other side of the conjecture. You should use only tools from Chapter 3 or earlier in our book.

8. Prove that there is an integer n such that n is divisible by 2, n+1 is divisible by 3, n+2 is divisible by 5, n+3 is divisible by 7, and n+4 is divisible by 11. (You need not exhibit such a number.)

Homework due Monday, October 6:
1. Find the least common multiple of the integers up to 10.
2. Describe the integer solutions to the equation 15x+19y=4.
3. If a, b are coprime positive integers, prove that each integer n>ab-a-b can be written in the form ax+by with x, y nonnegative integers. But ab-a-b cannot be so written.
4. Show that if a, b, c are positive integers then [a,b,c]=abc(a,b,c)/((a,b)(a,c)(b,c)) by using the Fundamental Theorem of Arithmetic and the functions vp. (Recall that vp(n) is the exponent on p in the prime factorization of n.)
5. Show that there are infinitely many primes that leave the remainder 5 when divided by 6.
6. Show that if n is a sufficiently large integer, then below 10n there is a run of at least n consecutive numbers that are composite. (You are allowed to assume the Prime Number Theorem.)

Homework assignment due Monday, September 29.
1. Use Euclid's algorithm to find gcd(1234,4321).
2. Use Euclid's algorithm to find integers u,v as in Bezout's identity for 1234 and 4321.
3. Suppose a,b are integers not both zero. Show that each common divisor of a,b divides (a,b).
4. Let n be an integer. Show that the set of integers coprime with n are closed under multiplication. (That is, the product of any two of them is also coprime with n.)


There will be two midterm exams, held in the evenings of Wednesday, October 15 (topics 1, 2, 3) and Wednesday, November 12 (topics 4, 5, 6) from 7:00 pm to 9:00 pm. I will attempt to construct the exams to be doable in 60 minutes; the extra hour is to help with possible scheduling conflicts, but I will allow you to spend the full two hours if you wish.

The (cumulative) final exam will be held on Saturday, December 6, from 8:00 am to 11:00 am in our Kemeny classroom.


Special grading policy: There are 4 grades that will count towards your final average, namely the two midterms, the cumulative homework grade, and the final exam. If you attend at least one of Ken Ono's lectures (preferably the one Tuesday evening, November 18, 7 pm, Kemeny 008), the lowest of these grades, call it L, will be replaced by the maximum of L+5 and (L+90)/2. After this alteration, your final average will be figured as follows: if the lowest grade is one of the midterms or the homework, it will be dropped and your final average will be the average of the remaining 3 grades, with the final exam weighted as double; if the lowest grade is the final exam, the final average will be the straight average of the 4 grades. If you go to one or both of Ono's lectures, please inform me that you did this.

Honor Code

Students are encouraged to work together to do homework problems. What is important is a student's eventual understanding of homework problems, and not how that is achieved. The honor principle applies to homework in the following way. What a student turns in as a homework solution is to be his or her own understanding of how to do the problem. Students must state what sources they have consulted, with whom they have collaborated, and from whom they have received help. Students are discouraged from using solutions to problems that may be posted on the web, and as just stated, must reference them if they use them. The solutions you submit must be written by you alone. Any copying (electronic or otherwise) of another person's solutions, in whole or in part, is a violation of the Honor Code.

The honor principle applies to exams as follows: Students may not give or receive assistance of any kind on an exam from any person except for the professor or someone explicitly designated by the professor to answer questions about the exam. Students may not use library or internet sources on take-home exam problems, but they may use their textbook and personal notes.

If you have any questions as to whether some action would be acceptable under the Academic Honor Code, please speak to me, and I will be glad to help clarify things. It is always easier to ask beforehand than to have trouble later!


I encourage any students with disabilities, including "invisible" disabilities such as chronic diseases and learning disabilities, to discuss appropriate accommodations with me, which might help you with this class, either after class or during office hours. Dartmouth College has an active program to help students with disabilities, and I am happy to do whatever I can to help out, as appropriate.

The Student Disabilities Coordinator, Nancy Pompian, can be reached at 6-2014 if you have any questions. Any student with a documented disability requiring academic adjustments or accommodations is requested to speak with me by the end of the second week of the term. All discussions will remain confidential, although the Academic Skills Center may be consulted to verify the documentation of the disability and advise on an appropriate response to the need. It is important, however, that you talk to me soon, so that I can make whatever arrangements might be needed in a timely fashion.