For example, what is the last digit of 17^(3241)? It would help a ton if someone could show how to solve this using Fermat's Little Theorem. I have finals coming up and this was something I never quite understood

- Dec 11th 2009, 01:45 PMsteph3824How do you find the last digit of a number using Fermat's Little Theorem
For example, what is the last digit of 17^(3241)? It would help a ton if someone could show how to solve this using Fermat's Little Theorem. I have finals coming up and this was something I never quite understood

- Dec 12th 2009, 03:18 AMCaptainBlack
I'm not sure why one would need Fermat's little theorem for this since:

$\displaystyle 17^3 \equiv 1 \text{ mod } 10$

and:

$\displaystyle 17^{3241}=(17^3)^{1080}\times 17$

which immediately should tell you that:

$\displaystyle 17^{3241}\equiv 7 \text{ mod } 10$

CB - Dec 12th 2009, 04:40 AMalexmahone
- Dec 12th 2009, 11:24 AMCaptainBlack
- Dec 13th 2009, 05:52 AMawkward
Here is a solution via Fermat's Last Theorem (although it's not necessarily the simplest):

By Fermat's Last Theorem, $\displaystyle 17^4 \equiv 1 \mod 5$,

so since

$\displaystyle 17^{3241} = (17^4)^{810} \cdot 17$,

$\displaystyle 17^{3241} \equiv 1 \cdot 17 \equiv 2 \mod 5$.

We also have $\displaystyle 17 \equiv 1 \mod 2$, so $\displaystyle 17 ^ {3241} \equiv 1 \mod 2$.

Since $\displaystyle 17^{3241} \equiv 2 \mod 5$ and $\displaystyle 17 ^ {3241} \equiv 1 \mod 2$,

$\displaystyle 17^{3241} \equiv 7 \mod 10$.

We could use the Chinese Remainder Theorem at the last step, but it seems like overkill here.