Computing $|\operatorname{Aut}(G)|$ of a given abelian group I had compute $|\operatorname{Aut}(G)|$ of a given abelian group. Now using the fact $(|G_1|,|G_2|)=1$ problem boils down to compute $|\operatorname{Aut}(\prod_{i} \mathbb{Z}_{p^{a_i}})|$ for a prime $p$. Now here I'm stuck. For example can anyone please tell me what is $|\operatorname{Aut}(\mathbb{Z}_{p^2} \times \mathbb{Z}_{p})|$ ? I'm getting answer $(p^2)(p^2-p)$. Is it true ? if so, is there any general formula for $|\operatorname{Aut}(\prod_{i} \mathbb{Z}_{p^{a_i}})|$ ?
 A: There are $p^3-p^2$ possible targets for the generator of order $p^2$ and then $p^2-p$ for the generator of order $p$, so the answer is $(p^3-p^2)(p^2-p) = p^3(p-1)^2$. (You are missing a factor $p-1$ in your answer.)
The general case is more complicated when there is more than one factor of the same order.
A: I do not think fixating on order is necessarily helpful, as it doesn't tell you awfully much. I feel it is more useful is to pretend the elements of your direct product are vectors, so you have a vector space. Then the automorphisms of a vector space look like...what? What is the proper name for a map between vector spaces? And how do we view these maps?
Of course, finite abelian groups (or finitely generated abelian groups) are not vector spaces. Instead, they are $\mathbb{Z}$-modules (a module is like a vector space, but using a ring instead of a field). However, the maps between abelian groups closely resemble maps between vector spaces.
(If this is all rather confusing then feel free to comment and say. But I still remember "realising" the result I'm hinting at, and I don't want to take that "eureka" moment away from you unless you're really struggling. Because that would not be nice.)
