Use fermat's little theorem. Simply put, if m == n (mod (p - 1)), m - n = k(p - 1), for some integer k. Now, use both sides as powers of a, some number a. a^(k(p - 1)) can be written as (a^(p - 1))^k, where p is a prime.
Salahuddin
Maths online
Use fermat's little theorem. Simply put, if m == n (mod (p - 1)), m - n = k(p - 1), for some integer k. Now, use both sides as powers of a, some number a. a^(k(p - 1)) can be written as (a^(p - 1))^k, where p is a prime.
Salahuddin
Maths online