Integers between $00$ and $99$ Inclusive occur as the last two digits in the decimal expansion of infinitely many $a_i$

elementary-number-theorymodular arithmeticsequences-and-series

Define a sequence $\{a_n\} $ by
$$a_1=3$$ and $$a_{i+1}=3^{a_i} \text{ for } i>0.$$

Which Integers between $00$ and $99$ Inclusive occur as the last two digits in the decimal expansion of infinitely many $a_i$?

Attempt
By Euler's Totient Function, I know that $$3^{40} \equiv 1 \text{ mod }100$$

Now I want to find what and how the powers of 3 are mod $40$?
But I cannot move ahead from here.

Best Answer

$3$ is not a primitive root $\mod 100$. (Most residues are not.) So we don't need $3^{40}\equiv 1$. $3^2 = (10 - 1); 3^{20} = (10-1)^{10}\equiv -10*10 +1\equiv 1 \mod 100$. So $3^{20} \equiv 1 \mod 100$ will do.

So $a_2=3^3 = 27\equiv 7 \mod 20$

$a_3 = 3^{27}\equiv 3^7= (10-1)^3*3 \equiv (30 - 1)*3 \equiv 87\mod 100$ and $a_3 \equiv 7 \mod 20$.

$a_4 = 3^{a_3}\equiv 3^7\equiv 87 \mod 100$.

So $a_n \equiv 87 \mod 100$ for all $n \ge 3$.

Related Question