I am trying to find $7^{999,999}$ modulo (10) using Euler's Theorem:
If $m \in \mathbb{Z^+}, a \in \mathbb{Z}, (a,m) = 1$ then $a^{\phi(m)} \equiv 1$ (mod m).
I am unsure though how to use it since it doesn't seem useful to consider $7^{999,999} \equiv 1 $ (mod 999,999). Any help is appreciated.
Using Euler's theorem:
$$7^4 \equiv 1 \mod 10$$
Then raise each side to the power of $249999$ to get
$$7^{999996} \equiv 1 \mod 10$$
Multiply each side by $7^3$:
$$7^{999999} \equiv 343 \mod 10$$
Or
$$7^{999999} \equiv 3 \mod 10$$