- #1
bendaddy
- 4
- 0
Homework Statement
Use Fermat's Little Theorem to calculate 18[itex]^{802}[/itex](mod29)
Homework Equations
Fermat's Little Theorem: a[itex]^{p-1}[/itex][itex]\equiv[/itex]1(modp)
where in this case, a=18 and p=29
The Attempt at a Solution
By FLT, I found that 18[itex]^{28}[/itex][itex]\equiv[/itex]1(mod29)
So, 18[itex]^{802}[/itex][itex]\equiv[/itex](18[itex]^{28}[/itex])[itex]^{28.5}[/itex]*18[itex]^{4}[/itex](mod29)[itex]\equiv[/itex]18[itex]^{4}[/itex](mod29)[itex]\equiv[/itex]25(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?