2

Problem:

Find the last $2$ digits of $7^{2008}$.

Unfortunately I have no idea how to solve this problem. I know that for the last digit, we have to apply the concept of cyclicity, but I'm not aware of how to extend this to the last $2$ digits. I would be truly grateful for any help. Many thanks in advance!

  • 3
    Try the first few exponents modulo 100. – stochasticboy321 Sep 29 '15 at 15:42
  • 2
    How can a question about the last two digits of $7^{2008}$ be a duplicate of a question about the last two digits of $7^{81}$??? At best, they would have similar answers. This community is developing a rather bad habit of closing down questions!!! – barak manos Sep 30 '15 at 15:37

5 Answers5

12

Just a clarification to Subhadeep's answer in case it is confusing.

Let us first build a small table with everything larger than 100 in parentheses: $$\begin{array}{lr}7^0 = &1\\ 7^1 =& 7\\ 7^2 =& 49\\ 7^3 =& (3)43\\ 7^4 =& (24)01\\ \end{array}$$

So we see that after 4 we get "back" to 1. This means $7^{4k}$ will end in 01 for all $k$. So if we can calculate the exponent modulo 4 we can see which of 01,07,49,43 it will be.

As the exponent 2008 is divisible by 4 it must be "01".

mathreadler
  • 25,824
11

$$7^4\equiv 01\pmod {100}\\\implies (7^4)^{502}\equiv (01)^{502}\pmod {100}\\\implies 7^{2008}\equiv 01\pmod {100} $$.

Hence the last two digits are $01$.

6

Hint: $~7^{2008}=49^{1004}=(50-1)^{1004}.~$ Now expand using the binomial theorem, and notice that all terms except for the first two are multiples of $50^2$, and therefore of $100$.

Lucian
  • 48,334
  • 2
  • 83
  • 154
3

Since $7$ and $100$ are coprime with respect to each other, you can use Euler's theorem:

  • $7^{\phi(100)}\equiv1\pmod{100}$
  • $\phi(100)=\phi(2^2\cdot5^2)=2\cdot4\cdot5=40$
  • $7^{40}\equiv1\pmod{100}$
  • $7^{2008}=7^{40\cdot50+8}=(7^{40})^{50}\cdot7^8$
  • $(7^{40})^{50}\cdot7^8\equiv1^{50}\cdot7^8\equiv1\cdot5764801\equiv5764801\equiv01\pmod{100}$
barak manos
  • 43,109
  • +1,but, it is a problem of simple application of congruence theory, here $\phi$-function is not inevitably needed. Moreover, the $7^8$ is looking cumbersome, and much toilsome to compute, where in the simpler approach I did,calculating $7^4$ will suffice. –  Sep 29 '15 at 16:56
  • 1
    @SubhadeepDey: Thank you. I showed a way which did not require you to start by going around searching for a value of $n$ such that $7^n\equiv1\pmod{100}$. In the general case, it might be a lot harder than checking only the first few exponents. Of course, in this specific case, I do agree that towards the end of the method, once you calculate $7^8$, you realize that you've got yourself such value of $n$ with which you could do the all thing a lot more simple, as $7^{2008}=(7^8)^{251}$. – barak manos Sep 29 '15 at 17:01
  • 1
    There's a quote by CAR Hoare that reads "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies." I think that applies a little bit here. – corsiKa Sep 30 '15 at 14:52
  • 1
    @SpamIAm: Thanks for pointing that out, I will fix in a minute. I got the right answer since $2008\bmod{16}=2008\bmod{40}=8$, so there's little surprise in that. Thanks. – barak manos Dec 08 '15 at 09:30
  • @SpamIAm: BTW, my mistake wasn't a gross misunderstanding of $\phi$ as you might have implied, but a simple miscalculation of $(2-1)\cdot(2-1)\cdot(5-1)\cdot(5-1)=16$ instead of $40$. – barak manos Dec 08 '15 at 09:37
  • @SpamIAm: I meant to say that $100=2\cdot2\cdot5\cdot5\implies\phi(100)=\phi(2\cdot2\cdot5\cdot5)=(2-1)\cdot(2-1)\cdot(5-1)\cdot(5-1)$, and that my only mistake was the calculation of $(2-1)\cdot(2-1)\cdot(5-1)\cdot(5-1)$, not the interpretation of $\phi(100)$. – barak manos Dec 08 '15 at 13:59
  • @SpamIAm: Oh, S#$%t, you are right. I will delete this answer. Thanks :) – barak manos Dec 08 '15 at 14:02
  • Much better! ${}{}{}{}$ – Viktor Vaughn Dec 08 '15 at 14:08
  • @SpamIAm: Haha, thanks. Though I generally prefer to delete an answer rather than fixing it over and over, I guess that the other bullets (the ones which I didn't need to fix) are worth something for the readers. Thanks... – barak manos Dec 08 '15 at 14:11
  • @SpamIAm: BTW, it was a good "$\phi$" lesson, I guess I kinda forgot how to compute it and just took out what I had in my sleeve. – barak manos Dec 08 '15 at 14:12
3

Start by listing some cases of $7^n \mod 100:$ $$7^0=\color{red}{01}$$ $$7^1=\color{red}{07}$$ $$7^2=\color{red}{49}$$ $$7^3=3\color{red}{43}$$ $$7^4=24\color{red}{01}$$ $$7^5=168\color{red}{07}$$ $$7^6=1176\color{red}{49}$$ $$7^7=8235\color{red}{43}$$ $$7^8=57648\color{red}{01}$$ $$7^9=403536\color{red}{07}$$ $$7^{10}=2824752\color{red}{49}$$ $$7^{11}=19773267\color{red}{43}$$ $$7^{12}=138412872\color{red}{01}$$ $$\dots$$

Do you see the pattern?

daOnlyBG
  • 2,711
John Joy
  • 7,790