I understand how to solve for k for something like 2k≡4mod16. This would become k≡2mod8. But how would I solve for k for something like 3k≡1mod16?
Answer
If you have 2k\equiv 4 \pmod {16}, then for some integer m,
2k=16m+4
which means k=8m+2. Now if you have 3k\equiv 1\pmod{16}, we can multiply by 5 to get
15k\equiv -k\equiv 5 \pmod {16}
and thus
k\equiv -5\equiv 11\pmod{16}
Or k=16m+11.
In general, a has a multiplicative inverse mod p iff (a,p)=1.
No comments:
Post a Comment