I'm seeking an isomorphism (or algorithm for constructing one in general) between the group of units modulo n (particularly, n=the product of primes 5, 7, 11, $\ldots$), and it's unique isomorphism class (as guaranteed by the Fundamental Theorem) in terms of it's invariant factors.
To give an example: $U(35)$=$(Z_{35})^*$=$(Z/35Z)^*$.
$U(35) \cong U(5) \times U(7)$. This iso is clear: $\phi(x)=($x mod 5, x mod 7$)$.
Now, $U(p) \cong Z_{p-1}$, and so we have $U(35) \cong Z_4 \times Z_6$, but this is not the unique isomorphism class, rather by the Fund. Th., $U(35) \cong Z_2 \times Z_{12}$. It is not at all clear to me how to construct this isomorphism explicitly (the natural choice of (x mod 2, x mod 12) doesn't work).
Likewise, $U(385) \cong U(5) \times U(7) \times U(11) \cong Z_4 \times Z_6 \times Z_{10} \cong Z_2 \times Z_2 \times Z_{60}$.
And one more, $U(5005) \cong U(5) \times U(7) \times U(11) \times U(13)\cong Z_4 \times Z_6 \times Z_{10} \times Z_{12} \cong Z_2 \times Z_2 \times Z_{12} \times Z_{60}$.
Thanks for your time and help!