Mathematica Notebooks:
The following Mathematica notebooks are made available for use
with the textbook Number Theory with Computer Applications. The code
is intented solely for educational use.
Chapter 2: Divisibility and Primes:
-
GCD Examples This notebook contains implementation
of different algorithms for computing GCD and some examples, including
an experiment on the frequency of quotients in the Euclidean algorithm.
-
Sieve of Eratosthenes An implementation
of the Sieve of Eratosthenes along with the application to a simple primality
test.
-
Factoring by Trial Division Demonstrates
the simplest factoring method.
Chapter 3: Congruences
Chapter 5: Cryptography
-
Basic Routines A collection of Mathematica
functions to simplify the frequency analysis of characters and digrams
and trigrams for section 5.1
Chapter 6: Primality Testing and Factoring
Chapter 11: Continued Fractions