Using Euclids Extended Algorithm:
Calculate x and y in Bézout's Identity
using (5,66)
For 2 numbers a and b and divisor d:
ax + by = d
a math | a | b math | b | d math | d | k math | k |
---|---|---|---|---|---|---|---|
Set to 1 | 1 | Set to 0 | 0 | 5 | |||
Set to 0 | 0 | Set to 1 | 1 | 66 | Quotient of 5/66 | 0 | |
1 - (0 x 0) | 1 | 0 - (0 x 1) | 0 | Remainder of 5/66 | 5 | Quotient of 66/5 | 13 |
0 - (13 x 1) | -13 | 1 - (13 x 0) | 1 | Remainder of 66/5 | 1 | Quotient of 5/1 | 5 |
1 - (5 x -13) | 66 | 0 - (5 x 1) | -5 | Remainder of 5/1 | 0 | Quotient of 1/0 | 0 |
a = -13 and b = 1
ax + by = gcd(a,b)
5x + 66y = gcd(5