It's a bit unclear to me what you mean by
"problem where there are an N amount of power values in the range of 1-9 and the
last number has to be found". Is this to say you're dealing with a power tower
of integers in the range 1-9?
In any case, to find the last digit of $9^{4^{2^{3^5}}}$, we want to "reduce it
mod $10$". First, some notation.
\begin{equation*}
a \equiv b \pmod{10}
\end{equation*}
means that "$a$ is congruent to $b$ modulo $10$". This means that they differ by
a multiple of $10$, or equivalently, they leave the same remainder when divided
by $10$. Hopefully you agree that if some integer
\begin{equation*}
n \equiv 3 \pmod{10}
\end{equation*}
then the last digit of $n$ must be $3$.
Now, we also have that if $a \equiv b \pmod{10}$ and $c \equiv d \pmod{10}$,
then $ac \equiv bd \pmod{10}$. Maybe this is obvious to you already, if not, you
can prove it from the "differ by a multiple of $10$" definition. Using this,
any power of $9$ is congruent to $-1$ raised to that same exponent. So
\begin{equation*}
9^{4^{2^{3^5}}} \equiv (-1)^{4^{2^{3^5}}} \pmod{10}
\end{equation*}
But the value of $(-1)^{4^{2^{3^5}}}$ just depends on whether
$4^{2^{3^5}}$ is even or odd. Since this is some power of $4$, which is even,
it is clearly even (since it is not $4^0$), so $(-1)^{4^{2^{3^5}}} = 1$, so the
last digit of $9^{4^{2^{3^5}}}$ is $1$.
An alternative approach would just be to look at powers of $9$ mod $10$, and
notice that they are congruent to $1$, $9$, $1$, $9$, ... and take it from
there.
To generalise this approach for some kind of program requires looking at the
periodicity of the powers of the base modulo $10$, and then recursing into the
power tower to reduce the subtower modulo the period of the powers of the base.
(Particularly, not all numbers are as nice as $9$, which only has period $2$)
Proof of $a \equiv b \pmod{10}$ and
$c \equiv d \pmod{10} \implies ac \equiv bd \pmod{10}$.
Have $a = b + 10n$, $c = d + 10m$ for some $n, m \in \mathbb Z$ by definition..
Then
\begin{align*}
ac
&= (b + 10n)(d + 10n) \\
&= bd + 10(n + m + 10nm) \\
&\equiv bd \pmod{10} \quad \text{by definition}
\end{align*}
Proof of $a \equiv b \pmod{10} \implies a^n \equiv b^n \pmod{10}$:
The base case $n = 0$ is trivially true. Then
\begin{align*}
a^{n + 1}
&\equiv a \cdot a^n \\
&\equiv b \cdot a^n \quad \text{by assumption} \\
&\equiv b \cdot b^n \quad \text{by inductive hypothesis} \\
&\equiv b^{n + 1}
\end{align*}
Best Answer
It is not all that hard, if we remember the frequently useful $2^{10}=1024$, which is $2.4$ percent more than $1000$.
The small power of $2$ that is closest to beginning with $7$ is $2^6$, which is $64$. We need to increase $64$ by a bit under $10$ percent, times a power of $10$. But since we are concerned only about the first digit, we don't really even see the powers of $10$, intuitively we just want to push from $6.4$ to $7$.
It is easy to see that pushing up twice by $2.4$ percent is not enough to push us up to beginning with $7$. That doing it three times is not enough is less obvious, but a bit of fooling around, even without a calculator, does the job: although the compounding helps, $2.4$ percent three times does not give $10$ percent. It is clear that increasing $64$ by $2.4$ percent four times will get us to the $7$, and leaves us quite far from beginning with $8$. So the required power is $6+(10)(4)$.
The starting digit that takes longest to reach is $9$. This is trickier to do by hand, for $2^{53}$ barely gets us there. It is the first legitimate candidate, but calculations have to be more accurate than for the digit $7$, to make sure that we don't need to go up to $63$.