I've just started a cryptography course, so i am not experienced at all how to calculate such big numbers. Clearly, i can't use a calculator, because the number is too big, so i have to calculate it by hand.
Since $101$ is a prime number, i think i should use here Fermat's little theorem. Found some example and tried to solve it this way, but i am totally not sure, if it is correct and if my approach must be this one.
Calculate $5^{3^{1000}}\bmod 101$.
First of all i think i should calculate $3^{1000}\bmod 101$. From Fermat's little theorem i get to $3^{100}\equiv 1\bmod 101$.
Thus $1000=x100+0$ and $x=10$.
$3^{1000}\equiv 3^{999^{10}} = 1 ^{10} \equiv 102\bmod 101 $
Later i have to calculate $5^{102}\bmod 101$. Again by Fermat $5^{100}\equiv 1\bmod 101$.
$$102=100\cdot 1 +2$$
Here i am not sure how to move on... I think that my solution is wrong, but i'd love to see your suggeststions and remarks how to solve the problem. Thank you very much in advance!