0

When m>a, this question is relatively easy (i.e. 101 mod 4620 --> inverse is 1601)

My steps for doing this are as follows:

  1. Run the Euclidean algorithm to find Bezout coefficients s and t.
  2. I find that 1 = (-35)4620 + 1601(101)

From this, I find that the 1601 coefficient is the modular inverse of 101 mod 4620.

Running this same algorithm for 4620 mod 101 doesn't seem to work though. The answer isn't -35. It's 66. Why? Where did this come from? What extra steps do I need to solve this problem?

Bill Dubuque
  • 282,220

1 Answers1

0

$a$ is always (or can be assumed to be) less than $m$. For any integer $a$ you can write $a=a'\pmod m$ for a unique $a'$ with $0\le a'<m$. And $-35=66\pmod{101}$.

pancini
  • 20,030