Solving modular equations Is there a procedure to solve this or is it strictly by trial and error?
$5^x \equiv 5^y \pmod {39}$ where $y > x$.
Thanks.

Hint: since $39 = 3\cdot 13$ we can compute the order of $5\ ({\rm mod}\ 39)$ from its order mod $3$ and mod $13$.  
First, mod $13\!:\ 5^2\equiv -1\ \Rightarrow\ 5^4\equiv 1;\ \ $ Second, mod $3\!:\ 5\equiv -1\ \Rightarrow\ 5^2\equiv 1\ \Rightarrow\ 5^4\equiv 1 $.  
Thus $\:3,13\ |\ 5^4-1\ \Rightarrow\ {\rm lcm}(3,13)\ |\ 5^4-1,\:$ i.e. $\:39\ |\ 5^4-1,\:$ i.e. $\:5^4\equiv 1\pmod {39}$ 
