Given a, b, n > 0; find x.
Let d = gcd(a, n)
Solvable iff d b
Theorem 33.23 If d b and d = ax' + ny' (as computed by Extended-Euclid) then one solution is x0 = x'(b/d) mod n.
Theorem 33.24 Given one solution x0, there are exactly d distinct solutions, modulo n, given by for i = 0, 1, 2, , d-1.