Finding last digit of numbers raised to large powers This question came in a competitive exam I took recently.

The last digit of LCM of $3^{2003} - 1$ and $3^{2003} + 1$ is

is there any strategy by which we can quickly determine the answer? I am hoping there is, since the question came in a timed competitive test.

The GCD of $x$ and $y$ divides $x-y$, hence the GCD $3^{2003}-1$ and $3^{2003}+1$ is either $1$ or $2$; it is easy to check that both numbers are even, so this GCD of these is 2.
The LCM of $x$ and $y$ multiplied by the GCD of $x$ and $y$ equals $x \times y$. So the LCM in question equals $\frac{(3^{2003}-1) \times (3^{2003}+1)}{2} = \frac{3^{4006}-1}{2}$.
$3^n \mod 20$ gives us the following sequence: $1, 3, 9, 7, 1, 3, 9, 7, \cdots$; hence $3^{4006} \mod 20 = 3^2 \mod 20 = 9$, and the answer is $\frac{9-1}{2} = 4$.
