What the rest of the division $5^{21}$ by $127$?
Asked
Active
Viewed 136 times
3
-
1I think the word you want is "remainder". – MJD Aug 13 '13 at 19:17
-
1This looks good to me. – Alex Wertheim Aug 13 '13 at 19:17
-
1If by "rest" you mean remainder, then yes. – Aug 13 '13 at 19:17
-
Yes, I'm Brazilian – benjamin_ee Aug 13 '13 at 19:18
-
1(+1) You should remove your work from the question and make it an answer. This cuts down on the unanswered questions on the site, and I know I'll be glad to upvote the answer. It is explicitly permitted (even encouraged) to answer your own questions here, though you won't be able to accept it for three days. – Cameron Buie Aug 13 '13 at 19:22
-
@CameronBuie Okay, thanks for the tip. – benjamin_ee Aug 13 '13 at 19:24
1 Answers
9
Answer:$$5^{21}=(5^3)^7\\5^3=125 \\125\equiv-2\pmod{127} \\125\equiv-2\pmod{127} \\(5^3)^7\equiv(-2)^7\pmod{127} \\5^{21}\equiv-128\pmod{127} \\5^{21}\equiv-1\pmod{127} \\5^{21}\equiv126\pmod{127}$$
Soon, the rest is 126

benjamin_ee
- 3,759