How to calculate $p={{{{{{6^6}^6}^6}^6}^6}^6}$ $\mod7$?

489 Views Asked by At

I've tried two approaches:

Approach 1

Since $6 \equiv -1 \pmod7$

So, $p=(-1)^t$ and $t$ is even

Therefore, $p=1$.

Approach 2

Since $6 \equiv -1 \pmod7$

So, $6^6 \equiv 1 \pmod7$.

Hence, solving towers from top to bottom:

$p \equiv {{{{{6^6}^6}^6}^6}^1} \pmod7$

$p \equiv {{{6^6}^6}^1} \pmod7$

$p \equiv {6^1} \pmod7$

Therefore, $p=6$.

Now, I don't know why both the approaches are giving different answers and which one is right.

4

There are 4 best solutions below

12
On BEST ANSWER

You can't replace exponents like that. That is, $6^8\not\equiv 6^1$ mod $7$. You can pretty easily check that $6^8\equiv 1$.

As you say, $6\equiv -1$, so $-1$ to an even power will give you $1$ mod $7$.

0
On

Approach $1$ is correct.

We do not have $$a^b \equiv a^{(b \mod p)} \mod p$$ in general

0
On

Third approach. $7$ is prime. $gcd (6,7)=1$ so by Fermats Little theorem $6^6\equiv 1 \mod 7$.

So $6^{6*k}\equiv 1 \mod 7$ (notice congruence of exponents are NOT preserved modulo 7-- but they are preserved modulo 6.)

So as ${{{6^6}^6}^6} $ is a multiple of $6$ we have ${{{{6^6}^6}^6} ^6}\equiv 1 \mod 7$

0
On

Question: $p={{{{{{6^6}^6}^6}^6}^6}^6}$ $\mod7$?

  • a) Let $Q = {{{{6^6}^6}^6}^6}$ so that $p = 6^{6^Q}$

  • b) Note that $6\equiv -1 \pmod 7$

Thus

  • $\qquad \displaystyle p=6^{6^Q} = 6^{2^Q \cdot 3^Q} \equiv \left((-1)^{2^Q}\right)^{3^Q} \equiv 1^{3^Q} \equiv 1 \pmod 7$