1

Find last 2 digits of the following expression with modular arithmetic.

$$\LARGE 7^{7^{7^{7}}} - 7^{7^{7}} - 7^7 - 7$$

I have tried taking remainders of all terms $\mod 100$ then subtracting , eventually realising it can depend on more digits.

Note: 1st no. is 7^7^7^7 , it wasn't showing it clearly in $\LaTeX$.

Felix Marin
  • 94,079

3 Answers3

2

First:

You can prove that $\forall k \in \mathbb{N} \cup \{0\}$ we have:

$7^{4k+1} \equiv 7 \pmod{100}$.

$7^{4k+2} \equiv 49 \pmod{100}$.

$7^{4k+3} \equiv 43 \pmod{100}$.

$7^{4k+4} \equiv 1 \pmod{100}$.

Second:

$7^{7^{7}} \equiv (-1)^{7^{7}} \equiv -1 \equiv 3 \pmod{4}$.

So,$7^{7^{7^{7}}} \equiv 43 \pmod{100}$.

$7^{7} \equiv 3 \pmod{4}$.

So, $7^{7^{7}} \equiv 43 \pmod{100}$.

Also, $7 \equiv 3 \pmod{4}$.

So, $7^{7} \equiv 43 \pmod{100}$.

So, $7^{7^{7^{7}}} - 7^{7^{7}} - 7^7 - 7 \equiv 43-43-43-7 \equiv 50 \pmod{100} $

Math Admiral
  • 1,687
1

Other than the methods already presented, I will present another way by taking modulo $25$ and $4$. Note $\newcommand{\Mod}[3]{#1\equiv#2\ (\mathrm{mod}\ #3)}$ $\Mod7{-1}{4}$ so $$\Mod{7^{7^{7^7}}-7^{7^7}-7^7-7}{(-1)^{7^{7^7}}-(-1)^{7^7}-(-1)^7-(-1)\equiv2}{4}$$ Now, $\Mod{7^2}{-1}{25}$ so $\Mod{7^4}{1}{25}$. Now, $\Mod{7^{7^7}\equiv7^7}{-1}{4}$ so $$\Mod{7^{7^{7^7}}-7^{7^7}-7^7-7}{7^{3}-7^{3}-7^3-7\equiv7-7\equiv0}{25}$$ Therefore, the number is $50\ \mathrm{mod}\ 100$.

Hope this helps. :)

0

We start by noticing that

  • $7^0 = 1$
  • $7^1 = 7$
  • $7^2 = 49$
  • $7^3 = 343$ thus $7^3 = 43$ mod($100$)
  • $43*7 = 301$ thus $7^4 = 1$ mod($100$)

Now it's easy, since we need to check the exponents mod($4$):

  • $7 = 3$ mod($4$), thus $7^7 = 7^3$ which is $43$ mod($100$)
  • $43 = 3$ mod($4$), thus $7^{7^7} = 7^3$ which is $43$ mod($100$)
  • The same argument goes for the last one: $7^{7^{7^7}} = 7^3$ which is $43$ mod($100$)

At last, we have $43 - 43 - 43 - 7 = -50$ which is $50$ mod($100$)