I'm going to employ maximum cheating on this one.......
Using the Euclidian algorithm, we have
1027 = 1(712) + 315
712 = 2(315) + 82
315 = 3(82) + 69
82 = 1(69) + 13
69 = 5(13) + 4
13 = 3(4) + 1
4 = 4(1) + 0
1 2 3 1 5 3 4
1 0 1 2 7 9 52 165 712
0 1 1 3 10 13 75 238 1027
Take the determinant of 165 712
238 1027 = -1
So.....
1027(165) - 712(238) = - 1 but...we need a "+1 " .....so......multiplying through by -1, we have
1027(-165) + 712(238) = 1
So....x = -165 and y = 238....however.....this is only one solution.....the general solution is given by
x , y = [ (-165 + 712k), (238 - 1027k) ]
