I am trying to understand Euler's Totient Theorem but I don't understand why it works:
$$m^{\phi(n)}\equiv1 \text{ mod } n$$
Where m and n are coprime, how can a number m to the power of phi(n) be congruent to 1 mod n. I mean, in the example:
$$5^{\phi(8)}\equiv1 \text{ mod } 8$$
phi(8) is equal to 4, and 5 to the power of 4 is equal to 625. Therefore, if 1 mod 8 (or any other value of "n") is equal to 1, how can 625 be equivalent to 1 (i.e. 625 ≡ 1)? Please would someone mind to explain me what is it that I'm not understanding ?
$$m^{\phi{(n)}} \text{ mod } n \equiv 1 \text { mod } n$$
In my opinion, it would make the relationship more clear.
– Baldovín Cadena Mejía Nov 20 '21 at 19:57