Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2014/ia/paper-4/1e/solution

The Euclidean algorithm gives
Thus the greatest common divisor is . The extended Euclidean algorithm reverses these divisions:
This supplies the Bezout identity with , .
To obtain all solutions of a linear Diophantine equation, subtract this particular solution from any other and divide by . The result is . Since and are coprime integers, divides , giving
Every displayed pair satisfies the original linear Diophantine equation, so the parametrization is exhaustive.
For the modular arithmetic calculation, , so is the modular inverse of . Multiplication gives . The admissible integers are for , ending at ; the next is . There are such integers.

New to topics? Read the docs here!