A part of Aluffi's "Algebra: Chapter 0" exercise II.4.12 suggests computing the order of $[9]_{31}$ in $(\mathbb{Z}/31\mathbb{Z})^*$. Sure, I could just multiply $9$ a few times until I get $1$ as a remainder (and thus derive that the order in question is 15), but is there a better way?
A few thoughts of mine:
- Firstly, $[9] = [3]^2$, so it'd be sufficient to prove that $[3]$ is a generator (and indeed it is). But I was unable to do this efficiently.
- Another attack direction is that, since $31$ is prime, one might note that $(\mathbb{Z}/31\mathbb{Z})^*$ is cyclic and, having $30$ elements, is isomorphic to $\mathbb{Z}/30\mathbb{Z}$. Maybe we could derive something meaningful by inspecting some isomorphism $\varphi$ between the two? I tried deriving what should it do to the elements of $(\mathbb{Z}/31\mathbb{Z})^*$, and I was able to figure out how it behaves on the powers of $[2]$, but it didn't bring me closer to understanding what it does to $[3]$ or $[9]$.
So shall I just accept my fate and consider this to be an exercise in multiplication and division with remainder?
By lil' Fermat and Lagrange's theorem, all non-zero elements in $\mathbf Z/31\mathbf Z$ have order a divisor of $30$. So the order of $9$ is among $\;\{2, 3,5,6,10,15,30\}$.
It is not very long to check that, $\bmod 31$, \begin{gather}9^2\equiv -12, \quad 9^3\equiv -12\cdot 9=-108\equiv 16,\quad 9^5\equiv -12\cdot 16=-192\equiv -6,\\ 9^6\equiv-6\cdot 9=-54\equiv8, \quad 9^{10}\equiv 36\equiv 5,\quad 9^{15}\equiv 5\cdot -6=-30\equiv 1, \end{gather} so $9$ has order $15$.