# [SOLVED] Finding the last two digits of a number raised to a large exponent

• August 2nd 2009, 11:04 AM
diddledabble
[SOLVED] Finding the last two digits of a number raised to a large exponent
Okay so if you are given $7^{999}$ how would you figure out the last two digits of the munber using mod.
• August 2nd 2009, 11:44 AM
running-gag
Quote:

Originally Posted by diddledabble
Okay so if you are given $7^{999}$ how would you figure out the last two digits of the munber using mod.

Hi

You need to find $7^{999} mod 100$
• August 2nd 2009, 11:48 AM
diddledabble
But how do you work through it. I did it for $7^9999$ and got 143 but I am not confident on my steps. I don't want anyone to solve my homework. That is why I altered my question to $7^999$. I just need a good detailed step by step explanation. Thanks
• August 2nd 2009, 01:22 PM
o_O
Use Euler's theorem: $(a,m) = 1 \ \Rightarrow a^{\phi(m)} \equiv 1 \ (\text{mod } m)$ where $m \geq 1$

So we know: $\phi (100) = \phi \left(2^2 \cdot 5^2\right) = \cdots = 40$

Thus: $7^{40} \equiv 1 \ (\text{mod } 100)$

Now use the property: $a \equiv b \ (\text{mod } m) \ \Rightarrow \ a^n \equiv b^n \ (\text{mod } m)$
• August 2nd 2009, 01:52 PM
Soroban
Hello, diddledabble!

Quote:

Find the last two digits of: . $7^{999}$
Consider the two-digit endings of consecutive powers of 7 . . .

. . $\begin{array}{c|c}
\text{Power} & \text{Ends in} \\ \hline
7^1 & 07 \\ 7^2 & 49 \\ 7^3 & 43 \\ 7^4 & 01 \\ 7^5 & 07 \\ 7^6 & 49 \\ \vdots & \vdots \end{array}$

The endings form a four-step cycle: . $\{07, 49, 43, 01\}$

Since $999 \equiv 3 \text{(mod 4)},\;7^{999}$ has the third ending: . $43$

• August 4th 2009, 02:28 PM
diddledabble
Soroban,
Your answer was sooo easy to understand. Just what I was looking for.