I have been working on this for a while now and not seem to solve this equation. The part that tripping me off is the mod. How do I take it to the other side so I can solve for $x$.
Suppose: $X = 10, a=20, z=30$, how to solve for smaller $x$. $X=a^x \bmod z$
I tried using logs but answer is wrong. Could someone please guide me on how to do this?
Hint: Calculating the first powers of $20$ mod.$30$, you can conjecture (and prove) that $$20^n\equiv 20\quad\text{if $n$ is odd}, \qquad 20^n\equiv 10\quad\text{if $n$ is even.} $$