Problem

Source:

Tags: modular arithmetic, Congruences



Prove that for $n\geq 2$, \[\underbrace{2^{2^{\cdots^{2}}}}_{n\text{ terms}}\equiv \underbrace{2^{2^{\cdots^{2}}}}_{n-1\text{ terms}}\; \pmod{n}.\]