© 2009

Elementary Number Theory: Primes, Congruences, and Secrets

A Computational Approach


Part of the Undergraduate Texts in Mathematics book series (UTM)

Table of contents

  1. Front Matter
    Pages 1-9
  2. William Stein
    Pages 1-20
  3. William Stein
    Pages 1-27
  4. William Stein
    Pages 1-20
  5. William Stein
    Pages 1-23
  6. William Stein
    Pages 1-30
  7. William Stein
    Pages 1-25
  8. Back Matter
    Pages 1-18

About this book


The systematic study of number theory was initiated around 300B.C. when Euclid proved that there are infinitely many prime numbers. At the same time, he also cleverly deduced the fundamental theorem of arithmetic, which asserts that every positive integer factors uniquely as a product of primes. Over 1000 years later (around 972A.D.) Arab mathematicians formulated the congruent number problem that asks for a way to decide whether or not a given positive integer n is the area of a right triangle, all three of whose sides are rational numbers. Then another 1000 years later (in 1976), Diffie and Hellman introduced the first ever public-key cryptosystem, which enabled two people to communicate secretly over a public communications channel with no predetermined secret; this invention and the ones that followed it revolutionized the world of digital communication. In the 1980s and 1990s, elliptic curves revolutionized number theory, providing striking new insights into the congruent number problem, primality testing, public-key cryptography, attacks on public-key systems, and playing a central role in Andrew Wiles' resolution of Fermat's Last Theorem.


Today, pure and applied number theory is an exciting mix of simultaneously broad and deep theory, which is constantly informed and motivated by algorithms and explicit computation. Active research is underway that promises to resolve the congruent number problem, deepen our understanding into the structure of prime numbers, and both challenge and improve our ability to communicate securely. The goal of this book is to bring the reader closer to this world. Each chapter contains exercises, and throughout the text there are examples of calculations done using the powerful free open source mathematical software system Sage. The reader should know how to read and write mathematical proofs and must know the basics of groups, rings, and fields. Thus, the prerequisites for this book are more than the prerequisites for most elementary number theory books, while still being aimed at undergraduates.


William Stein is an Associate Professor of Mathematics at the University of Washington. He is also the author of Modular Forms, A Computational Approach (AMS 2007), and the lead developer of the open source software, Sage.


Grad Prime Prime number cryptography number theory

Authors and affiliations

  1. 1.Dept. MathematicsUniversity of WashingtonSeattleU.S.A.

Bibliographic information

  • Book Title Elementary Number Theory: Primes, Congruences, and Secrets
  • Book Subtitle A Computational Approach
  • Authors William Stein
  • Series Title Undergraduate Texts in Mathematics
  • DOI
  • Copyright Information Springer Science+Business Media, LLC 2009
  • Publisher Name Springer, New York, NY
  • eBook Packages Mathematics and Statistics Mathematics and Statistics (R0)
  • Hardcover ISBN 978-0-387-85524-0
  • Softcover ISBN 978-1-4419-2752-1
  • eBook ISBN 978-0-387-85525-7
  • Series ISSN 0172-6056
  • Edition Number 1
  • Number of Pages X, 168
  • Number of Illustrations 45 b/w illustrations, 0 illustrations in colour
  • Topics Number Theory
    Algebraic Geometry
  • Buy this book on publisher's site
Industry Sectors
Finance, Business & Banking


From the reviews:

"This one treats topics that have become standard in recent years … and it has exercises with selected solutions. … it gives the students a tool to do calculations that illustrate even the most abstract concepts, and, simultaneously, introduces them to an open source software that can later be applied profitably for studying research problems. … introducing the reader to a powerful software system." (Franz Lemmermeyer, Zentralblatt MATH, Vol. 1155, 2009)

"The cliché that number theory, ever the purest mathematics, now yields very practical applications barely tells the story. Teach undergraduate number theory today, and students demand to hear about public-key cryptography and related technologies. … Stein (Univ. of Washington) serves undergraduates well by … opening the way by intimating their power. … he frames the sophisticated Birch and Swinnerton-Dyer conjecture as the new canonical challenge for the future. Summing Up: Recommended. All undergraduates students, professionals, and general readers." (D. V. Feldman, Choice, Vol. 47 (2), October, 2009)

"This book is an introduction to elementary number theory with a computational flavor. … Many numerical examples are given throughout the book using the Sage mathematical software. The text is aimed at an undergraduate student with a basic knowledge of groups, rings and fields. Each chapter concludes with several exercises." (Samuel S. Wagstaff Jr., Mathematical Reviews, Issue 2009 i)