Euler's totient theorem(Euler-Fermat theorem)
Let phi(n) = totient function, i.e. number of integers upto 'n' which are co-prime to it.
Then:
a^(phi(n)) = 1 mod 'n' if 'a' and 'n' are co-prime.
You can see the similarity with Fermat's little theorem:
a^(p-1) = 1 mod 'p' where 'p' is a prime and 'a','p' are co-prime.
As we know all integers upto 'p' are co-prime to it.
Comments
Post a Comment