# Math Help - Units Mod N

1. ## Units Mod N

ive got the answer to this question, but it took a lot of time and was very tedious. i just want to know if there is a nice quick solution so when i hand in the worksheet it doesnt look a mess.

the question is

calculate 17^-1 in Z43 (integers mod 43)

i just did multiplication tables for both and found when 43r -17s = 1 but its not a really 'nice' method. thanks for ur time

2. Originally Posted by mathmonster
ive got the answer to this question, but it took a lot of time and was very tedious. i just want to know if there is a nice quick solution so when i hand in the worksheet it doesnt look a mess.

the question is

calculate 17^-1 in Z43 (integers mod 43)

i just did multiplication tables for both and found when 43r -17s = 1 but its not a really 'nice' method. thanks for ur time
We want to find $17x - 43 y = 1$ for integers $x,y$.

Use Euclidean algorithm,
$43 = 2\cdot 17 + 9$
$17 = 1\cdot 9 + 8$
$9 = 1\cdot 8 + 1$

Working backwards,
$1 = 9- 8 = 9 - (17 - 9) = 2\cdot 9 - 17 = 2(43 - 2\cdot 17) - 17 = 2\cdot 43 - 5\cdot 17$

Thus, the inverse is $- 5\equiv 38$.