What is the tens digit of $3^{100}$? Is there a general formula to calculate the n-th digit of any big number?
 A: Following the question in the title,
$$3^{100}=9^{50}=(10-1)^{50}\equiv\binom{50}210^2-\binom{50}110+1\pmod{1000}$$  
Now, $$\binom{50}210^2-\binom{50}110=\frac{50\cdot49}210^2-500$$
$$=2500\cdot49-500=2500\cdot48+(2500-500)\equiv0\pmod{1000}$$

Alternatively, 
using Carmichael function, $\lambda(1000)=100$
A: $3^{100}=81^{25}=(80+1)^{25}=(8\cdot10+1)^{25}=\sum_{k=0}^{25}C_{25}^k\cdot80^k=1\cdot1+25\cdot80+\ldots=1+2000+\ldots\rightarrow3^{100}\mod10^3=1\rightarrow\text{its last three digits are 001}.$
A: We would like to calculate $3^{100}\pmod{100}$.  This will tell us the last two digits of $3^{100}$, which includes the tens digit.
We proceed as follows: $3^4 = 81$, so:
$$\begin{align}
3^8 & \equiv (81)^2 \equiv 61 \pmod{100} \\
3^{16} & \equiv (61)^2 \equiv 21\pmod{100} \\
3^{24} & \equiv 61\cdot 21 \equiv 81\pmod{100}\\
3^{48} & \equiv (81)^2 \equiv 61 \pmod{100} \\
3^{50} & \equiv 9\cdot 61 \equiv 49\pmod{100} \\
3^{100} & \equiv (49)^2\equiv 01 \pmod {100}
\end{align}$$
So the last two digits are 01.
In general it's very quick to calculate $a^b\pmod n$.  You calculate $a^{\lfloor b/2 \rfloor}\pmod n$ (using this method recursively if necessary) and square it, again mod $n$; if $b$ is odd you multiply the result by $a$ and you are done.
