Sunday, 16 November 2025

Exercise (1.3).30

 Show that the last two digits of $9^{9^9}$ are 8 and 9.


The last two digits if a number are the last positive residue modulo 100.


Let's first rewrite $9^{9^9}$ as $(10 - 1)^{9^9}$.


Using the binomial theorem,  we consider the expansion of  $(a+b)^n$, for integer $n$ larger than 1

$$(a+b)^n = a^2K + nab^{n-1} + b^n$$

where the term $a^2K$ contains terms which have $a^2$ as a factor.


Applying this to $(10 - 1)^{9^9}$ we have

$$ \begin{align} (10 - 1)^{9^9} & = 10^2K + (9^9)(10)(-1)^{(9^9-1)} + (-1)^{9^9}  \\ \\ & = 10^2K + (9^9)(10) -1 \\ \\ & \equiv 0 + 3874204890 -1 \pmod {100} \\ \\ & = 3874204889 \pmod {100} \\ \\ & \equiv 89 \pmod{100} \end{align} $$


So the last two digits of $9^{9^9}$ are 8 and 9.