Solution to Use the Euclidean algorithm to compute (2059, 2581) and to express this quantity as a … - Sikademy

Nov. 28, 2020

Archangel Macsika Sikademy Image

Archangel Macsika

Use the Euclidean algorithm to compute (2059, 2581) and to express this quantity as a linear combination of 2059 and 2581.

Solution

2581 = 1 · 2059 + 52

2059 = 3 · 522 + 49

522 = 1 · 493 + 2

493 = 17 · 29 + 0

and so (2059, 2581) = 2.

We thus can write

29 = 522 − 493 = 522 − (2059 − 3 · 522) = 4 · 522 − 20

and so

29 = 4(2581 − 2059) − 2059 = 4 · 2581 − 5 · 205.

If you would like to see a different solution or an implementation in a different programming language Kindly let us know