The author of this text is William Stein of the University of Washington. He has assigned it to his students at Harvard University, UC San Diego and the University of Washington.

Per his own description, “This is a textbook about prime numbers, congruences, basic public-key cryptography, quadratic reciprocity, continued fractions, elliptic curves, and number theory algorithms. We will mention groups, rings, and fields in passing at various places in this book, but much of the book should be comprehensible without a course in algebra.”

Another site suggested that students attempting this textbook should have a familiarity with groups, rings and fields as well as possess some programming experience.

Textbook available in HTML and PDF. Exercises are included at the end of each chapter with answers and hints.

## Table of Contents for *Elementary Number Theory*

- Prime Numbers
- Prime Factorization
- Primes
- The Greatest Common Divisor
- Numbers Factor as Products of Primes
- The Fundamental Theorem of Arithmetic

- The Sequence of Prime Numbers
- There Are Infinitely Many Primes
- Enumerating Primes
- The Largest Known Prime
- Primes of the Form ax+b
- How Many Primes are There?

- Prime Factorization
- The Ring of Integers Modulo n
- Congruences Modulo n
- Linear Equations Modulo n
- Fermat’s Little Theorem
- Wilson’s Theorem

- The Chinese Remainder Theorem
- Multiplicative Functions

- Quickly Computing Inverses and Huge Powers
- How to Solve ax=1 (mod n)
- How to Compute am (mod n)

- Primality Testing
- The Structure of (Z/pZ)
- Polynomials over Z/pZ
- Existence of Primitive Roots
- Artin’s Conjecture
- Computing Primitive Roots

- Congruences Modulo n
- Public-Key Cryptography
- The Diffie-Hellman Key Exchange
- The Discrete Log Problem
- Realistic Diffie-Hellman Example
- The Man in the Middle Attack

- The RSA Cryptosystem
- How RSA works
- Encoding a Phrase in a Number
- Some Complete Examples

- Attacking RSA
- Factoring n Given [epsilon](n)
- When p and q are Close
- Factoring n Given d
- Further Remarks

- The Diffie-Hellman Key Exchange
- Quadratic Reciprocity
- Statement of the Quadratic Reciprocity Law
- Euler’s Criterion
- First Proof of Quadratic Reciprocity
- Euler’s Proposition
- Proof of Quadratic Reciprocity

- A Proof of Quadratic Reciprocity Using Gauss Sums
- Proof of Quadratic Reciprocity

- Finding Square Roots

- Continued Fractions
- Finite Continued Fractions
- Partial Convergents
- The Sequence of Partial Convergents
- Every Rational Number is Represented

- Infinite Continued Fractions
- The Continued Fraction Procedure
- Convergence of Infinite Continued Fractions

- The Continued Fraction of e
- Preliminaries
- Two Integral Sequences
- A Related Sequence of Integrals
- Extensions of the Argument

- Quadratic Irrationals
- Periodic Continued Fractions
- Continued Fractions of Algebraic Numbers of Higher Degree

- Recognizing Rational Numbers From Their Decimal Expansion
- Sums of Two Squares

- Finite Continued Fractions
- Elliptic Curves
- The Definition
- The Group Structure on an Elliptic Curve
- Integer Factorization Using Elliptic Curves
- Pollard’s (p-1) -Method
- Motivation for the Elliptic Curve Method
- Lenstra’s Elliptic Curve Factorization Method
- Examples
- A Heuristic Explanation

- Elliptic Curve Cryptography
- Elliptic Curve Analogues of Diffie-Hellman
- The ElGamal Cryptosystem and Digital Rights Management
- The Elliptic Curve Discrete Logarithm Problem

- Elliptic Curves Over the Rational Numbers
- The Torsion Subgroup of E(Q) and the Rank
- The Congruent Number Problem

View this Free Online Material at the source:

Elementary Number Theory