For example, is there a easy way to compute $$32^{A_1^{A_2^{\ \cdots^{{}^{A_{32}}}}}} \mod 7$$
whith $A_i=32 \, , \ i=1,\cdots,32$ ?
For example, is there a easy way to compute $$32^{A_1^{A_2^{\ \cdots^{{}^{A_{32}}}}}} \mod 7$$
whith $A_i=32 \, , \ i=1,\cdots,32$ ?
Copyright © 2021 JogjaFile Inc.
Looking at the sequence of powers of $32$, reduced mod $7$, we get \begin{align*} 32^0&\equiv 1\;(\text{mod}\;7)\\[4pt] 32^1&\equiv 4\;(\text{mod}\;7)\\[4pt] 32^2&\equiv 2\;(\text{mod}\;7)\\[4pt] 32^3&\equiv 1\;(\text{mod}\;7)\\[4pt] \end{align*} so the mod $7$ sequence is $1,2,4,1,2,4,1,2,4,...$, repeating in blocks of $3$.
It follows that $$ {32}^n\;\text{mod}\;7 = \begin{cases} 1&\text{if}\;n\equiv 0\;(\text{mod}\;3)\\ 4&\text{if}\;n\equiv 1\;(\text{mod}\;3)\\ 2&\text{if}\;n\equiv 2\;(\text{mod}\;3)\\ \end{cases} $$ Looking at the sequence of powers of $32$, reduced mod $3$, we get \begin{align*} 32^0&\equiv 1\;(\text{mod}\;3)\\[4pt] 32^1&\equiv 2\;(\text{mod}\;3)\\[4pt] 32^2&\equiv 1\;(\text{mod}\;3)\\[4pt] \end{align*} so the mod $3$ sequence is $1,2,1,2,1,2,...$, repeating in blocks of $2$.
It follows that $$ {32}^n\;\text{mod}\;3 = \begin{cases} 1&\text{if $n$ is even}\\ 2&\text{if $n$ is odd}\\ \end{cases} $$ Hence, since $A_2$ is even, it follows that the expression starting at the base $A_1$ is congruent to $1$ mod $3$, so the full expression, starting at the base $32$ is congruent to $4$ mod $7$.