Say I have a problem like 2^191 divided by 5, how can I solve this using only modular arithmetic?
Can some explain how modular arithmetic works
0
$\begingroup$
modular-arithmetic
arithmetic
-
1Tell us what you know about modular arithmetic and how you got started. Can you solve the problem for a few smaller exponents? Give it a try, report by editing your question. Then maybe we can help instead of downvoting. – 2017-02-14
-
1It helps to note that $2^4\equiv 1 \pmod 5$. Can you take it from there? – 2017-02-14
-
0and why 2^4≡1(mod5) do you convert to binary form to know that? – 2017-02-14
-
0Just write it down! $2^4=16$ and $16=15+1$. – 2017-02-14
-
0ok thanks but why 15+1, why not 14+2? – 2017-02-14
-
0@Simon We want $\mod 5$, not $\mod 14$ or $\mod 7$. – 2017-02-14
-
0I think you need to review the basic definitions. I'm sure whatever text you are using goes over these things. – 2017-02-14
-
0so does 15 represent the time occurring of 5? wtch is 3 times? – 2017-02-14
1 Answers
2
Here note that $2^4\equiv 1 \pmod 5 \implies (2^4)^{47} \equiv 1^{47} \pmod 5 \implies (2^4)^{47} \times 2^3 \equiv 1^{47} \times 8 \pmod 5 \\ \implies 2^{191} \equiv 3\pmod 5. $
$2^4 = 16 = 15+1$.
-
0thanks but how did you get 2^4 to =1? – 2017-02-14
-
0@Simon $16 \equiv 1 \pmod {5}$. – 2017-02-14
-
0@Simon Have your learned yet about the *order* of an invertible element $a$ mod $n,\,$ i.e. the least natural number $k$ such that $\,a^{\large k}\equiv 1\pmod n\,?\ \ $ – 2017-02-14
-
0@BillDubuque no, Im at the very begning at this – 2017-02-14