The question speaks for itself, since the question comes from a contest environment, one where the use of calculators is obviously not allowed, can anyone perhaps supply me with an easy way to calculate the first of last digit of such situations?
My intuition said that I can look at the cases of $3$ with an index ending in a $1$, so I looked at $3^1=3$, $3^{11}=177,147$ and $3^{21}= 10,460,353,203$. So there is a slight pattern, but I'm not sure if it holds, and even if it does I will have shown it holds just for indices with base $3$, so I was wondering whether there is an easier way of knowing.
Any help is appreciated, thank you.