Solution to $2^n \pmod m = 1$ when $m$ is odd.

67 Views Asked by At

Find $n$ such that $2^n = 1 \pmod m$ for a given odd number $m$. I have checked the first $400$ odd numbers and the $n$ values look pretty erratic so wondering there is a general solution in terms of $m$.