As described on Wikipedia:
abmodn=((amodn)(b−1modn))modn
When I apply this formula to the case (1023/3)mod7:
(1023/3)mod7=((1023mod7)((1/3)mod7))mod7=(1⋅(1/3))mod7=(1/3)mod7=1/3
However, the real answer should be (341)mod7=5.
What am I missing? How do you find (a/b)modn correctly?
Answer
13mod7=3−1mod7
You need to solve below for finding 3−1mod7 : 3x≡1(mod7)
Find an integer x that satisfies the above congruence
No comments:
Post a Comment