List of all invariant factors (finite abelian groups)
I'm looking for a Sagemath builtin function giving the list of all the possible invariant factors of an abelian group with given finite order (say n
)?
In Sagemath terminology, invariant factor is known as elementary divisor
For instance, if n = 48
, it should return something like this:
[[2, 2, 2, 6], [2, 2, 12], [2, 24], [4, 12], [48]]
Or perhaps the list of all the possible elementary divisors in the proper sense.
This is not group theory but more or less combinatorics or counting.
I could be wrong, but I don't think there is a built-in function. Using
n=48
(for example) andn.factor()
and the ideas at https://math.stackexchange.com/questi..., it shouldn't be hard to write something to do this.