670 notes - Department of Mathematics

An integer k has an inverse mod n k and n are relatively prime. Proof. One direction is easy. In the other direction, suppose that k and n are relatively prime. ... Here is a list of all possible sequences of invariant factors: 1008 168, 6 504, 2 126, 2, 2, 2 336, 3 84, 12 252, 4 84, 6, 2 252, 2, 2 42, 6, 2, 2 ................
................