Chapter 6 - Special Congruences
Introductory Example
+---+------+-------------------+
| k | 3^k | ones digit of 3^k |
+===+======+===================+
| 1 | 3 | 3 |
+---+------+-------------------+
| 2 | 9 | 9 |
+---+------+-------------------+
| 3 | 27 | 7 |
+---+------+-------------------+
| 4 | 81 | 1 |
+---+------+-------------------+
| 5 | 243 | 3 |
+---+------+-------------------+
| 6 | 729 | 9 |
+---+------+-------------------+
| 7 | 2187 | 7 |
+---+------+-------------------+
| 8 | 6561 | 1 |
+---+------+-------------------+
Example 6.5
+-----+-------------+
| t | 3^t mod 221 |
+=====+=============+
| 1 | 3 |
+-----+-------------+
| 2 | 9 |
+-----+-------------+
| 4 | 81 |
+-----+-------------+
| 8 | 152 |
+-----+-------------+
| 16 | 120 |
+-----+-------------+
| 32 | 35 |
+-----+-------------+
| 64 | 120 |
+-----+-------------+
| 128 | 35 |
+-----+-------------+
Euler's phi function
We verify the calculation in Example 6.15 with the built-in Euler phi function.
320