Prove that $2^{2^{2^{\cdot^{\cdot^{2}}}}} \mod 9 = 7$

121 Views Asked by At

Prove that $\underbrace{2^{2^{2^{\cdot^{\cdot^{2}}}}}}_{2016 \mbox{ times}} \mod 9 = 7$

I think that it can be done by induction:

Base:
$2^{2^{2^{2}}} \equiv 2^{16} \equiv 2^8 \cdot 2^8 \equiv 2^4 \cdot 2^4 \cdot2^4 \cdot2^4 \equiv 7^2 \cdot 7^2 \equiv 4 \cdot 4 \equiv 16 \equiv 7$


Assume that it is true for $n$ times.
Let $a_n = \underbrace{2^{2^{2^{\cdot^{\cdot^{2}}}}}}_{n \mbox{ times}}$ $$ a_{n+1} = 2^{a_n} = 2^{9k+7} = 2^7 \cdot 2^{9k} \equiv 128 \cdot 1 \equiv 2 \neq 7 $$ Where did I go wrong?

3

There are 3 best solutions below

2
On BEST ANSWER

Apply modular order reduction using $\,\phi(9)=\color{#c00} 6\,$ i.e.

$\!\!\bmod 9\!:\,\ 2^{\Large\color{#c00} 6}\equiv 1\ \ {\rm thus}\ \ 2^{\large N}\equiv\, 2^{\large N\Large \bmod\, \color{#c00}6}\ $

$\text{Applying that here}\!:\ 2^{\Large {2^{\Large 2K}}}\!\!\equiv\, 2^{\Large \color{#0a0}{2^{\Large 2K}}\!\bmod\color{#c00} 6}\!\equiv 2^{\Large\color{#0a0} 4}\equiv 7$

$\text{since we have that:}$ $\bmod \color{#c00}6\!:\,\ \color{#0a0}{2^{\large 2K}}\!\equiv 4^{\large K}\!\equiv\color{#0a0} 4,\,$ by $\,4^{\large 2}\equiv 4\,$ and induction (or as here. $K\ge 1^{\phantom{|^|}}\Rightarrow 2^{2K}\!\bmod 6 = 2(\color{#0af}{2^{2K-1}}\!\bmod 3)\equiv 4,\,$ by $\!\bmod 3\!:\ \color{#0af}{2^{2K-1}}\!\equiv (-1)^{2K-1}\!\equiv -1\equiv \color{#0af}2)$.

3
On

Just because we are working in modulo $9$, that doesn't mean that the exponents work in modulo $9$. In general, $2^{9k}\not\equiv 1$. Actually, if $k$ is odd, $2^{9k}\equiv -1$. Which is exactly what goes wrong here: You are getting $-7\equiv 2$, rather than $7$.

You can, of course, try to take this into account in your induction proof. But you run into the problem of trying to keep track of even and odd modulo $9$, which means that you've basically gone up to modulo $18$, and if we're unlucky (I don't think we are in this case), this will just explode.

We have $2^6 = 64\equiv 1$, so looking at the exponent modulo $6$ seems like it would be more natural than modulo $9$.

To help keeping things straight, I will introduce colours to our "power tower": $$ 2^{\displaystyle\color{red}2^{\displaystyle\color{blue}2^{\displaystyle\color{orange}2^{\cdot^{\cdot^2}}}}} $$ where the base is black, the first exponent is red, the seoncd is blue, the third is orange, and after that it turns out that we can stop caring.

Now, looking at the red number modulo $6$, we have $\color{red}2^\color{blue}{3} \equiv \color{red}2^\color{blue}{1}$ and $\color{red}2^\color{blue}{4}\equiv \color{red}2^\color{blue}{2}$, so looking at the blue number modulo $2$ seems like it could be useful (just as long as we make certain that it is strictly positive).

And we see that the blue number is strictly positive and even (it's a $2$ raised to the orange number, and the orange number is strictly positive). So it may as well be a $2$ as far as the red number is concerned. Which means that the red number might as well be a $4$ as far as the black number is concerned. Thus we end up with $2^\color{red}4\equiv 7$ modulo $9$ for our final answer.

Working this way, for each level you go up in the exponent tower, the modulus we are interested in will go down. Finally, at some stage (usually pretty quickly), we are basically just interested in whether the result of the remaining tower is even or odd (and possibly whether it's larger than some relatively small number), and then we can work our way down again.

1
On

Where you fail, is in assuming exponents mod the modulus works. It wouldn't generally. the exponent is mod 6, when doing mod 9. So you get it equivalent to: $$128\cdot 2^{3k}=128\cdot8^k$$ Which then depends on parity of k (because 8's order mod 9 is 2).