Euler's Theorem
Euler's theorem generalises Fermat's little theorem to any modulus using the totient function. It is used to reduce huge exponents in modular arithmetic, to find last digits of powers and it is the mathematical basis of RSA encryption.
LaTeX
a^{\varphi(n)}\equiv1\pmod n\quad\text{if}\ \gcd(a,n)=1Variables
- integer coprime to n
- positive integer modulus
- Euler's totient of n
Example
Find the last digit of .
- , so .
- , so .
Answer: The last digit is .