This textbook is a one-semester introduction to number theory that uses the computer as a tool for motivation and explanation. The accompanying CD-ROM contains Mathematica files with all the commands and programs. The reader should be able to get on the computer quickly to begin doing personal experiments with the patterns of the integers. The presentation of the theoretical structure of number theory is integrated tightly with these explorations, arising out of them to confirm, explain, or deny what is observed experimentally, and feeding back into them to enable deeper and more sophisticated investigations.
The efficiency of algorithms is always at the forefront as the book presents and explains many of the fastest algorithms for working with integers. This book covers the traditional topics, but also takes advantage of powerful software to explore factoring algorithms, primality testing, the RSA public-key cryptosystem, and unusual applications such as check digit schemes and a computation of the energy that holds a salt crystal together. Advanced topics include continued fractions, Pell's equation, and the Gaussian primes.