bendaddy
- 4
- 0
Homework Statement
Use Fermat's Little Theorem to calculate 18^{802}(mod29)
Homework Equations
Fermat's Little Theorem: a^{p-1}\equiv1(modp)
where in this case, a=18 and p=29
The Attempt at a Solution
By FLT, I found that 18^{28}\equiv1(mod29)
So, 18^{802}\equiv(18^{28})^{28.5}*18^{4}(mod29)\equiv18^{4}(mod29)\equiv25(mod29)
So my solution is 25(mod29).
However, the solution my professor posted is 4(mod29) (**NOT -4(mod29)**). Pretty confused here... Is there something wrong in my logic?