Answer
gcd( 4158, 1568 ) = 14
The linear combination of 4158 and 1568 is :
14 = –23(4158) + 61(1568)
Work Step by Step
First, caculate the gcd( 4158, 1568 )
4158 = 1568 * 2 + 1022
1568 = 1022 * 1 + 546
1022 = 546 * 1 + 476
546 = 476 * 1 + 70
476 = 70 * 6 + 56
70 = 56 * 1 + 14
56 = 14 * 4 + 0
Therefore, the gcd( 4158, 1568 ) = 14
Then, express 14 as a linear combination of 4158 and 1568 using the extended Euclidean algorithm :
14 = 70 * 1 – 56 * 1
= 70 – ( 476 – 70 * 6 ) * 1
= 476 * (–1) + 70 * 7
= 476 * (–1) + ( 546 – 476 * 1 ) * 7
= 546 * 7 + 476 * (–8)
= 546 * 7 + ( 1022 – 546 * 1 ) * (–8)
= 1022 * (–8) + 546 * 15
= 1022 * (–8) + ( 1568 – 1022 * 1 ) * 15
= 1568 * 15 + 1022 * (–23)
= 1568 * 15 + (4158 – 1568 * 2 ) * (–23)
= 4158 * (–23) + 1568 * 61
Therefore, the linear combination of 4158 and 1568 is :
14 = –23(4158) + 61(1568)