I remember when I started learning modular arithmetics I found a tetration equation stated as follows
$2^{3^{4^{...^{n}}}} \equiv 1$ (mod $n+1$)
I am wondering how could this be proved, I tried this but I got lost:
$2^{3^{4^{5}}} $ (mod $6$) $ \equiv 2^{3^{4^{5}} mod 5}$(mod $6$)
How can I prove it?
It likely rarely will work as stated in the comments. What we do in cases like this is repeated use of modular arithmetic rules, usually Euler's totient theorem or more useful rules.
basically each power going right to left gets a new modulus. ex.
$$a^{b^{c^{d^e}}}\equiv f \bmod 65536$$
We first mod the base a, by 65536 (see polynomial remainder theorem). We, then take$$b^{c^{d^e}}\equiv g \bmod (\phi(65536)=32768)$$ by taking b mod 32768. and then we take $${c^{d^e}}\equiv h \bmod (\phi(32768)=16384)$$ etc.
In your case, any time n is odd, n+1 will be even and then because $$y\equiv b \bmod m \implies y=mx+b$$ and the distributive law, we can factor out a 2 when we rearrange via subtraction on one side. but 1 doesn't have a 2 as a divisor. We therefore get, that only even n could ever make this congruence true.