Show that, for any fixed integer $\,n \geq 1,\,$ the sequence \[2, \; 2^{2}, \; 2^{2^{2}}, \; 2^{2^{2^{2}}}, \cdots \pmod{n}\] is eventually constant.
Problem
Source:
Tags: modular arithmetic, induction, Euler, search, Congruences
25.05.2007 03:24
Write $a_n=\underbrace{2^{2^{...^2}}}_{n \text{ times}}$, then $a_{n+1}=2^{a_n}$. Induction on $n$ (one could also use some straightforward way, but I think this way's nicer, and it kills topic 139, too): We show that it is constant beginning from the $n-1$-th term (or earlier): $n=1$ is clear. For any $n>1$, we write $n=2^m n^\prime$ with $n^\prime$ odd. The sequence $a_k$ clearly gets constantly $0 \mod 2^m$ for all $k \geq m \leq n-1$. So we are left to prove the same $\mod n^\prime$. By induction, the sequence gets constant $\mod \tilde n := \varphi(n^\prime) < n^\prime \leq n$. Thus there is $c$ such that for all $k \geq \tilde n-1$ we have $a_k \equiv c \mod \varphi(n^\prime)$. This gives $a_{k+1} = 2^{a_k} \equiv 2^c \mod n^\prime$ by the theorem of Euler-Fermat, meaning nothing else than constantness of the sequence for all $k>\bar n \leq n-1$, our result.
09.02.2011 09:27
There is a relatively recent post, showing this is true for any positive integer $a$ instead of $2$. A search did identify it as http://www.artofproblemsolving.com/Forum/viewtopic.php?f=57&t=379220&hilit=constant.
09.02.2011 11:52
Yeah ; as mapronevma said ; there exists a stronger version of this porblem Here is it's solution ; with very clear writing
Attachments:
event_const.pdf (56kb)
21.12.2021 10:20
Induction
11.03.2023 03:23
We will show the stronger bound that with $a_1 = 2, a_2 = 2^2, a_3 = 2^{2^{2}}, \ldots$, we already have that $a_i \equiv a_j \pmod{n}$ for all $i,j > \log_2(n)$. First note that if $a_k$ is congruent to $a_{k+1} = 2^{a_k}$ modulo $n$ for some $k$, then $a_k \equiv {a_j} \pmod{n}$, for all $j > k$ by induction. This means that we are done as soon as we can find two consecutive terms which are congruent modulo $n$. Now assume by induction that $a_k \equiv a_{k+1} \pmod{n}$ for all $n < 2^k$, which is trivially true for $k = 1$. We will prove that $a_{k+1} \equiv a_{k+2} \pmod{n}$ holds for all $n < 2^{k+1}$. So assume $2^k \le n < 2^{k+1}$ and write $n = l2^m$ with $l$ odd. First we will deal with the even case; assume that $m \ge 1$. We actually intend to show that already $a_k \equiv a_{k+1} \pmod{n}$ in this case. First it is clear that $a_i \equiv a_j \equiv 0 \pmod{2^m}$ for all $i,j \ge k \ge m$, so it is sufficient to show $a_k \equiv a_{k+1} \pmod{l}$. But since $l < 2^k$, this already follows from the induction hypothesis. So now let's move on to the odd case and assume $m = 0$. Since $\varphi(n)$ is even, we obtain (either by what we just proved or the induction hypothesis) that $a_{k+1} \equiv a_k \pmod{\varphi(n)}$. But by Euler's Theorem this implies $a_{k+1} = 2^{a_{k}} \equiv 2^{a_{k+1}} = a_{k+2} \pmod{n}$.