<s>[INST] Modular arithmetic problem (mod $22$) $$\large29^{2013^{2014}} - 3^{2013^{2014}}\pmod{22}$$
I am practicing for my exam and I can solve almost all problem, but this type of problem is very hard to me. In this case, I have to compute this by modulo $22$.
 [/INST] This number is obviously even so let's look at it modulo $11$ :
$$29^{2013^{2014}}-3^{2013^{2014}} \equiv 7^{2013^{2014}}-3^{2013^{2014}} \pmod{11}$$
Now look at the powers $7^x$ modulo $11$ and notice that : $$7^{10} \equiv 1 \pmod{11}$$ (this follows also from Fermat's little theorem )
So we need to look at $2013^{2014} \pmod{10}$ . 
Use the same method $3^4 \equiv 1 \pmod{10}$ so :
$$2013^{2014} \equiv 3^{2014} \equiv 3^{2012} \cdot 3^2 \equiv 1 \cdot 9 \equiv 9 \pmod{10}$$
Putting them together :
$$7^{2013^{2014}} \equiv 7^9 \equiv 7^{-1} \equiv 8 \pmod{11}$$
We can proceed similarly for the other term because $3^{10} \equiv 1 \pmod{11}$  :
$$3^{2013^{2014}} \equiv 3^9 \equiv 3^{-1} \equiv 4 \pmod{11}$$
This means that :
$$29^{2013^{2014}}-3^{2013^{2014}} \equiv 8-4 \equiv 4 \pmod{11}$$
This number is even so modulo $22$ :
$$29^{2013^{2014}}-3^{2013^{2014}} \equiv 4 \pmod{22}$$
</s>