$\DeclareMathOperator\Aut{Aut}\newcommand\card[1]{\lvert#1\rvert}$So, after going over the classification of finite abelian groups in a class I was teaching this winter, I got curious about whether it could be used to obtain a 'nice' value for the [groupoid cardinality](https://ncatlab.org/nlab/show/groupoid+cardinality) of the class of abelian groups of fixed size, that is if one could compute :


$$ \sum\_{\card G=m} \frac{1}{\card{\Aut(G)}} $$


where the sum is over the isomorphism class of abelian groups with $m$ elements. That is just pure curiosity, I had absolutely no real motivation for this. One relatively quickly see that it is enough to compute it for $m=p^n$, so I started doing it for $p$, $p^2$ and $p^3$. Unsurprisingly, the results look messy at first, but then a quite surprising number of simplifications occured and I arrived at the formula :


$$ \sum\_{\card G=p^n} \frac{1}{\card{\Aut(G)}} = \prod\_{k=1}^n \frac{p^{k-1}}{p^k-1}. $$


I checked it by hand up to $n=5$.


In any case the simplicity of the formula suggests that there is a better way to compute this than going over all isomorphism class of abelian groups and computing $\Aut(G)$ and then taking the sum.


So basically I'm wondering if this formula is known, and if not if someone has an idea of how to prove it — ideally with an argument that doesn't involve summing over partitions of $n$.


Note : there are known formulæ for $\card{\Aut(G)}$ see for example the very end of [Hillar and Rhea - Automorphisms of finite Abelian groups](https://arxiv.org/abs/math/0605185).



Groupoid cardinality of the class of abelian p-groups
This is Corollary 3.8 in Cohen, H.; Lenstra, H. W., Jr. Heuristics on class groups. Number theory (New York, 1982), 26–36, Lecture Notes in Math., 1052, Springer, Berlin, 1984 (MR0750661).


In this paper you will find many formulas for averages of various functions over abelian groups weighted by inverse size of the automorphism group.


