Method to find solution for $a^x \equiv \mod n$ The congruence $5^x \equiv 1 \mod 36$ has a solution because $5$ and $36$ are relatively prime, i.e. $5$ and $2^23^2$ have no common factors.
Is there a method to find $x$? 
All I can see is that $5^3 \equiv 5 \mod 6$.

In other words you want to find the multiplicative order of $5$ mod $36$.  By Euler's theorem this divides $\varphi(36) = 12$.  Next step: try $12/2 = 6$ and $12/3 = 4$.
