Existence of an isomorphism $\Bbb{Z}_{n}^{\times} \rightarrow \Bbb{Z}_{\phi(n)}^{+}$

67 Views Asked by At

I am considering the multiplicative group of units modulo $n$ which I shall refer to as $\Bbb{Z}_{n}^{\times}$. I read somewhere that

$$\Bbb{Z}_{n}^{\times} \cong \Bbb{Z}_{\phi(n)}^{+}$$

where $\phi(n)$ is the totient of $n$. I would like to know an explicit $$\pi_n: \Bbb{Z}_{n}^{\times} \rightarrow \Bbb{Z}_{\phi(n)}^{+}$$

That gives this isomorphism (as I would like to efficiently compute with it).

Work To Find it Myself:

Classically $\pi_n(1) = 0$. (Trivial identity properties). Now one idea is that if I can find a single generator $\mu$ of $\Bbb{Z}_n^{\times}$, then I could set $\pi_n(\mu) = 1$ and from there generate the isomorphism, but it's not clear how to quickly find this generator in $\Bbb{Z}_n^{\times}$ without just trying out elements and seeing which one does enumerate through the whole set.

Alternative Approach:

Intuitively it seems I am looking for a "modular logarithm" of some kind since we have that

$$ \pi_n(ab) = \pi_n(a) + \pi_n(b)$$

But logarithm w.r.t what base? That remains unclear to me. Perhaps it is a logarithm with base equal to a generator of $\Bbb{Z}_n^{\times}$. That seems natural so the problem still reduces to finding a single generator, and now, computing these logarithms.

Motivation:

My friend was considering how to efficiently compute the period of $a^r \mod n$. I figured that if this isomorphism can be found I can use it to change the sequence $a,a^2 ... $ to $\pi_n(a), 2*pi_n(a) ... $ with the latter being very easy to analyze for length (since I can just consider the factors of $\pi_n(a)$ that divide $\phi(n)$