How many elements of order 9 does $Z_3 \times Z_{15} \times Z_{45}$ have? I'm a confused with my answer to this. I started off by using the Chinese remainder theorem and rewriting the group as isomorphic to:
$$Z_3 \times Z_3 \times Z_5 \times Z_5 \times Z_9$$
The order of non identity elements in $Z_3$ is 3, 5 for $Z_5$ and 9 for $Z_9$. So I was guessing we require the identity element in all of $Z_3$ and $Z_5$, to have 8 elements of order 9. Then do we take $Z_9$ and both $Z_5$ to be the identity, with the requirement that the elements from both $Z_3$ are not the identity giving $(3-1)(3-1)=4$ options, therefore would there be 12 elements of order 9 in total?
 A: Writing the group in components like you have is a great start, because the element's order is precisely the least common multiple of the order of its components.  
Argue that the $\mathbb{Z}_5$ components must be identity, and so reduce the problem to counting the order $9$ elements of 
$\mathbb{Z}_3 \times \mathbb{Z}_3 \times \mathbb{Z}_9$
Now let's pose the question: if the $\mathbb{Z}_9$ component doesn't have order $9$, what's the lcm of the component orders? On the other hand, if the $\mathbb{Z}_9$ component does have order $9$, what's the lcm of the component orders? Once we've answered those questions, we know exactly what to count.  
A: Your start is good. Now if an element $g$ is described by its coordinates $g=(u,v,w,x,y)$, then $\operatorname{ord}(g) = \operatorname{lcm}(\operatorname{ord}(u),\operatorname{ord}(v),\operatorname{ord}(w),\operatorname{ord}(x),\operatorname{ord}(y))$ (since we must have $u^{\operatorname{ord}(g)}$,$v^{\operatorname{ord}(g)}$,etc. all the identity).
We know $\operatorname{ord}(u)$ and $\operatorname{ord}(v)$ are either $1$ or $3$, $\operatorname{ord}(w)$ and $\operatorname{ord}(x)$ are either $1$ or $5$, and $\operatorname{ord}(y)$ is either $1$, $3$, or $9$. To get lcm $9$, it is necessary and sufficient to have $\operatorname{ord}(w)=\operatorname{ord}(x)=1$ and $\operatorname{ord}(y)=9$. Thus $w$ and $x$ are uniquely determined. There are $6$ elements of $Z_9$ with order $9$ (all the ones that don't have order $1$ or $3$), so there are $6$ choices for $y$. We have no restrictions on $u$ and $v$, so there are $3$ choices for each, giving a total of $6 \cdot 3 \cdot 3 = 54$ distinct elements of order $9$.
A: Clearly the order of $(a,b,c,d,e) \in Z_3 \times Z_3 \times Z_5 \times Z_5 \times Z_9$ is the lowest common multiple of $|a|,|b|,|c|,|d|,|e|$ for $a,b \in Z_3; c,d\in Z_5; e\in Z_9$.  So we need that lowest common multiple to be $9$.
In $Z_3$, $[0]$ has order $1$ and $[1],[2]$ have order $3$.  All of those could contribute to a lowest common multiple being $9$.  However there will have to be another component that contributes $3^2$ to the lowest common multiple as the lowest common multiple of $3$ and $3$ is still $3$.
In $Z_5$, $[0]$ has order $1$ but all the other have order $5$.  If $|c|$ or $|d|$ is $5$ then the lowest common multiple will be a multiple of $5$.  So for the lowest common multiple to be $9$, $|c|$ and $|d|$ must be $[0]$.
In $Z_5$, $[0]$ has order $1$, $[3],[6]$ have order three and all of the remaining $6$ elements have order $9$.  For the lowest common multiple to be $9$ then $|e|$ must be $9$.  Otherwise the lowest common multiple would be either $1$ or $3$.
Recap:  $a,b$ can be anything in $Z_3$.  $c=d =[0]$. and $e$ can be any of the six elements of $Z_9$ with order $9$.
So there are $3*3*6 = 54$ such elements.  They are any $(\{0,1,2\},\{0,1,2\},0,0,\{1,2,4,5,7,8\})$.
A: This is just Fleablood's answer with a table added.
Let $\mathbf G = 
     \mathbb Z_{a_1} \times \mathbb Z_{a_2} \times \dots \times \mathbb Z_{a_A}$
Let $\bar s = 
    (\overline{s_1}, \overline{s_2}, \dots, \overline{s_A}) \in \mathbf G$
Construct the following table
\begin{array}{cccc|l}
   a_1 & a_2 & \dots & a_A & \text{Given}\\
   s_1 & s_2 & \dots & s_A & \text{Given}\\
   g_1 & g_2 & \dots & g_A & g_i = \gcd(a_i, s_i) \\
   m_1 & m_2 & \dots & m_A & m_i = \dfrac{a_i}{g_i}\\
\end{array}
Then $\operatorname{ord}(\bar s) = \operatorname{lcm}
      (m_1, m_2, \dots, m_A) $
The corresponding table is
\begin{array}{|c|c|c|c|c|c|}
\hline
   a   &   3   &     3 & 5 & 5 &           9 \\
   s   & 0,1,2 & 0,1,2 & 0 & 0 & 1,2,4,5,7,8 \\
   g   & 3,1,1 & 3,1,1 & 5 & 5 & 1,2,4,5,7,8 \\
   m   & 1,3,3 & 1,3,3 & 1 & 1 & 9,9,9,9,9,9 \\
\hline
\end{array}
So there are $3 \cdot 3 \cdot 1 \cdot 1 \cdot 6 = 54$ elements of order $9$.
